Update urscript interface to use primary client#1767
Open
urfeex wants to merge 3 commits intoUniversalRobots:mainfrom
Open
Update urscript interface to use primary client#1767urfeex wants to merge 3 commits intoUniversalRobots:mainfrom
urfeex wants to merge 3 commits intoUniversalRobots:mainfrom
Conversation
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.
Codecov Report❌ Patch coverage is
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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
urrsk
approved these changes
Apr 22, 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.
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.