Add a resolved acceleration control mode#450
Add a resolved acceleration control mode#450FilipposSot wants to merge 6 commits intoUniversalRobots:masterfrom
Conversation
Add support for direct_torques new arguments: viscous_scale and coulomb_scale arguments. And mark the old friction_comp as deprecated.
Add a setTcpOffset to the script command interface documentation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| URCL_LOG_INFO("Setting friction scales is not supported on this robot (version %s). " | ||
| "Requires at least 5.25.1 / 10.12.1. Skipping friction scale commands.", | ||
| version.toString().c_str()); | ||
| } |
There was a problem hiding this comment.
Version check before robot health validation risks crash
Medium Severity
The newly added version check via g_my_robot->getUrDriver()->getVersion() is performed before g_my_robot->isHealthy() at line 135. If the robot wrapper failed to initialize properly (e.g., connection issue), getUrDriver() could return a null shared_ptr, causing a null pointer dereference. The original code checked isHealthy() immediately after construction; this PR inserts the version access before that guard.
|
Thanks @FilipposSot |


Summary
This PR introduces a new acceleration based control mode through the reverse interface. This allows users to implement a wide variety of acceleration resolved torque controllers while leveraging UR's internal model parameters for the robot dynamics.
This PR builds on top of #445 and should be approved/merged after that PR is merged.
Note
High Risk
High risk because it changes the core
external_control.urscriptcontrol-loop behavior and introduces a new realtime control mode that affects how torques are computed and applied on the robot.Overview
Introduces a new reverse-interface control mode,
MODE_RESOLVED_ACCELERATION, allowing clients to send joint accelerations which are converted to torques insideexternal_control.urscriptusing UR dynamics (mass matrix + coriolis/centrifugal minus estimated external torque fromget_tcp_force()/Jacobian).Extends the script command interface with
setFrictionScales(viscous, coulomb)(PolyScope 5.25.1 / 10.12.1+), deprecatingsetFrictionCompensation; values are clamped to[0,1], new script-command IDs and URScript handling are added, and unit tests/docs/examples are updated accordingly.Updates example programs/logging for clearer remote-control errors and version gating, adds CI artifact upload of generated URScript files, and adds tests covering the new control mode and script generation/version-conditional behavior.
Written by Cursor Bugbot for commit c86a757. This will update automatically on new commits. Configure here.