-
question about spinning nodes in different threads. context from #273 The number of obstacle participants are unknown and these would only be added dynamically when a custom msg is received in a subscriber topic, i.e. since the Scour the answers.ros page and tried these but to no avail:
concurrently trying to understand the concepts behind threading too so any advice would be very helpful! I notice that the design seem to have many nodes created, eg. adapters and participants, which means each one have to be a single process. wondering if there are any limitations to this. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I'm not 100% sure if I'm interpreting your description correctly. Whenever possible, linking to the code in question is always appreciated to cut away any ambiguity in interpretation, but I'll try my best based on the impressions I'm getting. It sounds like you're creating a whole new node for each schedule participant. If so, that's not necessary at all and might cause a lot of extraneous DDS traffic for performing discovery. You can create a single You don't actually have to worry too much about threading because that's mostly taken care of for you internally by But you shouldn't need to do anything with executors. A single threaded executor should suit your use case just fine. |
Beta Was this translation helpful? Give feedback.
I'm not 100% sure if I'm interpreting your description correctly. Whenever possible, linking to the code in question is always appreciated to cut away any ambiguity in interpretation, but I'll try my best based on the impressions I'm getting.
It sounds like you're creating a whole new node for each schedule participant. If so, that's not necessary at all and might cause a lot of extraneous DDS traffic for performing discovery.
You can create a single
rmf_traffic_ros2::schedule::Writer
that's attached to a single node, and you can make as many schedule participants with that one writer as you'd like. These can be generated dynamically at any time, even in the middle of runtime.You don't a…