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

[ROS2] Revamp Callback Groups (and/or Executors) #62

Closed
amalnanavati opened this issue Aug 30, 2023 · 6 comments
Closed

[ROS2] Revamp Callback Groups (and/or Executors) #62

amalnanavati opened this issue Aug 30, 2023 · 6 comments
Assignees

Comments

@amalnanavati
Copy link
Contributor

Currently, most of our nodes use the default callback group, which only lets one topic/service/action/timer process a callback at a time. This is a huge problem, because it slows down execution and can result in some callbacks not getting called for a while because other callbacks are called first.

We should be very intentional with what executor and callback group we are using for each node and each callback within the node. See the below resources for more details:

@amalnanavati
Copy link
Contributor Author

In #56 we are doing it in a jank-y way by resetting a protected access class attribute in create_action_servers.py. There has to be a better way to do it.

@amalnanavati
Copy link
Contributor Author

#90 and ada_ros2#19 should address this, by putting all callbacks into a ReentrantCallbackGroup (allowing them all to be executed in parallel).

While this should work in theory, I'll leave this issue open so someone can go back and more intentionally consider every pair of callbacks and whether they can truly be executed in parallel or not.

@amalnanavati
Copy link
Contributor Author

Note: the ReentrantCallbackGroups appear to be too much for t0b1's and lovelace's processing powers. I am seeing jerky motions and dropped watchdog messages on t0b1, which I never saw before, and dropped watchdog messages on lovelace. Perhaps the watchdog should have its own callback group, the MoveIt object should have its own callback group, and the rest should be mutually exclusive? Because I don't think we need any of the others in parallel.

@amalnanavati
Copy link
Contributor Author

In forque_sensor_hardware as well, I'm noticing Error reading from telnet socket. and Error writing to telnet socket. on t0b1 if the sensor has been left on for > 1.5 mins. Perhaps the timer and the service should be in separate MutuallyExclusiveCallbacks, but not in a single ReentrantCallback?

@amalnanavati amalnanavati mentioned this issue Sep 15, 2023
4 tasks
@amalnanavati
Copy link
Contributor Author

#92 mostly addresses this, lingering issues will be documented there.

@amalnanavati
Copy link
Contributor Author

Closed with #92 and #94 . A lingering issue is to similarly revamp Quality of Service settings, documented in #93

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

No branches or pull requests

1 participant