Skip to content

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

Merged
ahcorde merged 2 commits intoros-controls:jazzyfrom
andreasBihlmaier:fix-effort-state
Oct 28, 2024
Merged

use gz-physics#283 to implement joint_states/effort feedback#186
ahcorde merged 2 commits intoros-controls:jazzyfrom
andreasBihlmaier:fix-effort-state

Conversation

@andreasBihlmaier
Copy link
Contributor

@andreasBihlmaier andreasBihlmaier commented Oct 7, 2023

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.

Copy link
Collaborator

@ahcorde ahcorde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the contribution.
Two comments:

  • Can you review linters?
  • can you add a comment related to the hardcoded z joint ? or do you plan to continue working on this PR ?

@Nemantor
Copy link

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

@azeey azeey mentioned this pull request May 20, 2024
@christophfroehlich christophfroehlich linked an issue May 21, 2024 that may be closed by this pull request
@BarisYazici
Copy link

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

@andreasBihlmaier
Copy link
Contributor Author

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

@andreasBihlmaier
Copy link
Contributor Author

This should do it (further testing strongly recommended): andreasBihlmaier@59ef8f0

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

@andreasBihlmaier andreasBihlmaier changed the base branch from humble to jazzy June 16, 2024 19:59
@andreasBihlmaier
Copy link
Contributor Author

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.

@BarisYazici
Copy link

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

@azeey
Copy link
Contributor

azeey commented Oct 2, 2024

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

@ahcorde ahcorde merged commit cc66e73 into ros-controls:jazzy Oct 28, 2024
@ahcorde
Copy link
Collaborator

ahcorde commented Oct 28, 2024

https://github.com/Mergifyio backport rolling humble iron

@mergify
Copy link
Contributor

mergify bot commented Oct 28, 2024

backport rolling humble iron

✅ Backports have been created

Details

mergify bot pushed a commit that referenced this pull request Oct 28, 2024
mergify bot pushed a commit that referenced this pull request Oct 28, 2024
(cherry picked from commit cc66e73)

# Conflicts:
#	gz_ros2_control/src/gz_system.cpp
mergify bot pushed a commit that referenced this pull request Oct 28, 2024
(cherry picked from commit cc66e73)

# Conflicts:
#	ign_ros2_control/src/ign_system.cpp
ahcorde pushed a commit that referenced this pull request Oct 28, 2024
…430)

(cherry picked from commit cc66e73)

Co-authored-by: Andreas Bihlmaier <andreas.bihlmaier@gmx.de>
@federicociresola
Copy link

Hi guys,
I noticed that the backporting for Humble didn't work because the file modified in this PR there are not in the Humble branch https://github.com/ros-controls/gz_ros2_control/blob/humble/gz_ros2_control/src/gz_system.cpp

I have implemented the changes in this PR in my forked Humble branch and it works fine

@christophfroehlich
Copy link
Member

@Mergifyio backport humble

@mergify
Copy link
Contributor

mergify bot commented Jun 10, 2025

backport humble

✅ Backports have been created

Details

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.

Effort Values are 0

7 participants