ros2_tracing repository

Repository Summary

Checkout URI https://gitlab.com/ros-tracing/ros2_tracing.git
VCS Type git
VCS Version galactic
Last Updated 2021-05-06
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Packages

Name Version
ros2trace 2.3.0
tracetools 2.3.0
tracetools_launch 2.3.0
tracetools_read 2.3.0
tracetools_test 2.3.0
tracetools_trace 2.3.0

README

ros2_tracing

pipeline status codecov

Tracing tools for ROS 2.

Building

As of Foxy, these instructions also apply to an installation from the Debian packages; it will not work out-of-the-box. Also, note that tracing using ros2_tracing is not supported on non-Linux systems.

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

To enable tracing:

  1. Install LTTng (>=2.11.1) with the Python bindings to control tracing and read traces:
    $ sudo apt-get update
    $ sudo apt-get install lttng-tools lttng-modules-dkms liblttng-ust-dev
    $ sudo apt-get install python3-babeltrace python3-lttng

  1. Build (at least up to rcl & rclcpp):
    $ colcon build

  1. Source and check that tracing is enabled:
    $ source ./install/local_setup.bash
    $ ros2 run tracetools status

Disabling tracing

Alternatively, to build and disable tracing, use TRACETOOLS_DISABLED:

$ colcon build --cmake-args " -DTRACETOOLS_DISABLED=ON"

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 configured for tracing. The packages in this repo provide two options: a command and a launch file action.

The tracing directory can be configured using command/launch action parameters, or through environment variables with the following logic:

  • Use $ROS_TRACE_DIR if ROS_TRACE_DIR is set and not empty.
  • Otherwise, use $ROS_HOME/tracing, using ~/.ros for ROS_HOME if not set or if empty.

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 and the Trace action for more information.

Design

See the design document.

Packages

ros2trace

Package containing a ros2cli extension to enable tracing.

tracetools

Library to support instrumenting ROS packages, including core packages.

This package claims to be in the Quality Level 1 category, see the Quality Declaration for more details.

See the API documentation.

tracetools_launch

Package containing tools to enable tracing through launch files.

tracetools_read

Package containing tools to read traces.

tracetools_test

Package containing system tests for tracetools and the tools to support them.

tracetools_trace

Package containing tools to enable tracing.

Analysis

See tracetools_analysis.

CONTRIBUTING

Any contribution that you make to this repository will be under the Apache 2 License, as dictated by that license:

5. Submission of Contributions. Unless You explicitly state otherwise,
   any Contribution intentionally submitted for inclusion in the Work
   by You to the Licensor shall be under the terms and conditions of
   this License, without any additional terms or conditions.
   Notwithstanding the above, nothing herein shall supersede or modify
   the terms of any separate license agreement you may have executed
   with Licensor regarding such Contributions.

Contributors must sign-off each commit by adding a Signed-off-by: ... line to commit messages to certify that they have the right to submit the code they are contributing to the project according to the Developer Certificate of Origin (DCO).


Repository Summary

Checkout URI https://gitlab.com/ros-tracing/ros2_tracing.git
VCS Type git
VCS Version foxy
Last Updated 2021-03-15
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Packages

Name Version
ros2trace 1.0.5
tracetools 1.0.5
tracetools_launch 1.0.5
tracetools_read 1.0.5
tracetools_test 1.0.5
tracetools_trace 1.0.5

README

ros2_tracing

pipeline status codecov

Tracing tools for ROS 2.

Building

As of Foxy, these instructions also apply to an installation from the Debian packages; it will not work out-of-the-box. Also, note that tracing using ros2_tracing is not supported on non-Linux systems.

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

To enable tracing:

  1. Install LTTng (>=2.11.1) with the Python bindings to control tracing and read traces:
    $ sudo apt-get update
    $ sudo apt-get install lttng-tools lttng-modules-dkms liblttng-ust-dev
    $ sudo apt-get install python3-babeltrace python3-lttng

  1. Build (at least up to rcl & rclcpp):
    $ colcon build

  1. Source and check that tracing is enabled:
    $ source ./install/local_setup.bash
    $ ros2 run tracetools status

Disabling tracing

Alternatively, to build and disable tracing, use TRACETOOLS_DISABLED:

$ colcon build --cmake-args " -DTRACETOOLS_DISABLED=ON"

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 configured for tracing. 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.

Packages

ros2trace

Package containing a ros2cli extension to enable tracing.

tracetools

Library to support instrumenting ROS packages, including core packages.

This package claims to be in the Quality Level 1 category, see the Quality Declaration for more details.

See the API documentation.

tracetools_launch

Package containing tools to enable tracing through launch files.

tracetools_read

Package containing tools to read traces.

tracetools_test

Package containing system tests for tracetools and the tools to support them.

tracetools_trace

Package containing tools to enable tracing.

Analysis

See tracetools_analysis.

CONTRIBUTING

Any contribution that you make to this repository will be under the Apache 2 License, as dictated by that license:

5. Submission of Contributions. Unless You explicitly state otherwise,
   any Contribution intentionally submitted for inclusion in the Work
   by You to the Licensor shall be under the terms and conditions of
   this License, without any additional terms or conditions.
   Notwithstanding the above, nothing herein shall supersede or modify
   the terms of any separate license agreement you may have executed
   with Licensor regarding such Contributions.

Contributors must sign-off each commit by adding a Signed-off-by: ... line to commit messages to certify that they have the right to submit the code they are contributing to the project according to the Developer Certificate of Origin (DCO).


Repository Summary

