Ask Your Question
0

i try to catkin_make with gazebo 9 but i got these errors

asked 2020-09-05 14:27:26 -0500

marco_chunab gravatar image

updated 2020-09-07 04:04:40 -0500

gvdhoorn gravatar image

Straight dump of the error message:

 /home/user/catkin_ws/src/robot_tutorial_1/plugins/wb_plugin.cc:98:7: error: ‘math’ does not name a type; did you mean ‘tanh’?
       math::Quaternion pRot;
       ^~~~
       tanh
/home/user/catkin_ws/src/robot_tutorial_1/plugins/wb_plugin.cc:99:7: error: ‘math’ does not name a type; did you mean ‘tanh’?
       math::Vector3d pPos;
       ^~~~
       tanh
/home/user/catkin_ws/src/robot_tutorial_1/plugins/wb_plugin.cc: In member function ‘void gazebo::WBPlugin::onCmd(geometry_msgs::Twist)’:
/home/user/catkin_ws/src/robot_tutorial_1/plugins/wb_plugin.cc:114:22: error: ‘class gazebo::physics::World’ has no member named ‘GetSimTime’; did you mean ‘SetSimTime’?
           lc_T = _w->GetSimTime();
                      ^~~~~~~~~~
                      SetSimTime
/home/user/catkin_ws/src/robot_tutorial_1/plugins/wb_plugin.cc: In member function ‘void gazebo::WBPlugin::onUpdate(const gazebo::common::UpdateInfo&)’:
/home/user/catkin_ws/src/robot_tutorial_1/plugins/wb_plugin.cc:125:38: error: ‘class gazebo::physics::World’ has no member named ‘GetSimTime’; did you mean ‘SetSimTime’?
          common::Time cSimTime = _w->GetSimTime();
                                      ^~~~~~~~~~
                                      SetSimTime
/home/user/catkin_ws/src/robot_tutorial_1/plugins/wb_plugin.cc:141:10: error: ‘math’ has not been declared
          math::Quaternion rot = _m->GetWorldPose().rot;
          ^~~~
/home/user/catkin_ws/src/robot_tutorial_1/plugins/wb_plugin.cc:142:10: error: ‘math’ has not been declared
          math::Vector3 pos = _m->GetWorldPose().pos;
          ^~~~
/home/user/catkin_ws/src/robot_tutorial_1/plugins/wb_plugin.cc:145:10: error: ‘math’ has not been declared
          math::Vector3 dist = pos - pPos;
          ^~~~
/home/user/catkin_ws/src/robot_tutorial_1/plugins/wb_plugin.cc:151:24: error: ‘rot’ was not declared in this scope
          double roll = rot.GetRoll();
                        ^~~
/home/user/catkin_ws/src/robot_tutorial_1/plugins/wb_plugin.cc:151:24: note: suggested alternative: ‘rint’
          double roll = rot.GetRoll();
                        ^~~
                        rint
/home/user/catkin_ws/src/robot_tutorial_1/plugins/wb_plugin.cc:156:30: error: ‘pRot’ was not declared in this scope
          double yawV = yaw - pRot.GetYaw();
                              ^~~~
/home/user/catkin_ws/src/robot_tutorial_1/plugins/wb_plugin.cc:156:30: note: suggested alternative: ‘pow’
          double yawV = yaw - pRot.GetYaw();
                              ^~~~
                              pow
/home/user/catkin_ws/src/robot_tutorial_1/plugins/wb_plugin.cc:162:32: error: ‘dist’ was not declared in this scope
          double velSign = SIGN(dist.x * cos(yaw) + dist.y * sin(yaw));
                                ^
/home/user/catkin_ws/src/robot_tutorial_1/plugins/wb_plugin.cc:17:18: note: in definition of macro ‘SIGN’
 #define SIGN(a) (a >= 0 ? 1.0 : -1.0)
                  ^
/home/user/catkin_ws/src/robot_tutorial_1/plugins/wb_plugin.cc:162:32: note: suggested alternative: ‘div’
          double velSign = SIGN(dist.x * cos(yaw) + dist.y * sin(yaw));
                                ^
/home/user/catkin_ws/src/robot_tutorial_1/plugins/wb_plugin.cc:17:18: note: in definition of macro ‘SIGN’
 #define SIGN(a) (a >= 0 ? 1.0 : -1.0)
                  ^
/home/user/catkin_ws/src/robot_tutorial_1/plugins/wb_plugin.cc:194:10: error: ‘pPos’ was not declared in this scope
          pPos = pos;
          ^~~~
/home/user/catkin_ws/src/robot_tutorial_1/plugins/wb_plugin.cc:194:10: note: suggested alternative: ‘puts’
          pPos = pos;
          ^~~~
          puts
/home/user/catkin_ws/src/robot_tutorial_1/plugins/wb_plugin.cc:194:17: error: ‘pos’ was not declared in this scope
          pPos = pos;
                 ^~~
/home/user/catkin_ws/src/robot_tutorial_1/plugins/wb_plugin.cc:194:17: note: suggested alternative: ‘pow’
          pPos = pos;
                 ^~~
                 pow
/home/user/catkin_ws/src/robot_tutorial_1/plugins/wb_plugin.cc: In member function ‘virtual void gazebo::WBPlugin::Load(gazebo::physics::ModelPtr, sdf::ElementPtr)’:
/home/user/catkin_ws/src ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2020-09-08 04:42:01 -0500

Weasfas gravatar image

Hi @marco_chunab

With the new changes on Gazebo 9 you need to include the proper headers and declarations. That means, for instance if you want to declare a Vector3 variable you will need:

#include <ignition/math/Vector3.hh>
ignition::math::Vector3d pPos;

and for the quaternions:

#include <ignition/math/Quaternion.hh>
ignition::math::Quaterniond rot;

GetWorldPose() is WorldPose() and for the GetSimTime() is SimTime().

And so on. You will also need to check the proper function to get the Roll, Pitch, Yaw and Rot/Pos.

You can check this and this docs to know more about these changes.

Hope this can help you.

Regards.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2020-09-05 14:27:26 -0500

Seen: 420 times

Last updated: Sep 08 '20