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 abstraction needs a (multithreaded) executor to add nodes to #548

Open
ddengster opened this issue May 27, 2020 · 2 comments
Open

ROS abstraction needs a (multithreaded) executor to add nodes to #548

ddengster opened this issue May 27, 2020 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@ddengster
Copy link

So I'm having issues whereby if create a subscriber, then I create a publisher and call publish() onto the same topics using the same node I will hit a deadlock. The fix I know of is to make a separate executor and add nodes to it ala this commit:

moveit/moveit2@a0c5c9c

This should be considered a workaround.

And also from this old PR: #197 it seems there was a ros_abstraction function that added nodes to the executor but it was removed. Perhaps it's time to put it back in?

I've also noted that we use a SinglethreadedExecutor that spins in a update function at 100ms. This essentially impacts response timings. Perhaps we should use a MultithreadedExecutor and spin it on a thread?

@ddengster ddengster changed the title ROS2 abstraction needs a (multithreaded) executor to add nodes to ROS abstraction needs a (multithreaded) executor to add nodes to May 27, 2020
@sloretz
Copy link
Contributor

sloretz commented Jun 25, 2020

@wjwwood friendly ping :)

@wjwwood
Copy link
Member

wjwwood commented Aug 20, 2020

I don't know if we can use a multi-threaded spinner because I think there are some interactions with Qt that assume it's all happening in the main thread.

Instead I think that displays should have their own executor (as a group or individually). We already worked around something like this in #551 which involved creating a new node.

With ros2/rclcpp#1218 we will have the ability to make new executors (therefore have more threads) as needed.

If someone wants to try any of these strategies to improve things then that would be appreciated but they will need to test it extensively to shake out any race conditions, especially if the idea is to try the multi-threaded executor approach (not my first choice).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants