Search code examples
compiler-errorsrosignition

Gazebo 7 and Gazebo 9 incostintencies


I have been written code with API of gazebo 7, recently I am trying to migrate to gazebo 9, but I have faced with some inconsistencies.

In the gazebo 7, we have the member function named "GetWorldPose()." which is a 1 .member function of the link class from physics. So basically we have access to this function by calling its name gazebo::physics::link::GetWorlPose()

but the problem is, in the same path in the gazebo 9 api, under the class "link", I cannot find this function any more
So as a result I have encountered with the following error.

error: ‘class gazebo::physics::Link’ has no member named ‘GetWorldPose’; did you mean ‘SetWorldPose’?  ;              
   ignition::math::Vector3 position = this->link->GetWorldPose().pos;              

Does anyone know where is the location of the GetWorldPose in the updated version of the gazebo?

Thanks a lot


Solution

  • In the newer version of the gazebo, there are some libraries which moved to ignition library, so you need to follow them, in ignition 5.0.0 tutorial.

    And also in this path, the member function GetWorldPose has been renamed to WorldPose.