Skip to content

Primary client script execution feedback#484

Open
URJala wants to merge 50 commits into
UniversalRobots:masterfrom
URJala:primary_client_script_execution_feedback
Open

Primary client script execution feedback#484
URJala wants to merge 50 commits into
UniversalRobots:masterfrom
URJala:primary_client_script_execution_feedback

Conversation

@URJala
Copy link
Copy Markdown
Collaborator

@URJala URJala commented Apr 16, 2026

This is not quite done yet, but the main logic and the test cases are there
Still missing documentation and example also needs to be finished.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 16, 2026

Codecov Report

❌ Patch coverage is 78.48101% with 34 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.49%. Comparing base (8f48a06) to head (7d912f5).
⚠️ Report is 10 commits behind head on master.

Files with missing lines Patch % Lines
src/primary/primary_client.cpp 78.41% 15 Missing and 15 partials ⚠️
include/ur_client_library/exceptions.h 50.00% 2 Missing ⚠️
...clude/ur_client_library/primary/primary_consumer.h 83.33% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #484      +/-   ##
==========================================
- Coverage   77.08%   76.49%   -0.60%     
==========================================
  Files         113      113              
  Lines        6045     6199     +154     
  Branches     2637     2745     +108     
==========================================
+ Hits         4660     4742      +82     
- Misses       1049     1095      +46     
- Partials      336      362      +26     
Flag Coverage Δ
python_scripts 75.90% <ø> (ø)
start_ursim 81.25% <ø> (-3.85%) ⬇️
ur20-latest ?
ur5-3.14.3 72.26% <78.48%> (-0.17%) ⬇️
ur5e-10.11.0 66.25% <77.21%> (+0.06%) ⬆️
ur5e-10.12.0 67.55% <77.21%> (-0.09%) ⬇️
ur5e-10.7.0 65.60% <77.21%> (+0.01%) ⬆️
ur5e-5.9.4 72.79% <77.21%> (-0.15%) ⬇️

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.

Copy link
Copy Markdown
Member

@urfeex urfeex left a comment

Choose a reason for hiding this comment

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

First, very high-level overview.

Comment thread include/ur_client_library/primary/primary_client.h Outdated
Comment thread src/primary/primary_client.cpp
Comment thread examples/primary_client.cpp Outdated
Copy link
Copy Markdown
Member

@urfeex urfeex left a comment

Choose a reason for hiding this comment

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

There seems to be an error somewhere in the logic. When I run the example with a robot that is not break-released, it releases breaks correctly, but then not all following commands are executed. I don't know whether there are some messages being lost due to the frequency things are called with or if there are flags that would need to be reset on the way.

This could be related with the error code handling. One example output is

[1776862206.490350] INFO /home/feex/git/ur_client_library/src/primary/primary_client.cpp 74: Starting primary client pipeline
Client connected
[1776862212.575126] INFO /home/feex/git/ur_client_library/include/ur_client_library/primary/primary_consumer.h 147: Logging an ErrorCodeMessage from the UR Controller Box: C100A7
[1776862212.581287] ERROR /home/feex/git/ur_client_library/src/primary/primary_client.cpp 237: Robot encountered error(s) during script execution, stopping program
[1776862212.581336] ERROR /home/feex/git/ur_client_library/src/primary/primary_client.cpp 240: Robot error code: C286A1
[1776862212.581351] ERROR /home/feex/git/ur_client_library/src/primary/primary_client.cpp 240: Robot error code: C286A1
[1776862212.581362] ERROR /home/feex/git/ur_client_library/src/primary/primary_client.cpp 240: Robot error code: C286A1
[1776862212.581385] ERROR /home/feex/git/ur_client_library/src/primary/primary_client.cpp 240: Robot error code: C286A1
[1776862212.581397] ERROR /home/feex/git/ur_client_library/src/primary/primary_client.cpp 240: Robot error code: C286A1
[1776862212.581407] ERROR /home/feex/git/ur_client_library/src/primary/primary_client.cpp 240: Robot error code: C286A1
[1776862212.581426] ERROR /home/feex/git/ur_client_library/src/primary/primary_client.cpp 240: Robot error code: C286A1
[1776862212.581438] ERROR /home/feex/git/ur_client_library/src/primary/primary_client.cpp 240: Robot error code: C286A1
[1776862212.581453] ERROR /home/feex/git/ur_client_library/src/primary/primary_client.cpp 240: Robot error code: C286A1
[1776862212.581466] ERROR /home/feex/git/ur_client_library/src/primary/primary_client.cpp 240: Robot error code: C286A1
[1776862212.581488] ERROR /home/feex/git/ur_client_library/src/primary/primary_client.cpp 240: Robot error code: C286A1
[1776862212.581505] ERROR /home/feex/git/ur_client_library/src/primary/primary_client.cpp 240: Robot error code: C286A1
[1776862212.581516] ERROR /home/feex/git/ur_client_library/src/primary/primary_client.cpp 240: Robot error code: C304A4
[1776862212.581537] ERROR /home/feex/git/ur_client_library/src/primary/primary_client.cpp 240: Robot error code: C100A7
[1776862212.684815] INFO /home/feex/git/ur_client_library/src/primary/primary_client.cpp 262: Script with name cool_function_name started
[1776862212.684926] INFO /home/feex/git/ur_client_library/src/primary/primary_client.cpp 256: Script with name cool_function_name executed successfully
[1776862212.685579] INFO /home/feex/git/ur_client_library/src/primary/primary_client.cpp 68: Stopping primary client pipeline

Comment thread examples/primary_client.cpp Outdated
Comment thread src/primary/primary_client.cpp Outdated
Comment thread src/primary/primary_client.cpp Outdated
@URJala URJala force-pushed the primary_client_script_execution_feedback branch from 8ce73b9 to 34d20cb Compare April 23, 2026 10:21
URJala added 13 commits April 30, 2026 06:37
and add script_type to ScriptInfo struct
Reinstate the old sendScript functionality
Secondary programs are still fully supported, but the input script has to be defined as one beforehand. Relatively few things can be called in a secondary program, so if one should be executed, the user should know enough to define it as such beforehand.
@URJala URJala force-pushed the primary_client_script_execution_feedback branch from 34d20cb to 89f09ff Compare April 30, 2026 07:23
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.

2 participants