ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I don't think it would be possible to use the launch-prefix
route to get what you want. For vgdb
to work, your node needs to be loaded into Valgrind, which will then start its own gdb
server. The gdb
session would then connect to that server. launch-prefix
just takes the full path to the node roslaunch
would normally start, prefixes it with your set prefix (ie: gdb ..
), appends some parameters and the starts the entire command.
In your case it would seem Valgrind should be started with your node, with gdb
connecting after that. Problem is that launch-prefix
does not support that scenario. Valgrind could perhaps run in the background, but that is not how launch-prefix
is supposed to work.
A work-around (for now, until someone comes up with a better way) could be to not launch your node through a launch file, but separately from the command line. The rest of your system could still be configured and setup using a launch file of course.
Another approach which might work is to use a wrapper bash script. That script would take care of starting Valgrind and gdb
, and you'd use the wrapper script as a launch-prefix
. That would allow you to start your entire system using a launch file.
2 | No.2 Revision |
I don't think it would be possible to use the launch-prefix
route to get what you want. For vgdb
to work, your node needs to be loaded into Valgrind, which will then start its own gdb
server. The gdb
session would then connect to that server. launch-prefix
just takes the full path to the node roslaunch
would normally start, prefixes it with your set prefix (ie: gdb ..
), appends some parameters and the starts the entire command.
In your case it would seem Valgrind should be started with your node, with gdb
connecting after that. Problem is that launch-prefix
does not support that scenario. Valgrind could perhaps run in the background, but that is not how launch-prefix
is supposed to work.
A work-around (for now, until someone comes up with a better way) could be to not launch your node through a launch file, but separately from the command line. The rest of your system could still be configured and setup using a launch file of course.
Another approach which might work is to use a wrapper bash script. That script would take care of starting Valgrind and gdb
, and you'd use the wrapper script as a launch-prefix
. That would allow you to start your entire system using a launch file.