Gazebo | Ignition | Community
Ask Your Question

Gazebo /ApplyBodyWrench throwing errors

asked 2020-04-06 11:53:10 -0500

felcjo gravatar image


I'd like to make a door swivel on a hinge. For that, I thought I would use the ApplyBodyWrench service.

As a test, I modeled a hinge and door in gazebo, and ran this (the reference_point being the pose of the hinge wrt world.

rosservice call gazebo/apply_body_wrench '{body_name: "door::link", reference_frame: "hinge_0_0", reference_point: { x: -2.0155, y: -5.222, z: 3.969 }, wrench: {torque: { x: 0, y: 0, z: -0.5 } }, start_time: 10000000000, duration: 1000000000 }'

This throws an error however:

[ERROR] [1586191146.022060675, 1451.365000000]: wrench defined as [hinge_0_0]:[0.000000 0.000000 0.000000, 0.000000 0.000000 0.500000] --> applied as [link]:[0.000000 0.000000 0.000000, 0.000005 -0.000006 0.500000]

The door simply swivels about its own axis, rather than about the z-axis of the hinge.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-04-24 07:21:31 -0500

Vianne gravatar image

As to the error: According to this answer Gazebo always throws this error when using local reference frames. I'm not sure about a solution for the rotation position problem; you can try fixing the hinge to the world and then fixing the door to the hinge so it can only move in the way you intend it to?

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2020-04-06 11:53:10 -0500

Seen: 263 times

Last updated: Apr 06 '20