0
$\begingroup$

Rosanswers logo

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 .


Originally posted by chrissunny94 on ROS Answers with karma: 142 on 2020-10-27

Post score: 0


Original comments

Comment by christophebedard on 2020-10-28:
what are you looking for exactly? Are you looking for info on show to set it up + run it with LTTng?

Comment by chrissunny94 on 2020-10-28:
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 )

Comment by chrissunny94 on 2020-10-28:
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/tracecompass_ros_testcases/blob/melodic-devel/tracecompass_ros_testcases/scripts/trace.sh

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

To get it working, you need a few things:

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.


Originally posted by christophebedard with karma: 641 on 2020-10-30

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by chrissunny94 on 2020-11-01:
Awesome and a lot of Thanks Christopher

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.