Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: humble
Choose a base branch
from

Conversation

christophfroehlich
Copy link
Contributor

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
Contributor 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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants