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

MultiThreadedSpinner move base #1233

Closed
macstepien opened this issue Jan 23, 2023 · 3 comments
Closed

MultiThreadedSpinner move base #1233

macstepien opened this issue Jan 23, 2023 · 3 comments
Labels

Comments

@macstepien
Copy link

Hi,
I noticed that there is a commented out definition of MultiThreadedSpinner in the move_base_node.cpp. I'm wondering if there is any particular reason that it is commented out and if you are aware of any risks that come with using MultiThreadedSpinner in move_base?

To give a bit more context, in our application map can get quite large and I noticed that when the global costmap's inflation layer updates, it somehow blocks the local costmap's sensor callbacks (ObstacleLayer with LaserScan and PointCloud2) . As observation buffers are not updated, it results in an emergency stop of the robot. I noticed that using even two threads for spinning solves the problem. I'm not yet sure what exactly can block the callback queue - I haven't found anything suspicious in the inflation layer (we also have some custom costmap layers, but it seems to happen during the inflation layer update).
Thanks,
Mac

@mikeferguson
Copy link
Contributor

move_base is already multi threaded in a few spots - the planner spins up a separate planning thread and each costmap has it's own update thread. I think adding additional threads for the main loop probably has some risk since it is likely there are things touching the same data that are not appropriately locked.

@mikeferguson
Copy link
Contributor

Here is an example: #1173

@macstepien
Copy link
Author

Understood, thanks for your response!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants