Home | Tutorials | Wiki | Issues
Ask Your Question
0

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

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

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

Thanks.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

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

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

Comments

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

rahul gravatar imagerahul ( 2018-06-11 15:55:55 -0500 )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 -0500 )edit
1

Glad you figured it out

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

Question Tools

1 follower

Stats

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

Seen: 128 times

Last updated: Jun 11