Performance: Launching multiple nodes
This affects the startup time and resource usage of a ROS-based system by controlling how many nodes launch simultaneously.
roslaunch my_robot staggered_nodes.launch # nodes launched in small groups or with delaysroslaunch my_robot all_nodes.launch # launches all nodes simultaneously| Pattern | CPU Usage | Memory Usage | Startup Time | Verdict |
|---|---|---|---|---|
| All nodes launched simultaneously | High spikes | High peak | Longer startup | [X] Bad |
| Nodes launched in batches or delayed | Moderate, steady | Lower peak | Faster startup | [OK] Good |
<launch> <node pkg="turtlesim" type="turtlesim_node" name="sim1" /> <node pkg="turtlesim" type="turtlesim_node" name="sim2" /> </launch>
roslaunch with this file?<launch> <node pkg="demo_pkg" type="demo_node" name="node1"> </launch>
<launch> <node pkg="pkg1" type="node1" name="node1" /> <node pkg="pkg2" type="node2" name="node2" /> <node pkg="pkg3" type="node3" name="node3" /> </launch>
use_sim_time set to true for all nodes?Pass the test and this pattern moves unknown