Demo for ROS World 2021 talk: Tracing ROS 2 with ros2_tracing (video, slides).
In the demo, we trace a ping node and a pong node.
See launch file.
The nodes exchange N messages (ping then pong) every M milliseconds T times, and then exit.
The ping node publishes its pings on the /ping
topic and the pong node publishes its pongs on the /pong
topic, with each node subscribing to the other's messages.
We trace the nodes and analyze the trace data using a Jupyter notebook to show timer & subscription callbacks, publications, and timer & subscriptions & publisher creations over time.
- Setup system to build ROS 2 Rolling and trace
- Clone
tracetools_analysis
and this repo, and install dependenciescd ws/src git clone https://gitlab.com/ros-tracing/tracetools_analysis.git git clone https://github.com/christophebedard/ros-world-2021-demo.git cd .. pip3 install notebook bokeh
- Build
colcon build --packages-up-to ros_world_2021_demo
- Source and launch
source install/setup.bash ros2 launch ros_world_2021_demo demo.launch.py
- it should exit by itself
- alternatively, instead of executing the launch file, use the sample trace by extracting the contents of
trace.zip
into your~/.ros/tracing/
directory
- Analyze
pip3 install notebook bokeh jupyter notebook src/ros-world-2021-demo/ros_world_2021_demo/analysis/demo.ipynb
- run the whole notebook
Overall results:
Single ping-pong sequence: