Gazebo | Ignition | Community
Ask Your Question

What is Gazebo 9.0 equivalent of gazebo::physics::Joint->GetAngle() used in Gazebo 2.0?

asked 2018-06-11 15:43:56 -0600

rahul gravatar image

In Gazebo 2.0, gazebo::physics::Joint->GetAngle() is used to Get the angle of rotation of an axis(index). This method is not available in Gazebo 9.0. I would like to know what is equivalent function in Gazebo 9.0


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-06-11 15:49:47 -0600

chapulina gravatar image

According to the migration guide:

***Deprecation:*** math::Angle GetAngle(unsigned int _index) const
***Replacement:*** virtual double Position(const unsigned int _index = 0) const final
edit flag offensive delete link more


Thanks. Are you aware of any implementation example of Position( ) function?

rahul gravatar imagerahul ( 2018-06-11 15:55:55 -0600 )edit

I was able to do it successfully in case any one has the same question. You have to call like: x = steering_joints[0]->Position(0);

rahul gravatar imagerahul ( 2018-06-11 17:12:15 -0600 )edit

Glad you figured it out

chapulina gravatar imagechapulina ( 2018-06-11 17:47:48 -0600 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2018-06-11 15:43:56 -0600

Seen: 2,078 times

Last updated: Jun 11 '18