Checkout URI https://gitlab.com/ros-tracing/ros2_tracing.git
VCS Type git
VCS Version master
Last Updated 2021-10-14
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

README

ros2_tracing

pipeline status codecov

Tracing tools for ROS 2.

Overview

ros2_tracing provides tracing instrumentation for the core ROS 2 packages. It also provides tools to configure tracing through a launch action and a ros2 CLI command.

ros2_tracing currently only supports the LTTng tracer. Consequently, it currently only supports Linux.

Building

As of Foxy, these instructions also apply to an installation from the Debian packages; it will not work out-of-the-box.

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

To enable tracing:

  1. Install LTTng (>=2.11.1) with the Python bindings to control tracing and read traces:
    $ sudo apt-get update
    $ sudo apt-get install lttng-tools lttng-modules-dkms liblttng-ust-dev
    $ sudo apt-get install python3-babeltrace python3-lttng

  1. Build:
    • If you've already built ROS 2 from source before installing LTTng, you will need to re-build at least up to tracetools:
        $ colcon build --packages-up-to tracetools --cmake-force-configure

* If you rely on the ROS 2 binaries (Debian packages, release binaries, or prerelease binaries), you will need to clone this repo into your workspace and build at least up to `tracetools`:
        $ cd src/
        $ git clone https://gitlab.com/ros-tracing/ros2_tracing.git
        $ cd ../
        $ colcon build --packages-up-to tracetools

  1. Source and check that tracing is enabled:
    $ source ./install/setup.bash
    $ ros2 run tracetools status
    Tracing enabled

Disabling tracing

Alternatively, to build and disable tracing, use TRACETOOLS_DISABLED:

$ colcon build --cmake-args " -DTRACETOOLS_DISABLED=ON"

This will remove all instrumentation from the core ROS 2 packages, and thus they will not depend on or link against the shared library provided by the tracetools package.

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 configured for tracing. The packages in this repo provide two options: a command and a launch file action.

The tracing directory can be configured using command/launch action parameters, or through environment variables with the following logic:

  • Use $ROS_TRACE_DIR if ROS_TRACE_DIR is set and not empty.
  • Otherwise, use $ROS_HOME/tracing, using ~/.ros for ROS_HOME if not set or if empty.

Additionally, make sure that the tracing group exists and that your user is added to it.

# Create group if it doesn't exist
$ sudo groupadd -r tracing
# Add user to the group
$ sudo usermod -aG tracing $USER

Trace command

The first option is to use the ros2 trace command.

$ ros2 trace

If you encounter an error here, make sure to add your user to the tracing group.

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 and the Trace action for more information.

Design

See the design document.

Packages

ros2trace

Package containing a ros2cli extension to enable tracing.

tracetools

Library to support instrumenting ROS packages, including core packages.

This package claims to be in the Quality Level 1 category, see the Quality Declaration for more details.

See the API documentation.

tracetools_launch

Package containing tools to enable tracing through launch files.

tracetools_read

Package containing tools to read traces.

tracetools_test

Package containing tools for tracing-related tests.

tracetools_trace

Package containing tools to enable tracing.

test_tracetools

Package containing unit and system tests for tracetools.

Analysis

See tracetools_analysis.

CONTRIBUTING

Any contribution that you make to this repository will be under the Apache 2 License, as dictated by that license:

5. Submission of Contributions. Unless You explicitly state otherwise,
   any Contribution intentionally submitted for inclusion in the Work
   by You to the Licensor shall be under the terms and conditions of
   this License, without any additional terms or conditions.
   Notwithstanding the above, nothing herein shall supersede or modify
   the terms of any separate license agreement you may have executed
   with Licensor regarding such Contributions.

Contributors must sign-off each commit by adding a Signed-off-by: ... line to commit messages to certify that they have the right to submit the code they are contributing to the project according to the Developer Certificate of Origin (DCO).


Repository Summary

Checkout URI https://gitlab.com/ros-tracing/ros2_tracing.git
VCS Type git
VCS Version eloquent
Last Updated 2020-10-14
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Packages

Name Version
ros2trace 0.2.12
tracetools 0.2.12
tracetools_launch 0.2.12
tracetools_read 0.2.12
tracetools_test 0.2.12
tracetools_trace 0.2.12

README

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 LTTng**. Recommended: `>=2.10.10` or `>=2.11.1`. Check version with `lttng --version`.  
   On Ubuntu, use the above PPA. On other distros, [build from source](https://lttng.org/docs/v2.10/#doc-building-from-source), making sure to also [build the Python bindings](https://github.com/lttng/lttng-tools#building).
  1. Build
    $ colcon build

  1. 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.

CONTRIBUTING

No CONTRIBUTING.md found.

Repository Summary

Checkout URI https://gitlab.com/ros-tracing/ros2_tracing.git
VCS Type git
VCS Version dashing
Last Updated 2020-03-04
Dev Status DEVELOPED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Packages

Name Version
ros2trace 0.2.12
tracetools 0.2.12
tracetools_launch 0.2.12
tracetools_read 0.2.12
tracetools_test 0.2.12
tracetools_trace 0.2.12

README

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 LTTng**. Recommended: `>=2.10.10` or `>=2.11.1`. Check version with `lttng --version`.  
   On Ubuntu, use the above PPA. On other distros, [build from source](https://lttng.org/docs/v2.10/#doc-building-from-source), making sure to also [build the Python bindings](https://github.com/lttng/lttng-tools#building).
  1. Build
    $ colcon build

  1. 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.

CONTRIBUTING

No CONTRIBUTING.md found.