Skip to content

Update urscript interface to use primary client#1767

Open
urfeex wants to merge 3 commits intoUniversalRobots:mainfrom
urfeex:update_urscript_interface
Open

Update urscript interface to use primary client#1767
urfeex wants to merge 3 commits intoUniversalRobots:mainfrom
urfeex:update_urscript_interface

Conversation

@urfeex
Copy link
Copy Markdown
Member

@urfeex urfeex commented Apr 16, 2026

Use a full PrimaryClient inside the urscript_sender node.

Before, it was using a secondary stream directly, which was a bit
error-prune and not that well tested as the primary client is. Also, with the bare stream we don't have any chance of doing error detection.

I also added detection for local control mode. When attempting to send script code to the primary interface while it is
connected to the read-only socket (e.g. because the robot is in local
control mode), the controller will send a A210 error. If we receive this, reconnect the primary client. This automatic reconnection behavior can be switched off by a parameter. A ROS service to trigger reconnection has been added, as well.

urfeex added 3 commits April 16, 2026 13:46
Use a full PrimaryClient inside the urscript_sender node.

Before, it was using a secondary stream directly, which was a bit
error-prune and not that well tested as the primary client is.
When attempting to send script code to the primary interface while it is
connected to the read-only socket (e.g. because the robot is in local
control mode), the controller will send a A210 error. If we receive
this, reconnect the primary client.
@urfeex urfeex requested a review from a team April 16, 2026 17:51
@urfeex urfeex added the enhancement New feature or request label Apr 16, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 16, 2026

Codecov Report

❌ Patch coverage is 0% with 46 lines in your changes missing coverage. Please review.
✅ Project coverage is 4.95%. Comparing base (1b121b7) to head (e17c9d9).
⚠️ Report is 568 commits behind head on main.

Files with missing lines Patch % Lines
ur_robot_driver/src/urscript_interface.cpp 0.00% 46 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##            main   #1767      +/-   ##
========================================
+ Coverage   3.59%   4.95%   +1.36%     
========================================
  Files         13      36      +23     
  Lines        947    4279    +3332     
  Branches     152     499     +347     
========================================
+ Hits          34     212     +178     
- Misses       843    4065    +3222     
+ Partials      70       2      -68     
Flag Coverage Δ
unittests 4.95% <0.00%> (+1.36%) ⬆️

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants