Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ROS 2 - Fix estop threads #249

Merged
merged 7 commits into from
Mar 25, 2024
Merged

ROS 2 - Fix estop threads #249

merged 7 commits into from
Mar 25, 2024

Conversation

pkowalsk1
Copy link
Contributor

@pkowalsk1 pkowalsk1 commented Mar 16, 2024

Changes

  • During EStop triggering, CAN communication is only used if GPIO pin manipulation fails,
  • The single-thread executor has been replaced with a multi-threaded one, enabling simultaneous handling of the e_stop_trigger and e_stop_reset services. This has helped to implement behavior where the trigger has a higher "priority" than the reset, ensuring that each trigger is immediate (unlike before, where it had to wait max. 200ms for the reset to complete). These changes should guarantee thread safety. The rest of the services are still managed in the node's default callback group, so they are not executed concurrently.

@pkowalsk1 pkowalsk1 marked this pull request as ready for review March 17, 2024 22:48
@pkowalsk1 pkowalsk1 requested review from KmakD and JanBrzyk March 25, 2024 12:07
@pkowalsk1 pkowalsk1 merged commit b952d80 into ros2-devel Mar 25, 2024
@pkowalsk1 pkowalsk1 deleted the fix-estop-threads branch March 25, 2024 14:35
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.

3 participants