ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I'd suggest you change topology.
Why not having a single thread manage all the ROS messaging and then dispatching relevant information to the relevant processing thread?
As to say:
You should already be faced with the problem of how to pass data from your actual threads A and B to C (motion planner needs to know about legs and humans from A and B right?), so adding to this doesn't really over-complicate it.
I suggest you have a look at the ZeroMQ messaging library. It will allow you to easily shuffle messages back and forth from your threads, and make the program a little easier to both code and maintain.