Open aadi-mishra opened 2 weeks ago
I always used it just like with all nodes started via ros2 launch:
In the entry where you create the Node for the controller manager just add:
prefix=['xterm -e gdb -ex run --args']
and make sure you have xterm installed.
The controllers are loaded as plugins into the controller manager process.
Hi @firesurfer ! You are right that this works for all other ROS2 nodes but this does not work with ROS2 Controller plugins as a spawner node is used to load them from my understanding and spawner is written in python.
Yes but the spawner just tells the node in which the controller manager runs what to load. So you want to attach the debugger (in your preferred way) to the controller manager.
Hi All!
I am working on developing custom controllers using Controller Interface and am currently looking for a way to attach gdb with the ros2 controllers in order to be able to debug. I have used gdb before with ROS2 nodes, However, in the case of ros2 controllers, the controllers are created as plugin and are initialized through spawner. Hence, I am not really sure how to achieve this. Any suggestions is appreciate.
@bmagyar @christophfroehlich
Thanks!