Robotics StackExchange | Archived questions

Gazebo /ApplyBodyWrench throwing errors

Hi,

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.

Asked by felcjo on 2020-04-06 11:53:10 UTC

Comments

Answers

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?

Asked by Vianne on 2020-04-24 07:21:31 UTC

Comments