valgrind-based debugging component node in ROS2

asked 2021-10-06 13:19:58 -0500

HiroIshida gravatar image

How can I debug node inside component container by valgrind in ROS2?

When we use component node, it seems not possible to start with some prefix (e.g. valgrind, gdb). When I debug with gdb component container, I can just attach gdb to existing process, but with valgrind it's not possible.

One reasonable workaround maybe separating component out, and running each node as a single process with valgrind prefix. However, in my case unfortunately, the runtime error causes only when I run the node as a component node, and works without errors when I run as a independent node.

edit retag flag offensive close merge delete


I haven't checked this, but have you tried running the entire container with the valgrind or gdb prefix?

ChuiV gravatar image ChuiV  ( 2021-10-07 20:40:24 -0500 )edit