Skip to content

Freedrive Controller - #1114

Merged
urfeex merged 57 commits into
UniversalRobots:mainfrom
VinDp:freedrive_mode
Dec 18, 2024
Merged

Freedrive Controller#1114
urfeex merged 57 commits into
UniversalRobots:mainfrom
VinDp:freedrive_mode

Conversation

@VinDp

@VinDp VinDp commented Sep 25, 2024

Copy link
Copy Markdown
Contributor

The PR aims at introducing the possibility of enabling the freedrive mode through the ROS2 driver. It relies on the implementation of a specific controller to handle it, in order to correctly deactivate other controllers and avoid unsafe jumps of the robot once the freedrive mode is switched off.

@VinDp VinDp changed the title Freedrive Mode Freedrive Controller Sep 25, 2024
@gavanderhoorn

gavanderhoorn commented Sep 25, 2024

Copy link
Copy Markdown
Contributor

Would an action be nicer, semantically?

Start of action -> enable freedrive.

Cancel action -> stop freedrive.

The goal client handle would become something similar to a 'token' or 'mutex' (not exactly, as it wouldn't be as safe or strict, but conceptually).

Concurrent goal -> reject (something/someone else already has 'control' of the freedrive mode).

Event on robot or robot-controller causes freedrive to be disengaged -> abort action (notifies client something happened). A subscriber can't do that.

it would also make it (slightly) harder for something to take over control of the robot by just spamming Bool messages.

And it would make it semantically clearer it controls some specific functionality (ie: because a custom action goal needs to be submitted, instead of a generic Bool).

@fmauch

fmauch commented Sep 25, 2024

Copy link
Copy Markdown
Contributor

Would an action be nicer, semantically?

I have to say, that makes sense! Thank you for the input :-)

@gavanderhoorn

Copy link
Copy Markdown
Contributor

One aspect that would need some thought though: time-out (ie: when should freedrive be stopped due to the client no longer 'responding').

There might be some way to exploit liveliness QoS or something, but I'm not sure how that would work with actions.

@urfeex

urfeex commented Dec 13, 2024

Copy link
Copy Markdown
Member

I just resolved the conflicts with the main branch. @VinDp is this ready to review?

@urfeex
urfeex marked this pull request as ready for review December 13, 2024 14:55

@urfeex urfeex left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think, we need to revisit the RT-compatibility, especially regarding deactivate().

Comment thread ur_controllers/doc/index.rst Outdated
Comment thread ur_controllers/include/ur_controllers/freedrive_mode_controller.hpp Outdated
Comment thread ur_controllers/include/ur_controllers/freedrive_mode_controller.hpp
Comment thread ur_controllers/include/ur_controllers/freedrive_mode_controller.hpp Outdated
Comment thread ur_controllers/include/ur_controllers/freedrive_mode_controller.hpp Outdated
Comment thread ur_controllers/src/freedrive_mode_controller.cpp Outdated
Comment thread ur_controllers/src/freedrive_mode_controller.cpp Outdated
Comment thread ur_controllers/src/freedrive_mode_controller.cpp Outdated
Comment thread ur_controllers/src/freedrive_mode_controller.cpp
Comment thread ur_controllers/src/freedrive_mode_controller.cpp Outdated
VinDp and others added 7 commits December 16, 2024 09:18
Co-authored-by: Felix Exner <feex@universal-robots.com>
…r.hpp

Co-authored-by: Felix Exner <feex@universal-robots.com>
…r.hpp

Co-authored-by: Felix Exner <feex@universal-robots.com>
Co-authored-by: Felix Exner <feex@universal-robots.com>
Co-authored-by: Felix Exner <feex@universal-robots.com>
@codecov

codecov Bot commented Dec 17, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 3.78%. Comparing base (1b121b7) to head (49c265d).
Report is 370 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff            @@
##            main   #1114      +/-   ##
========================================
+ Coverage   3.59%   3.78%   +0.19%     
========================================
  Files         13     395     +382     
  Lines        947   43449   +42502     
  Branches     152    6395    +6243     
========================================
+ Hits          34    1645    +1611     
- Misses       843   41661   +40818     
- Partials      70     143      +73     
Flag Coverage Δ
unittests 3.78% <ø> (+0.19%) ⬆️

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.

@urfeex
urfeex self-requested a review December 18, 2024 07:42

@urfeex urfeex left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This seems good to me :-)

Thank you @VinDp

@urfeex
urfeex merged commit 8d4ba94 into UniversalRobots:main Dec 18, 2024
@urfeex

urfeex commented Dec 18, 2024

Copy link
Copy Markdown
Member

@Mergifyio backport humble

@mergify

mergify Bot commented Dec 18, 2024

Copy link
Copy Markdown

backport humble

✅ Backports have been created

Details

mergify Bot pushed a commit that referenced this pull request Dec 18, 2024
This controller allows activating freedrive mode by continuously publishing an a topic

(cherry picked from commit 8d4ba94)

# Conflicts:
#	ur_robot_driver/doc/usage/controllers.rst
#	ur_robot_driver/src/hardware_interface.cpp
#	ur_robot_driver/urdf/ur.ros2_control.xacro
urfeex pushed a commit that referenced this pull request Dec 18, 2024
This controller allows activating freedrive mode by continuously publishing an a topic

(cherry picked from commit 8d4ba94)

# Conflicts:
#	ur_robot_driver/doc/usage/controllers.rst
#	ur_robot_driver/src/hardware_interface.cpp
#	ur_robot_driver/urdf/ur.ros2_control.xacro
urfeex pushed a commit that referenced this pull request Dec 18, 2024
This controller allows activating freedrive mode by continuously publishing an a topic

(cherry picked from commit 8d4ba94)

# Conflicts:
#	ur_robot_driver/doc/usage/controllers.rst
#	ur_robot_driver/src/hardware_interface.cpp
#	ur_robot_driver/urdf/ur.ros2_control.xacro
urfeex pushed a commit that referenced this pull request Dec 18, 2024
This controller allows activating freedrive mode by continuously publishing an a topic

---

Co-authored-by: Vincenzo Di Pentima <DiPentima@fzi.de>
URJala pushed a commit to URJala/Universal_Robots_ROS2_Driver that referenced this pull request Dec 20, 2024
This controller allows activating freedrive mode by continuously publishing an a topic
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.

Added freedrive mode functionality to ROS2

4 participants