ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

plugin in gazebo

asked 2012-10-17 21:26:19 -0600

Nachum gravatar image

Hi I am trying to make a plugin in gazebo to control a 1 joint urdf model. I am able to give it tourque by this command -


but if i try giving a different command like-


it isn't willing to compile. any idea?

Thanks Nachum

edit retag flag offensive close merge delete


For questions like this, it is very helpful if you add the actual error message you encounter. (You can edit your post to do that)

Stefan Kohlbrecher gravatar image Stefan Kohlbrecher  ( 2012-10-17 21:46:25 -0600 )edit

GetAngle(0) returns a gazebo::math::Angle object, you need to invoke the GetAngle().GetAsRadian() member function as you did in your own answer below.

hsu gravatar image hsu  ( 2012-10-18 05:11:52 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2012-10-18 00:03:18 -0600

Nachum gravatar image

O.k I just put it in 2 different lines and it works nicely.

edit flag offensive delete link more


for what do i need the zero in GetAngle(0)?

Nachum gravatar image Nachum  ( 2012-10-18 00:04:13 -0600 )edit

for some joints such as Hinge2Joint and Universal joints, there are two states per joint.

hsu gravatar image hsu  ( 2012-10-18 05:08:11 -0600 )edit

what are the two states?

Nachum gravatar image Nachum  ( 2012-10-20 22:33:18 -0600 )edit

Question Tools


Asked: 2012-10-17 21:26:19 -0600

Seen: 376 times

Last updated: Oct 18 '12