Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can ros2_tracing trace rclpy? #14

Closed
Binohow opened this issue Nov 2, 2022 · 7 comments
Closed

Can ros2_tracing trace rclpy? #14

Binohow opened this issue Nov 2, 2022 · 7 comments
Labels
question Further information is requested

Comments

@Binohow
Copy link

Binohow commented Nov 2, 2022

Hello, I want to know if ros2_tracing support to trace rclpy? Lttng tools is too weak for python.

@christophebedard christophebedard added the question Further information is requested label Nov 2, 2022
@christophebedard
Copy link
Member

Hi! Unfortunately, rclpy is not instrumented; you can only trace rclcpp.

Lttng tools is too weak for python.

What do you mean?

@christophebedard
Copy link
Member

Since this has been requested many times, I've opened an issue as a feature request: #15.

@Binohow
Copy link
Author

Binohow commented Nov 3, 2022

Hi! Unfortunately, rclpy is not instrumented; you can only trace rclcpp.

Lttng tools is too weak for python.

What do you mean?

Thanks for your answer! Can we use Lttng tracer to implement this feature? I am very interested in how to implement this function. I want to participate in this meaning work, but I don't where to start. Which tracer should I choose first?

Hello, I want to know if ros2_tracing support to trace rclpy? Lttng tools is too weak for python.

@christophebedard
Copy link
Member

LTTng can trace Python applications: https://lttng.org/docs/v2.13/#doc-python-application

@vtran5
Copy link

vtran5 commented Apr 4, 2023

Hello, maybe a related question, can ros2_tracing support rclc? If not, is there any guide on how to implement it myself? From the design document, I understand that I would need to manually add the tracepoint in rclc following the 6-step guide in the Adding instrumentation. Is there anything else that I need to do or considered? Do I need to add all the equivalent TRACEPOINT in rclcpp to rclc in order for it to work properly?

@christophebedard
Copy link
Member

It could, but it would require a bit of work. The proper way would be to design a new set of instrumentation points for rclc, since the rclcpp instrumentation might not necessarily all apply to rclc (and vice versa). Once the instrumentation is defined, you can indeed go through the Adding instrumentation section of the ros2_tracing design document to actually create the tracepoints.

Like I said, that would be the "proper" way. Also, I'm not sure if those tracepoints should be here in ros2_tracing/tracetools, since rclc is more of a separate client library.

However, you could try to just re-use the existing rclcpp tracepoints by adding them to rclc as if it was rclcpp. I did it a couple years ago with the main rclcpp tracepoints, so it might need to be updated, but it can be a good starting point: christophebedard/rclc@090a0cb. Someone also did that for rclpy: #15 (comment). This is more of a hack, though, as you can see from my comments in that rclc commit. You would probably need to process trace data coming from rclc differently compared to trace data coming from rclcpp.

@christophebedard
Copy link
Member

christophebedard commented Apr 6, 2023

Since this issue was mostly just a question, and since I've opened a standalone issue for the actual feature request (#15), I'll close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants