ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Yeah both options are valid, and if you go down the threading option, you might avoid writing some of the thread creation logic by using a MultiThreadedExecutor.

Personally I think I might vote for option 1 in this case if you aren't insanely resource constrained. I've been finding small, single-threaded, single-purpose nodes to be easier to debug and reason about and it avoids you needing to consider any multi-threaded locking mechanisms in your code (which are easy to get wrong). If you're already running Python on your target system you probably don't need to worry too much about the small overhead of an extra ROS node vs combining into a single node.