gz_ros2_control icon indicating copy to clipboard operation
gz_ros2_control copied to clipboard

use gz-physics#283 to implement joint_states/effort feedback

Open andreasBihlmaier opened this issue 2 years ago • 6 comments

Fixes joint_states/effort being zero for joints with <state_interface name="effort" /> in combination with joint_state_broadcaster/JointStateBroadcaster by using the JointTransmittedWrench component introduced by https://github.com/gazebosim/gz-physics/pull/283.

The joint axis is hard coded to z. I did not yet look into reading out the actual <axis> of the joint and extracting the respective force/torque component of the wrench.

andreasBihlmaier avatar Oct 07 '23 15:10 andreasBihlmaier

I tried it and it works properly, couldn't find any problems

Nemantor avatar Oct 11 '23 03:10 Nemantor

We are currently integrating Gazebo and would like to have the efforts from simulation. How is this PR going?

BarisYazici avatar Jun 13 '24 15:06 BarisYazici

I'll take a quick look this weekend whether I can get this PR cleaned up and submitted.

andreasBihlmaier avatar Jun 14 '24 15:06 andreasBihlmaier

This should do it (further testing strongly recommended): https://github.com/andreasBihlmaier/gz_ros2_control/commit/59ef8f0170c3dfaa3b8135ca524113731ce8821e

I'll try to either update this PR or create a new one in the next days.

andreasBihlmaier avatar Jun 14 '24 17:06 andreasBihlmaier

I did a bit of quick testing wrsp to joint axis. The effort seems to be reported as expected. I force pushed https://github.com/andreasBihlmaier/gz_ros2_control/tree/fix-effort-state-jazzy onto the fix-effort-state branch (GitHub does not allow to change PR source branches) and retargeted this PR to jazzy branch.

andreasBihlmaier avatar Jun 16 '24 20:06 andreasBihlmaier

I tested this. It works for us. Thanks a lot @andreasBihlmaier

BarisYazici avatar Jun 20 '24 11:06 BarisYazici

@ahcorde this looks good to me. Any reason for not merging?

azeey avatar Oct 02 '24 16:10 azeey