Skip to content

Allow setting payload inertia matrix via set_payload service backwards-compatible (backport #1811)#1879

Merged
urfeex merged 3 commits into
jazzyfrom
mergify/bp/jazzy/pr-1811
Jul 21, 2026
Merged

Allow setting payload inertia matrix via set_payload service backwards-compatible (backport #1811)#1879
urfeex merged 3 commits into
jazzyfrom
mergify/bp/jazzy/pr-1811

Conversation

@mergify

@mergify mergify Bot commented Jul 13, 2026

Copy link
Copy Markdown

Summary

Implements the driver-side changes to support the extended SetPayload service in a backwards-compatible manner.

Note: This PR replaces the breaking-change approach discussed in PR #1808. It depends on the updated ur_msgs/SetPayload.srv (ros-industrial/ur_msgs#43) and on the setTargetPayload() addition to ur_client_library (UniversalRobots/Universal_Robots_Client_Library#515).

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 mass and center_of_gravity (with inertia components defaulting to 0.0) will continue to work seamlessly.

The updated SetPayload.srv structure is:

float32 mass  
geometry_msgs/Vector3 center_of_gravity  
float64 ixx  
float64 iyy  
float64 izz  
float64 ixy  
float64 ixz  
float64 iyz  
float64 transition_time  
---  
bool success

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_payload end-to-end so callers can set payload inertia (six components) and a transition time, in line with the updated ur_msgs/SetPayload service and ur_client_library setTargetPayload().

GPIO controller forwards the new request fields through ros2_control command interfaces and, when verify_payload_on_set is enabled, compares RTDE feedback against mass, COG, and inertia (with an initial sleep when transition_time > 0).

Hardware interface adds matching payload command/state GPIOs, reads payload_inertia from RTDE, and replaces setPayload with setTargetPayload once 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_prefix was 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 depends on all inertia and transition_time command interfaces and on matching ur_msgs/ur_client_library versions; incomplete mocks or partial callers that omit new fields may fail to apply payload commands.

Overview
Extends set_payload so callers can set payload inertia (six components) and a transition time, aligned with the updated ur_msgs/SetPayload service and ur_client_library::setTargetPayload().

The GPIO controller writes the new service fields through ros2_control command interfaces and, when verify_payload_on_set is on, compares RTDE feedback to mass, COG, and inertia (sleeping first when transition_time > 0).

The hardware interface adds matching payload command/state GPIOs, subscribes to payload_inertia in the RTDE recipe, and triggers the robot only after mass, COG, inertia, and transition time are all set—replacing setPayload with setTargetPayload. 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 e33372e. Bugbot is set up for automated code reviews on this repo. Configure here.

@mergify mergify Bot added the conflicts label Jul 13, 2026
@mergify

mergify Bot commented Jul 13, 2026

Copy link
Copy Markdown
Author

Cherry-pick of 3d18755 has failed:

On branch mergify/bp/jazzy/pr-1811
Your branch is up to date with 'origin/jazzy'.

You are currently cherry-picking commit 3d18755.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   ur_controllers/include/ur_controllers/gpio_controller.hpp
	modified:   ur_controllers/src/gpio_controller.cpp
	modified:   ur_robot_driver/include/ur_robot_driver/hardware_interface.hpp
	modified:   ur_robot_driver/resources/rtde_output_recipe.txt
	modified:   ur_robot_driver/test/integration_test_io_controller.py
	modified:   ur_robot_driver/urdf/ur.ros2_control.xacro

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   ur_robot_driver/src/hardware_interface.cpp

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 7dc6cdf. Configure here.

Comment thread ur_robot_driver/src/hardware_interface.cpp Outdated
@urfeex urfeex added enhancement New feature or request Jazzy and removed conflicts labels Jul 17, 2026
srvald and others added 3 commits July 17, 2026 14:43
…s-compatible (#1811)

Extend set_payload service with inertia matrix and transition_time

(cherry picked from commit 3d18755)

# Conflicts:
#	ur_robot_driver/src/hardware_interface.cpp
@urfeex
urfeex force-pushed the mergify/bp/jazzy/pr-1811 branch from 576b10c to e33372e Compare July 17, 2026 12:44
@mergify

mergify Bot commented Jul 20, 2026

Copy link
Copy Markdown
Author

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@urfeex
urfeex merged commit 798b25e into jazzy Jul 21, 2026
7 of 10 checks passed
@urfeex
urfeex deleted the mergify/bp/jazzy/pr-1811 branch July 21, 2026 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Jazzy

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants