Skip to content

Add guide on how to build ROS 2 with tracing instrumentation#2877

Merged
clalancette merged 4 commits intoros2:rollingfrom
christophebedard:christophebedard/add-guide-build-ros-2-with-tracing-instrumentation
Oct 3, 2022
Merged

Add guide on how to build ROS 2 with tracing instrumentation#2877
clalancette merged 4 commits intoros2:rollingfrom
christophebedard:christophebedard/add-guide-build-ros-2-with-tracing-instrumentation

Conversation

@christophebedard
Copy link
Copy Markdown
Member

@christophebedard christophebedard commented Jul 15, 2022

Closes #2805

This guide will become invalid/unneeded if we do ros2/ros2#1177

Signed-off-by: Christophe Bedard christophe.bedard@apex.ai

@christophebedard christophebedard self-assigned this Jul 15, 2022
@christophebedard christophebedard force-pushed the christophebedard/add-guide-build-ros-2-with-tracing-instrumentation branch from 302a130 to eaf2cb2 Compare July 15, 2022 18:08
@christophebedard
Copy link
Copy Markdown
Member Author

christophebedard commented Jul 15, 2022

The guide feels too straightforward to me, but maybe I'm jumping over things that are not obvious to other people. Feedback would be really useful.

Also, should this go under Tutorials > Advanced instead?

@christophebedard christophebedard force-pushed the christophebedard/add-guide-build-ros-2-with-tracing-instrumentation branch 3 times, most recently from f327d48 to ed76331 Compare July 20, 2022 02:21
@christophebedard christophebedard force-pushed the christophebedard/add-guide-build-ros-2-with-tracing-instrumentation branch from ed76331 to 2e1788b Compare July 27, 2022 15:39
Copy link
Copy Markdown
Contributor

@clalancette clalancette left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the long delay on this one.

Overall, I think this is a good article to have. I've left two items for improvement below, then I'm happy with it.

With binary installation
^^^^^^^^^^^^^^^^^^^^^^^^

If you rely on the :ref:`ROS 2 binaries <binary-packages>`, you will need to clone the ``ros2_tracing`` repository into your workspace and build at least up to the ``tracetools`` package:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that this tutorial explicitly relies on Ubuntu elsewhere, I think it is fine to just make a :doc: reference to the Ubuntu binary installation instructions. Then we can also remove the .. _binary_packages ref in Installation.rst.

Copy link
Copy Markdown
Member Author

@christophebedard christophebedard Oct 3, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed in d12eda5. I mentioned & linked to the Debian packages and "fat" archive installation pages.

Comment on lines +86 to +90
Alternatively, to build and completely remove both the tracepoints and the tracing instrumentation from ROS 2, set the ``TRACETOOLS_DISABLED`` CMake option to ``ON``:

.. code-block:: bash

colcon build --cmake-args " -DTRACETOOLS_DISABLED=ON"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This confused me at first glance, but I think I get it now. My understanding is that if you have lttng packages installed, then tracing will automatically be built in when you build. So if you have lttng installed, but you don't want ROS 2 tracing enabled, you have to pass -DTRACETOOLS_DISABLED=ON. Is my understanding correct?

If so, you may want to make that fact a little more clear. Also, generally when we recommend cmake-args like this we also recommend --no-warn-unused-cli so there aren't warnings from all CMake packages that don't explicitly use it.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This confused me at first glance, but I think I get it now. My understanding is that if you have lttng packages installed, then tracing will automatically be built in when you build. So if you have lttng installed, but you don't want ROS 2 tracing enabled, you have to pass -DTRACETOOLS_DISABLED=ON. Is my understanding correct?

If so, you may want to make that fact a little more clear.

That is correct. Changed in ed2e5c3

Also, generally when we recommend cmake-args like this we also recommend --no-warn-unused-cli so there aren't warnings from all CMake packages that don't explicitly use it.

Changed in 48c37d9. I also removed the quotes around the CMake args and the leading space.

Closes ros2#2805

Signed-off-by: Christophe Bedard <christophe.bedard@apex.ai>
Signed-off-by: Christophe Bedard <christophe.bedard@apex.ai>
@christophebedard christophebedard force-pushed the christophebedard/add-guide-build-ros-2-with-tracing-instrumentation branch from 2e1788b to d12eda5 Compare October 3, 2022 21:12
Signed-off-by: Christophe Bedard <christophe.bedard@apex.ai>
Signed-off-by: Christophe Bedard <christophe.bedard@apex.ai>
Copy link
Copy Markdown
Contributor

@clalancette clalancette left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me!

@christophebedard Should we backport this to all of Foxy, Galactic, and Humble?

@christophebedard
Copy link
Copy Markdown
Member Author

@christophebedard Should we backport this to all of Foxy, Galactic, and Humble?

yep!

@clalancette clalancette added the backport-all backport at reviewers discretion; from rolling to all versions label Oct 3, 2022
@clalancette clalancette merged commit 2effceb into ros2:rolling Oct 3, 2022
mergify bot pushed a commit that referenced this pull request Oct 3, 2022
* Add guide on how to build ROS 2 with tracing instrumentation

Closes #2805

Signed-off-by: Christophe Bedard <christophe.bedard@apex.ai>
(cherry picked from commit 2effceb)
mergify bot pushed a commit that referenced this pull request Oct 3, 2022
* Add guide on how to build ROS 2 with tracing instrumentation

Closes #2805

Signed-off-by: Christophe Bedard <christophe.bedard@apex.ai>
(cherry picked from commit 2effceb)
mergify bot pushed a commit that referenced this pull request Oct 3, 2022
* Add guide on how to build ROS 2 with tracing instrumentation

Closes #2805

Signed-off-by: Christophe Bedard <christophe.bedard@apex.ai>
(cherry picked from commit 2effceb)
@christophebedard christophebedard deleted the christophebedard/add-guide-build-ros-2-with-tracing-instrumentation branch October 3, 2022 21:53
clalancette pushed a commit that referenced this pull request Oct 3, 2022
…3075)

* Add guide on how to build ROS 2 with tracing instrumentation

Closes #2805

Signed-off-by: Christophe Bedard <christophe.bedard@apex.ai>
(cherry picked from commit 2effceb)

Co-authored-by: Christophe Bedard <christophe.bedard@apex.ai>
clalancette pushed a commit that referenced this pull request Oct 3, 2022
…3076)

* Add guide on how to build ROS 2 with tracing instrumentation

Closes #2805

Signed-off-by: Christophe Bedard <christophe.bedard@apex.ai>
(cherry picked from commit 2effceb)

Co-authored-by: Christophe Bedard <christophe.bedard@apex.ai>
clalancette pushed a commit that referenced this pull request Oct 3, 2022
…3077)

* Add guide on how to build ROS 2 with tracing instrumentation

Closes #2805

Signed-off-by: Christophe Bedard <christophe.bedard@apex.ai>
(cherry picked from commit 2effceb)

Co-authored-by: Christophe Bedard <christophe.bedard@apex.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-all backport at reviewers discretion; from rolling to all versions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add guide on how to build ROS 2 with tracing instrumentation

2 participants