Introduction of CARET; performance analysis tool for ROS 2 applications

I’m writing this post to make it public that our performance analysis tool may help your development.

As @hsgwa presented in ROSCon 2022, ISP, EmbIV, and TIER IV are developing a performance analysis tool , named as CARET, for Autoware. You will find the presentation slide here. Document page is also available.

The tool is very similar to ros2_tracing(GitHub - ros2/ros2_tracing: Tracing tools for ROS 2.), and definitely CARET borrows some ideas from ros2_tracing. CARET serves some different features as below.

  • A few more tracepoints to trace message propagation and structure visualization
  • Flexibility to adjust scope and focus of visualization on what you want to see with Python API
  • Filtering function to exclude nodes and topics which are not targeted to trace
  • Function to turn on/off record events after launching target application (To be released at the end of this December)
    • ros2_tracing has a strong constraint which forces user to launch LTTng daemon before launching a target application, but CARET will solve it

CARET supports several types of visualization functions. The most representative one is message flow mentioned in the past thread. The message flow shows how input messages are consumed and output messages are produced in a certain data path constructed of nodes. The following figure shows a sample of message flow. If you are interested in it, please access the page.

Not only message flow, but also other visualization functions help you to find timing bugs and its cause, or implementation failure.

Beside performance analysis, it is able to visualize node diagram of your application with dear_ros_node_viewer as the following figure.

We believe that CARET is useful for ROS 2 users. Some tracepoints for CARET must be helpful also. We’d like to contribute to ROS community with adding tracepoints to main stream of the related packages. As first step, we are going to create merge requests to add tracepoints for tracing a certain message from publish to subscription.

4 Likes

Great Job!

I am following this work from when it’s in the scholar paper, seeing this Autoware_Perf: A tracing and performance analysis framework for ROS 2 applications - ScienceDirect

It really helps to analysis the performance of ros2.