Unable to run the 'Setting Velocity on Links And Joints' tutorial

asked 2019-11-17 22:04:30 -0500

Suyash gravatar image

I cloned the tutorial and made the build directory. After running the cmake .. command, when I try to execute the make command, the following error pops up. From the previous questions, I think it is because of the mismatch of the Gazebo versions, but I am not sure how to solve. Please help, thank you.

[ 25%] Building CXX object CMakeFiles/SetLinkVelocityPlugin.dir/src/SetLinkVelocityPlugin.cpp.o In file included from /home/suyash/gazebo_tutorials/set_velocity/examples/set_vel_plugin/src/SetLinkVelocityPlugin.cpp:19:0: /home/suyash/gazebo_tutorials/set_velocity/examples/set_vel_plugin/include/ode_perfect_linear.hh:32:41: error: ‘math’ has not been declared physics::LinkPtr _link, math::Vector3 _vel, double _maxForce) ^~~~ /home/suyash/gazebo_tutorials/set_velocity/examples/set_vel_plugin/include/ode_perfect_linear.hh:32:55: error: expected ‘,’ or ‘...’ before ‘_vel’ physics::LinkPtr _link, math::Vector3 _vel, double _maxForce) ^~~~ /home/suyash/gazebo_tutorials/set_velocity/examples/set_vel_plugin/include/ode_perfect_linear.hh: In member function ‘void gazebo::OdePerfectLinearVelController::Start(gazebo::physics::LinkPtr, int)’: /home/suyash/gazebo_tutorials/set_velocity/examples/set_vel_plugin/include/ode_perfect_linear.hh:38:51: error: ‘class gazebo::physics::World’ has no member named ‘GetPhysicsEngine’; did you mean ‘SetPhysicsEnabled’? physics::PhysicsEnginePtr engine = world->GetPhysicsEngine(); ^~~~~~~~~~~~~~~~ SetPhysicsEnabled /home/suyash/gazebo_tutorials/set_velocity/examples/set_vel_plugin/include/ode_perfect_linear.hh:42:20: error: ‘class gazebo::physics::World’ has no member named ‘GetByName’; did you mean ‘BaseByName’? world->GetByName("world")); ^~~~~~~~~ BaseByName /home/suyash/gazebo_tutorials/set_velocity/examples/set_vel_plugin/include/ode_perfect_linear.hh:43:9: error: ‘math’ has not been declared math::Pose jointOrigin; ^~~~ /home/suyash/gazebo_tutorials/set_velocity/examples/set_vel_plugin/include/ode_perfect_linear.hh:44:45: error: ‘jointOrigin’ was not declared in this scope this->joint->Load(worldLink, _link, jointOrigin); ^~~~~~~~~~~ /home/suyash/gazebo_tutorials/set_velocity/examples/set_vel_plugin/include/ode_perfect_linear.hh:46:28: error: ‘_vel’ was not declared in this scope double magnitude = _vel.GetLength(); ^~~~ /home/suyash/gazebo_tutorials/set_velocity/examples/set_vel_plugin/include/ode_perfect_linear.hh:48:42: error: ‘_maxForce’ was not declared in this scope this->joint->SetParam("fmax", 0, _maxForce); ^~~~~~~~~ In file included from /home/suyash/gazebo_tutorials/set_velocity/examples/set_vel_plugin/src/SetLinkVelocityPlugin.cpp:20:0: /home/suyash/gazebo_tutorials/set_velocity/examples/set_vel_plugin/include/ode_perfect_angular.hh: At global scope: /home/suyash/gazebo_tutorials/set_velocity/examples/set_vel_plugin/include/ode_perfect_angular.hh:34:41: error: ‘math’ has not been declared physics::LinkPtr _link, math::Vector3 _vel, double _maxTorque) ^~~~ /home/suyash/gazebo_tutorials/set_velocity/examples/set_vel_plugin/include/ode_perfect_angular.hh:34:55: error: expected ‘,’ or ‘...’ before ‘_vel’ physics::LinkPtr _link, math::Vector3 _vel, double _maxTorque) ^~~~ /home/suyash/gazebo_tutorials/set_velocity/examples/set_vel_plugin/include/ode_perfect_angular.hh: In member function ‘void gazebo::OdePerfectAngularVelController::Start(gazebo::physics::LinkPtr, int)’: /home/suyash/gazebo_tutorials/set_velocity/examples/set_vel_plugin/include/ode_perfect_angular.hh:40:51: error: ‘class gazebo::physics::World’ has no member named ‘GetPhysicsEngine’; did you mean ‘SetPhysicsEnabled’? physics::PhysicsEnginePtr engine = world->GetPhysicsEngine(); ^~~~~~~~~~~~~~~~ SetPhysicsEnabled /home/suyash/gazebo_tutorials/set_velocity/examples/set_vel_plugin/include/ode_perfect_angular.hh:44:61: error: ‘class gazebo::physics::World’ has no member named ‘GetByName’; did you mean ‘BaseByName’? boost::dynamic_pointer_cast<physics::link>(world->GetByName("world")); ^~~~~~~~~ BaseByName /home/suyash/gazebo_tutorials/set_velocity/examples/set_vel_plugin/include/ode_perfect_angular.hh:45:9: error: ‘math’ has not been declared math::Pose jointOrigin; ^~~~ /home/suyash/gazebo_tutorials/set_velocity/examples/set_vel_plugin/include/ode_perfect_angular.hh:46:45: error: ‘jointOrigin’ was not declared in ... (more)

edit retag flag offensive close merge delete

Comments

I got the same Error. Did you solve the Problem? I use GAZEBO 9. The tutorial is for GAZEBO 7.

saekeler gravatar imagesaekeler ( 2020-03-27 06:46:08 -0500 )edit