Skip to content

Conversation

urfeex
Copy link
Member

@urfeex urfeex commented Sep 22, 2025

This branch adds direct torque control to the client library. This is a sub-feature of the torque_control branch, basically not including the impedance-like PD controller.

This PR adds the functionality to command the robot by sending joint torques directly.

urfeex and others added 24 commits May 15, 2025 10:49
The PR adds `MODE_TORQUE` to the supported control modes and extends the
external control urscript with a torque thread that applies the latest
`cmd_torque` as torque command.
This adds an example for using the script_command interface.
UniversalRobots#336)

…oller in task space

The pd controller in joint space will accept joint targets and compute
joint torques based on PD control scheme.

The pd controller in task space will accept task space targets and use
inverse kinematics to compute joint targets which are then used to
compute joint torques based on PD control scheme.

---------

Co-authored-by: Felix Exner <feex@universal-robots.com>
…versalRobots#348)

This way all non-torque-control-related things should work on software
versions not supporting torque control
Add an example using direct torque control.
And move clang-tidy check out of the industrial_ci run
…UniversalRobots#356)

Temporarily relax the version check for torque control features.

The torque control features will be available from 5.23.0 on. However,
as we are currently running a public beta program, where the reported
software version is 5.22.0 we should relax the version check until
5.23.0 is actually released.
To make it easier to change the example for manual testing, let's define
the target torque's absolute value in one place only.
The function names didn't match this repo's style guide.
The script command has been renamed in the controller.
It is still planned to add the PD controller. However, we would like it
not to postpone merging torque_control to master.
torque control is now available in released software versions, the API
is considered stable and we do have documentation available.
@urfeex urfeex requested review from urrsk and URJala September 22, 2025 08:54
Copy link

codecov bot commented Sep 22, 2025

Codecov Report

❌ Patch coverage is 61.29032% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.64%. Comparing base (3b63610) to head (84ed404).
⚠️ Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
src/ur/ur_driver.cpp 27.27% 8 Missing ⚠️
src/control/script_command_interface.cpp 80.00% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #381      +/-   ##
==========================================
- Coverage   77.86%   77.64%   -0.23%     
==========================================
  Files          92       92              
  Lines        4166     4192      +26     
  Branches      461      465       +4     
==========================================
+ Hits         3244     3255      +11     
- Misses        684      695      +11     
- Partials      238      242       +4     
Flag Coverage Δ
start_ursim 82.39% <ø> (-1.80%) ⬇️
ur20-latest 75.61% <61.29%> (-0.12%) ⬇️
ur5-3.14.3 76.09% <61.29%> (-0.10%) ⬇️
ur5e-10.7.0 71.28% <61.29%> (+0.48%) ⬆️
ur5e-5.9.4 76.12% <61.29%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@urfeex urfeex requested a review from urmahp September 29, 2025 07:08
Co-authored-by: Mads Holm Peters <79145214+urmahp@users.noreply.github.com>
@urfeex urfeex requested a review from urmahp September 30, 2025 06:17
@urfeex
Copy link
Member Author

urfeex commented Sep 30, 2025

I think, we should make sure that all tests succeed before merging. It seems like we need to skip a couple of tests on "older" software versions.

@urfeex urfeex merged commit 1a95cf9 into UniversalRobots:master Oct 2, 2025
25 of 33 checks passed
@urfeex urfeex deleted the direct_torque_control branch October 2, 2025 09:09
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.

3 participants