Skip to content

Validating trace data#

Validating trace data#

You can check whether a recording is successful with ros2 caret check_ctf command.

ros2 caret check_ctf <path-to-trace-data>

Info

Executing the ros2 caret check_ctf command for long recorded data or recorded data of a large application takes a long time. Therefore, it is recommended to execute the ros2 caret check_ctf command on a short duration of recorded data before long-time recording.
Also, It's recommended to record and validate trace data when you build a target application, so that you can modify code to avoid the following warnings.

Info

You can ignore warnings caused by Python and libraries

Warnings due to wrong procedure#

Failed to find trace point added by caret-rclcpp#

  • Cause
    • CARET/rclcpp is not applied when you built a target application
  • Solution

Failed to find trace point added by LD_PRELOAD#

  • Cause
    • Hooked tracepoints were not found. LD_PRELOAD may be missed
  • Solution

Trace data from a package built without caret-rclcpp was detected#

  • Cause
    • Some packages (e.g. packages installed with apt) have been built without using caret-rclcpp.
  • Solution
    • Build the application with CARET (See build section)
    • If you still get this warning after checking the above, add all packages used in your application to your workspace and build using CARET.

Tracer discarded#

  • Cause
    • Trace data lost occurred while recording due to too many trace data
    • This warning will be observed in some case, especially when applying CARET to a large application
    • Details
      • LTTng session collects sampling data generated by tracepoints. Sampling data are stored into ring-buffer as explained LTTng documents. After a piece of ring-buffer is occupied, sampling data is stored into next empty piece while the occupied piece is copied to file. If there is no room to store sampling data in all pieces of ring-buffer, sampling data will be discarded.
  • Solution

Warnings due to CARET limitations#

  • CARET identifies callback functions using the following parameters. In case a node has several callback functions whose parameters are identical, such node is ignored because CARET cannot analyze it.
    • Timer callback functions: timer period
    • Subscription callback functions: topic name

Duplicate parameter callback found#

  • Cause
    • Several timer callback functions which have the same timer period exist in a node
    • In other words, rclcpp::create_timer() with the same timer period is called more than once
  • Solution (workaround)
    • Modify code to avoid using the same timer period (You can slightly change timer period value)
    • Or, this warning can be ignored unless the node needs to be analyzed

Failed to identify subscription. Several candidates were found#

  • Cause
    • Several subscription callback functions which have the same topic name exist in a node
    • In other words, rclcpp::create_subscription() with the same topic name is called more than once
  • Solution (workaround)
    • Modify code to avoid creating more than one subscription callback function with the same topic name

Multiple executors using the same callback group were detected#

  • Cause
    • A callback group is added to several executors
  • Solution
    • There is no solution at the moment. CARET uses the last executor to analyze. This warning can be ignored in most cases

Failed to find callback group#

  • Cause
    • CARET failed to bind callback groups, callbacks and executors. It mainly because of ROS 2 "service". "Service" is not supported by CARET
  • Solution
    • There is no solution at the moment. This warning can be ignored in most cases