Skip to content

If no new commands are received, halt#440

Open
urfeex wants to merge 1 commit intoUniversalRobots:masterfrom
urfeex:halt_on_communication_loss
Open

If no new commands are received, halt#440
urfeex wants to merge 1 commit intoUniversalRobots:masterfrom
urfeex:halt_on_communication_loss

Conversation

@urfeex
Copy link
Member

@urfeex urfeex commented Feb 17, 2026

Currently, we only exit the main loop when no new command is received anymore (already taking any configured receive timeout into account).

However, if we don't receive a new command anymore, that should always be considered an unintentional interruption of the control flow. In that case, we should stop program execution, as interrupting the communication was an unexpected error event.

If interrupting the communication in order to continue with the rest of the program was intentional, users will send a stop command. This will end the main control loop at another code branch leading to a clean shutdown of the external_control part in order to be able to continue with the rest of the program.

This should be closing #438 but in order to make sense with the ROS drivers, we would need UniversalRobots/Universal_Robots_ROS2_Driver#1678 and potentially UniversalRobots/Universal_Robots_ROS_Driver#767 before merging this.

Currently, we only exit the main loop when no new command is received
anymore (already taking any configured receive timeout into account).

However, if we don't receive a new command anymore, that should always
be considerd an unintentional interruption of the control flow. In that
case, we should stop program execution, as interrupting the
communication was an unexpected error event.

If interrupting the communication in order to continue with the rest of
the program was intentional, users will send a stop command. This will
end the main control loop at another code branch leading to a clean
shutdown of the external_control part in order to be able to continue
with the rest of the program.
@urfeex urfeex requested a review from a team February 17, 2026 15:00
@codecov
Copy link

codecov bot commented Feb 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.07%. Comparing base (08c33c3) to head (9a7c873).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #440      +/-   ##
==========================================
- Coverage   75.34%   75.07%   -0.28%     
==========================================
  Files         102      102              
  Lines        5123     5115       -8     
  Branches      544      543       -1     
==========================================
- Hits         3860     3840      -20     
- Misses        980      990      +10     
- Partials      283      285       +2     
Flag Coverage Δ
start_ursim 83.64% <ø> (-1.03%) ⬇️
ur5-3.14.3 73.18% <ø> (-0.16%) ⬇️
ur5e-10.7.0 65.13% <ø> (-0.26%) ⬇️
ur5e-5.9.4 73.46% <ø> (-0.07%) ⬇️

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
Member

@urrsk urrsk left a comment

Choose a reason for hiding this comment

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

We should add a test covering this.

@urfeex
Copy link
Member Author

urfeex commented Feb 18, 2026

We should add a test covering this.

Sounds good, I also have an idea for that in mind. It's a bit more complicated, as we need to generate a PolyScope program and require the EC URCap to run that, but it should be possible to do. I just don't know when I will have the time to spend on this.

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

Comments