-
Notifications
You must be signed in to change notification settings - Fork 126
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
Enabling multithreading #312
Comments
Hello @bjv-capra, If you check the middleware CMake, right now in Regarding the other two flags, you don't need to set them because they have default values. But as long as you are not going to use the shared memory feature, you can set then to zero to save static memory. |
I think I've got it, however, I've run into an issue with the tracetools not liking my
I've never had this issue before...
Do you prefer if I open a new issue regarding this? I haven't been able to verify that it builds correctly yet. |
Yes please, open a new issue for that explaining the steps to reproduce the issue (your CMake toolchain, steps, compiler version...) |
I'm reopening the issue as I'm not being able to run under the intended use. I've enabled multithreading, however, I still see the following limitations. 1 Node simply checking status (pinging the agent and other basic stuff, plus providing the setup) |
If I make the nodes initialize one by one (after the support), and if I remove the periodic ping to the agent, then it seems to work fine, however, this worked the same without multithreading enabled. |
If you initialize the nodes in a thread and then launch the multiple threads for spinning the executors, it works as expected? |
BTW ping feature is not thread-safe:
Let me annotate this in our TODO list, I will come back when we find a solution. CC: @Acuadros95 |
I'd say, most likely, I don't have a way to check, however, I'm making sure the nodes are initialized sequentially (which would happen if I do it in a single thread). |
Okay, that was what I was thinking, maybe I should just put on hold the ping feature until it's thread-safe |
Thanks for the quick response! I'll get back soon with some results :). I'll close the issue in the meantime |
Cool, we are looking forward to hearing your feedback. If you have any other problems please tell us and we will try to improve de functionality asap. |
Update: We are working on this issue on the following PR. After it is merged the ping functionality should be thread safe, along with all the transport communications. |
Awesome, thanks for the quick response |
eProsima/Micro-XRCE-DDS-Client#234 merged, please rebuild your micro-ROS libraries and tell us if everything works as expected |
I'm not following on #180 as not to stack deep down that thread something irrelevant.
I have some questions regarding what do the different flags really mean when enabling multithread support.
Even though I want to run multiple nodes, as it is right now, I don't need them to communicate between them. Thus, can I then not enable UCLIENT_PROFILE_SHARED_MEMORY? Furthermore, as I won't have nodes communicating between them, and if the
SHARED_MEMORY
is disabled, do I need to set anything for these two flags?My use case would be the following
1 Node simply checking status (pinging the agent and other basic stuff, plus providing the setup)
1 Node with a subscriber
1 Node with a publisher and a subscriber
1 Node with a subscriber
This could also increase later, but as it's right now, the nodes are simply used as peripherals, they don't have any logic themselves.
I think I know what needs to be modified and taken into account on the
colcon.meta
, and how to adjust thermw
to support the entities + nodes, etc.Thanks
The text was updated successfully, but these errors were encountered: