Home | Tutorials | Wiki | Issues
Ask Your Question
0

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

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

hari1234 gravatar image

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

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 -0600

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

2 followers

Stats

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

Seen: 285 times

Last updated: Feb 18