In my ROS World talk yesterday about ros2_tracing
, Tracing ROS 2 with ros2_tracing
, I showed a demo and linked to a tutorial, so I thought I’d share here as well.
The demo is here: GitHub - christophebedard/ros-world-2021-demo: Demo for ROS World 2021 talk: Tracing ROS 2 with ros2_tracing. A ping node and a pong node exchange sequences of ping<–>pong messages periodically using a timer. By tracing it using ros2_tracing
and analyzing the trace data using tracetools_analysis
in a Jupyter notebook, we can plot timer & subscription callbacks, publications, and timer & subscriptions & publisher initializations over time:
And this is only the beginning! In the future (), using instrumentation from the middleware, we’ll be able to actually track messages across nodes and be able to compute higher-level metrics. If that sounds interesting to you, check out this recent thread: Consideration of performance measurement methods.
There’s also a tutorial in the Real-Time Working Group documentation guiding you through using ros2_tracing
to trace and analyze a performance_test experiment: How to use ros2_tracing to trace and analyze an application — ROS 2 Real-Time Working Group documentation. The tutorial assumes you’re running this on a real-time Linux kernel, but you can also run it just fine on a normal Ubuntu system using the provided alternative command.
As always, if you encounter any issues or have any feedback you’d like to share, please open an issue!