Currents as efforts - #1918
Draft
urfeex wants to merge 5 commits into
Draft
Conversation
urfeex
force-pushed
the
currents_as_efforts
branch
from
July 31, 2026 13:48
eb12471 to
cf1310f
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
Reviewed by Cursor Bugbot for commit 9db1bb3. Configure here.
| // Newer software version (5.23.0 / 10.11.0) support reporting the actual joint torques. On older | ||
| // versions fall back to the currents, instead. | ||
| use_currents_as_efforts_ = ((info_.hardware_parameters["use_currents_as_efforts"] == "true") || | ||
| (info_.hardware_parameters["use_currents_as_efforts"] == "True")); |
There was a problem hiding this comment.
Missing param selects torque mode
Medium Severity
If use_currents_as_efforts is absent from hardware parameters, map lookup yields an empty string and the flag stays false, so the driver requests torques. For custom URDFs that predate this parameter, that changes prior currents-as-efforts behavior and can fail on older robot software.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 9db1bb3. Configure here.
urfeex
marked this pull request as draft
August 3, 2026 09:35
urfeex
force-pushed
the
currents_as_efforts
branch
from
August 3, 2026 11:56
4bdc486 to
854ebb8
Compare
urfeex
force-pushed
the
currents_as_efforts
branch
from
August 3, 2026 11:57
854ebb8 to
c69fccd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Manual backport of #1551 that doesn't change the behavior for existing distributions.
Note
Medium Risk
Changes joint effort semantics and RTDE output recipe composition; misconfiguration or mixed launch defaults could surprise consumers of
joint_states, though defaults aim to preserve motor-current reporting.Overview
Adds a
use_currents_as_effortshardware parameter (and launch/xacro wiring) so joint effort state can come from eitheractual_current(motor currents, default / prior behavior) oractual_current_as_torqueon PolyScope ≥ 5.23.0 / 10.11.0 when the parameter isfalse.The hardware interface now builds RTDE input/output recipes in memory, optionally appends
actual_current_as_torqueto the output recipe, fails configure if torques are requested on unsupported software, and selects the correct RTDE field inread(). Docs clarify thatjoint_stateseffort is currents by default and how to get true torques.ur_control.launch.pyexposes the new launch argument (defaultfalsein that file);ur_rsp.launch.pyand xacro defaulttrueto preserve existing deployments without changing effort semantics.Reviewed by Cursor Bugbot for commit 9db1bb3. Bugbot is set up for automated code reviews on this repo. Configure here.