Eclipse debugging C++ ROS node which is called from launch file

Hi everyone ,

I am using eclipse to debug moveit2.
In the Moveit2 demo launch files (python):
ros2 launch run_move_group run_move_group.launch.py,
a lot of parameters (e.g. urdf robot models) are loaded from configuration files. These parameters are then parsed to the excutable (C++).

I want to use eclipse to debug the C++ executable. However, I cannot attach my debugger to the process as the launch file and therefore process is python based.
Also I cannot run the single executable:
ros2 run run_move_group run_move_group
As all the parameters are missing.

Can anyone recommend a work flow to debug C++ ROS2 nodes that are executed by python launch files in eclipse?

Thanks a lot :slight_smile:

There’s a python debugger add on for eclipse: https://www.pydev.org/

You MIGHT be able to start the exe with pydev and find a seam to connect to the C++ process and/or put a little python at the end of launch chain to make that easier and/or doable.

On more reflection… bear in mind I’m shooting from the hip here

Not sure how python launch processing code hands off to C++ exe. Could launch a new process and/or “exec” the new process in place.

In either event, find the launching python code and launch something on the order of

eclipse run_move_group <args…>

You can probably have python fill in the command line args. If not, you can manually copy them one time to eclipse “run args” entry. Or whatever it’s called.

tc

sigh… I just read the Discourse rules of engagement. Sounds like this conversation belongs in Ros answers. My apologies.
tc