Gazebo | Ignition | Community
Ask Your Question

Why is there a difference between functions of Link Class Reference and gazebo::physics::Link Class Reference ?

asked 2018-07-20 00:32:39 -0500

pk gravatar image

Gazebo Version: 7.13.1
Ubuntu 16.04
Class Links :
Link Class Reference

For example, to get absolute pose of a model, function in Link Class Reference is WorldPose and in gazebo::physics::Link is GetWorldPose. Moreover datatype of poses returned by Link Class and gazebo::physics::Link are different. One is ignition::math::Pose3d and other is math::Pose. Why is there such difference ?

How to overcome this ? For example, how to convert math::Pose to ignition::math::Pose3d ?
Thanks in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-07-20 11:43:01 -0500

chapulina gravatar image

updated 2018-07-20 11:44:45 -0500

As detailed on the Migration guide From Gazebo 7 to Gazebo 8, function

inline virtual const math::Pose Entity::GetWorldPose() const

was replaced with

inline virtual const ignition::math::Pose3d &Entity::WorldPose() const

When looking through the API documentation, be sure to go check if the documentation's version matches your Gazebo version. For Gazebo 7, this is the page you should be looking at.

As for converting between gazebo::math and ignition::math

ignition::math::Something ignSmth = gzSmth.Ign();
gazebo::math::Something gzSmth(ignSmth);
edit flag offensive delete link more

Question Tools

1 follower


Asked: 2018-07-20 00:32:39 -0500

Seen: 230 times

Last updated: Jul 20 '18