Skip to content

Explicitly send MODE_STOPPED when returning control to the robot#1678

Open
urfeex wants to merge 2 commits intoUniversalRobots:mainfrom
urfeex:send_stop_on_handback_control
Open

Explicitly send MODE_STOPPED when returning control to the robot#1678
urfeex wants to merge 2 commits intoUniversalRobots:mainfrom
urfeex:send_stop_on_handback_control

Conversation

@urfeex
Copy link
Copy Markdown
Member

@urfeex urfeex commented Feb 17, 2026

This way, we can distinguish between an intentional hand-back and a communication loss

This is connected to UniversalRobots/Universal_Robots_Client_Library#438

@urfeex urfeex requested a review from a team February 17, 2026 12:49
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 17, 2026

Codecov Report

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

Files with missing lines Patch % Lines
ur_robot_driver/src/hardware_interface.cpp 0.00% 6 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##            main   #1678      +/-   ##
========================================
+ Coverage   3.59%   4.80%   +1.21%     
========================================
  Files         13      34      +21     
  Lines        947    4076    +3129     
  Branches     152     473     +321     
========================================
+ Hits          34     196     +162     
- Misses       843    3878    +3035     
+ Partials      70       2      -68     
Flag Coverage Δ
unittests 4.80% <0.00%> (+1.21%) ⬆️

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.

@urfeex urfeex added the enhancement New feature or request label Feb 17, 2026
urrsk pushed a commit to UniversalRobots/Universal_Robots_Client_Library that referenced this pull request Mar 19, 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.
Copy link
Copy Markdown
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.

Looks good. But please add a test covering this

@urfeex urfeex force-pushed the send_stop_on_handback_control branch from 4811dc8 to 588dda1 Compare March 23, 2026 09:57
@urfeex
Copy link
Copy Markdown
Member Author

urfeex commented Mar 23, 2026

Unfortunately, CI currently doesn't work for Rolling. There is work in progress to get it running again (see #1719), but for now all I can say is that the added test ran successfully on my local setup.

urfeex added 2 commits March 27, 2026 10:21
This way, we can distinguish between an intentional hand-back and a communication loss.
@urfeex urfeex force-pushed the send_stop_on_handback_control branch from 588dda1 to 1f94fcf Compare March 27, 2026 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants