Skip to content

use gz-physics#283 to implement joint_states/effort feedback (backport #186)#607

Merged
ahcorde merged 3 commits intohumblefrom
mergify/bp/humble/pr-186
Jul 29, 2025
Merged

use gz-physics#283 to implement joint_states/effort feedback (backport #186)#607
ahcorde merged 3 commits intohumblefrom
mergify/bp/humble/pr-186

Conversation

@christophfroehlich
Copy link
Member

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 gazebosim/gz-physics#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.


This is an automatic backport of pull request #186 done by Mergify.

@christophfroehlich
Copy link
Member Author

christophfroehlich commented Jun 10, 2025

@federicociresola can you please test this? do you use fortress or harmonic? The backport for fortress was not straight forward because of the introduction of gz::physics::Vector3d, but it seems to work now (i.e, it compiles. haven't further tested it)

@federicociresola
Copy link

federicociresola commented Jun 12, 2025

I have tested the branch and it seems to work for Gz Harmonic @christophfroehlich

I tested it on

  • Ubuntu 22.04 LTS
  • ROS2 Humble
  • Gazebo Harmonic
    and I used the cart effort example as follows:
# Terminal 1
ros2 launch gz_ros2_control_demos cart_example_effort.launch.py

# Terminal 2
ros2 run gz_ros2_control_demos example_effort

# Terminal 3
ros2 topic echo /joint_states

image

In addition while I was testing the branch ,I noticed that the effort state was published even through it wasn't include in the state _interfaces of the configuration file such as the cart_controller_effort.yaml. I don't think this is normal behavior, do you?

@github-actions
Copy link
Contributor

This PR is stale because it has been open for 45 days with no activity. Please tag a maintainer for help on completing this PR, or close it if you think it has become obsolete.

@github-actions github-actions bot added the stale label Jul 28, 2025
@ahcorde ahcorde merged commit 40bb49c into humble Jul 29, 2025
8 checks passed
@ahcorde ahcorde deleted the mergify/bp/humble/pr-186 branch July 29, 2025 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants