Allow setting payload inertia matrix via set_payload service backwards-compatible (backport #1811)#1878
Merged
Merged
Conversation
urfeex
approved these changes
Jul 17, 2026
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.
Summary
Implements the driver-side changes to support the extended
SetPayloadservice in a backwards-compatible manner.Backwards Compatibility (No Breaking Changes)
Unlike the previous proposal, this implementation does not break existing code or API contracts. The service request has been extended by appending the new fields. Existing callers who only provide
massandcenter_of_gravity(with inertia components defaulting to0.0) will continue to work seamlessly.The updated
SetPayload.srvstructure is:Note
Medium Risk
Payload commands now require all inertia and transition_time interfaces to be set before the driver acts, which can change behavior for callers or mocks that only set mass/COG; depends on matching ur_msgs and ur_client_library versions.
Overview
Extends
set_payloadend-to-end so callers can set payload inertia (six components) and a transition time, in line with the updatedur_msgs/SetPayloadservice andur_client_librarysetTargetPayload().GPIO controller forwards the new request fields through ros2_control command interfaces and, when
verify_payload_on_setis enabled, compares RTDE feedback against mass, COG, and inertia (with an initial sleep whentransition_time > 0).Hardware interface adds matching payload command/state GPIOs, reads
payload_inertiafrom RTDE, and replacessetPayloadwithsetTargetPayloadonce mass, COG, inertia, and transition time are all present. URDF/xacro and the RTDE output recipe are updated accordingly.Integration tests cover inertia, timed transitions, and sequential updates; launch parametrization on
tf_prefixwas removed from the IO controller test.Reviewed by Cursor Bugbot for commit 65bc5ff. Bugbot is set up for automated code reviews on this repo. Configure here.
This is an automatic backport of pull request #1811 done by [Mergify](https://mergify.com).
Note
Medium Risk
Payload handling now requires all inertia and transition_time command interfaces before the driver acts and depends on matching ur_msgs and ur_client_library versions; incorrect mocks or partial writers could fail where mass/COG alone used to suffice.
Overview
Extends
set_payloadso callers can set payload inertia (six components) and a transition time, aligned with the updatedur_msgs/SetPayloadservice andsetTargetPayload()in ur_client_library.The GPIO controller writes the new request fields to ros2_control command interfaces and, when
verify_payload_on_setis on, waits fortransition_timethen checks RTDE feedback against mass, COG, and inertia (not only mass/COG).The hardware interface adds matching payload command/state GPIOs, subscribes to
payload_inertiain the RTDE output recipe, and only issues a payload update once mass, COG, inertia, and transition time are all present—callingsetTargetPayloadinstead ofsetPayload. URDF/xacro declares the new interfaces.Integration tests cover inertia, timed transitions, and sequential updates; IO controller launch tests no longer parametrize
tf_prefix.Reviewed by Cursor Bugbot for commit 50b6efa. Bugbot is set up for automated code reviews on this repo. Configure here.