Gazebo | Ignition | Community
Ask Your Question

no GetAngles() member in JointState Class in Gazeo Api 9?

asked 2018-02-18 05:29:18 -0500

hari1234 gravatar image

updated 2018-02-18 13:00:05 -0500

chapulina gravatar image


 /home/robot/rtt_gazebo/rtt_gazebo_examples/src/default_gazebo_component.cpp:107:41: error: ‘__gnu_cxx::__alloc_traits<std::allocator<gazebo::physics::JointState> >::value_type {aka class gazebo::physics::JointState}’ has no member named ‘GetAngles’
         state_pos_[j] = joint_states[j].GetAngles();


 joint_states[j](JointPtr gazebo_joints_[j]);
        state_pos_[j] = joint_states[j].GetAngles();
  std::vector<gazebo::physics::JointPtr> gazebo_joints_;
  std::vector<gazebo::physics::JointState> joint_states;

i'm using gazebo9 version. as i studied this gazebo 9 api jointstate class, their is presence of getangle member in class jointstate, than why is this error coming.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2018-02-18 13:03:51 -0500

chapulina gravatar image

The documentation you linked to is for Gazebo 7.1.0, you should look here for the Gazebo 9.0.0 documentation (note the version on the URL).

If you check the Migration guide, you'll see that the GetAngles changed to Positions:

Deprecation: const std::vector<math::Angle> GetAngles() const
Replacement: const std::vector<double> &Positions() const
edit flag offensive delete link more
Login/Signup to Answer

Question Tools



Asked: 2018-02-18 05:29:18 -0500

Seen: 2,459 times

Last updated: Feb 18 '18