Skip to content

Demo for ROS World 2021 talk: Tracing ROS 2 with ros2_tracing

Notifications You must be signed in to change notification settings

christophebedard/ros-world-2021-demo

Repository files navigation

ros-world-2021-demo

Demo for ROS World 2021 talk: Tracing ROS 2 with ros2_tracing (video, slides).

Demo

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.

Instructions

  1. Setup system to build ROS 2 Rolling and trace
  2. Clone tracetools_analysis and this repo, and install dependencies
    cd 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
  3. Build
    colcon build --packages-up-to ros_world_2021_demo
  4. 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
  5. Analyze
    pip3 install notebook bokeh
    jupyter notebook src/ros-world-2021-demo/ros_world_2021_demo/analysis/demo.ipynb
    • run the whole notebook

Results

Overall results:

Single ping-pong sequence: