Gazebo | Ignition | Community
Ask Your Question
0

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

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

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

chapulina gravatar image

error:

 /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();

code:

 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
0

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

Comments

The link is broken. Found this one instead: https://github.com/osrf/gazebo/blob/g...

Roberto Z. gravatar imageRoberto Z. ( 2022-05-11 08:32:17 -0500 )edit

Question Tools

2 followers

Stats

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

Seen: 3,161 times

Last updated: Feb 18 '18