No description
Find a file
2019-11-16 15:20:55 -08:00
doc Add ros2trace_analysis to design document 2019-10-13 15:27:22 -07:00
ros2trace 0.2.9 2019-10-18 10:12:22 -07:00
tracetools Move tracepoint provider name to tracepoint macro 2019-11-14 14:24:18 -08:00
tracetools_launch 0.2.9 2019-10-18 10:12:22 -07:00
tracetools_read 0.2.9 2019-10-18 10:12:22 -07:00
tracetools_test Update style in test_service 2019-11-16 15:20:55 -08:00
tracetools_trace Add new rclcpp_subscription_init tracepoint to list 2019-11-14 14:35:07 -08:00
.gitignore Resolve "Add option to compile out LTTng entirely" 2019-07-30 14:27:36 +00:00
.gitlab-ci.yml Import instrumented branches from source for re-compilation 2019-10-18 20:06:30 -07:00
all.repos Add schedule-only job that builds everything from source 2019-08-11 12:17:20 +02:00
instrumentation.repos Update repo URLs after move to micro-ROS/ 2019-07-09 07:58:18 +00:00
instrumented.repos Import instrumented branches from source for re-compilation 2019-10-18 20:06:30 -07:00
LICENSE Add license file 2019-06-18 08:53:46 +02:00
README.md Add launch tracing example 2019-10-13 15:29:21 -07:00

tracetools

Tracing tools for ROS 2.

Building

If the TRACETOOLS_DISABLED option is enabled during build or if LTTng is not found, then this package will not do anything.

To enable tracing:

  1. Install LTTng with the Python bindings to control tracing and read traces:
    $ sudo apt-add-repository ppa:lttng/stable-2.10
    $ sudo apt-get update
    $ sudo apt-get install lttng-tools lttng-modules-dkms liblttng-ust-dev
    $ sudo apt-get install python3-babeltrace python3-lttng
    
    Note: the LTTng stable 2.10 PPA is used to get newer versions of the packages.
  2. Build
    $ colcon build
    
  3. Source and check that tracing is enabled:
    $ source ./install/local_setup.bash
    $ ros2 run tracetools status
    

Tracing

The steps above will not lead to trace data being generated, and thus they will have no impact on execution. LTTng has to be enabled. The packages in this repo provide two options.

Trace command

The first option is to use the ros2 trace command.

$ ros2 trace

By default, it will enable all ROS tracepoints and a few kernel tracepoints. The trace will be written to ~/.ros/tracing/session-YYYYMMDDHHMMSS. Run the command with -h for more information.

Launch file trace action

Another option is to use the Trace action in a launch file along with your Node action(s). This way, tracing happens when launching the launch file.

$ ros2 launch tracetools_launch example.launch.py

See this example launch file for more information.

Design

See the design document.