No description
Find a file
2020-02-26 16:05:41 -05:00
doc Update analysis architecture diagram after moving ownership of DataModel 2020-01-01 00:21:30 -05:00
ros2trace Expose context enabling through CLI and Trace action 2020-01-01 14:12:23 -05:00
tracetools Move some parameter handling to tracepoint definition file 2019-12-14 11:20:53 -08:00
tracetools_launch Add logs for trace action init and fini 2020-01-08 12:41:53 -05:00
tracetools_read 0.2.12 2019-12-09 13:18:31 -08:00
tracetools_test Merge and update service test to cover callback registration 2020-02-08 19:23:05 -05:00
tracetools_trace Convert lists of event & context names to sets 2020-01-18 21:21:23 -05: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
instrumented.repos Revert "Point instrumented rclcpp branch to service callback registration fix" 2020-02-26 16:05:41 -05:00
LICENSE Add license file 2019-06-18 08:53:46 +02:00
README.md Add CI badge in README 2020-01-26 11:39:36 -05:00
tracing.repos Add new repo file with just the tracing stuff. 2019-12-05 07:41:39 +00:00

ros2_tracing

pipeline status

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
    
    Notes:
    • Version 2.10.7 or above is required for all LTTng packages. On Ubuntu, use the above PPA. On other distros, build from source, making sure to also build the Python bindings.
    • LTTng 2.11 has not been tested yet.
  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.

Analysis

See tracetools_analysis.