ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

LTTNg tracetools examples with ROS1

asked 2020-10-27 21:57:12 -0500

updated 2021-04-23 08:55:25 -0500

miura gravatar image

Greetings ,

I have been trying to make sense of using LTTNg along with some C++ ROS scripts . I stumbled upon the following ,

https://github.com/boschresearch/ros1_tracetools

If anyone has worked on tracing kindly share some insights .

Some basic PUB-SUB examples would be enough

For future reference , there are relevant articles i have come across .

  1. https://christophebedard.com/ros-tracing-message-flow/
  2. https://github.com/christophebedard/tracecompass_ros_testcases
  3. https://lttng.org/blog/2018/03/21/lttng-scope-0.3-a-basic-tutorial/ , THIS IS WHAT REALLY HELPED ME TOWARD THE END

I made a screen recording of how the above example can be run , hope it is helpful to someone https://youtu.be/fRDO-b5A4CM

Relevant tools

  1. https://lttng.org/files/lttng-scope

  2. https://babeltrace.org/

I understand that , there is an official package on this for ROS2 . (as ROS2 is build with RT in mind)

Kindly share anything on this topic .

edit retag flag offensive close merge delete

Comments

what are you looking for exactly? Are you looking for info on show to set it up + run it with LTTng?

christophebedard gravatar image christophebedard  ( 2020-10-28 15:29:45 -0500 )edit

Hi @christophebedard thanks for responding , I guess you are the right person for this .

Anyhow what i would like is some info into how to run this with a simple Publisher/Subscriber .

My current understanding is we have to place ROS::TRACE commands is at critical break points . (Similar to how one would place ROS_INFO , for debug purpose )

chrissunny94 gravatar image chrissunny94  ( 2020-10-28 19:51:50 -0500 )edit

I did a lot of digging and didnt find any modifications with the C++ code with these examples you have provided . But everything seems to be happening from the script itself .

I guess this is where my confusion is .

https://github.com/christophebedard/t...

chrissunny94 gravatar image chrissunny94  ( 2020-10-28 19:56:36 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-10-30 15:46:03 -0500

To get it working, you need a few things:

  • LTTng https://lttng.org/docs/
  • a few repos, as listed in this file: https://github.com/christophebedard/t...
    • modified ROS code that includes the tracing instrumentation: see the ros_comm and roscpp_core repos in the tracing.repos file
    • tracetools, i.e. what actually calls LTTng; this is used/called by the modified ROS code (see tracing.repos file)
    • some ROS user code, e.g. my examples/test cases repo

My current understanding is we have to place ROS::TRACE commands is at critical break points . (Similar to how one would place ROS_INFO , for debug purpose )

Not really. The instrumentation is only for ROS itself, e.g. to provide information about message publication and subscription. You do not need to modify your own code for this. You just need to use the modified/instrumented ROS code and trace it all.

And it is not a replacement for ROS_INFO. If that's what you want, you should consider other solutions.

But everything seems to be happening from the script itself . I guess this is where my confusion is .

As for actually tracing everything, your nodes/ROS is just an application that can be traced using LTTng. Therefore you should check out the LTTng documentation: https://lttng.org/docs/. The trace.sh script is just a simple script that uses LTTng commands (through another script) to enable the right tracepoints, start tracing, run a given application, and stop tracing + cleanup.

edit flag offensive delete link more

Comments

Awesome and a lot of Thanks Christopher

chrissunny94 gravatar image chrissunny94  ( 2020-11-01 19:49:28 -0500 )edit

Question Tools

3 followers

Stats

Asked: 2020-10-27 21:57:12 -0500

Seen: 308 times

Last updated: Oct 30 '20