Ask Your Question

How to run a node on the command line instead of from a launch file

asked 2019-12-23 20:12:19 -0500

Avner gravatar image


I have a roslaunch scripts that launches several nodes.
I want to debug one of the nodes, that maps to an executable, with qtc (or gdb). For example, place a breakpoint at a specific line.
I thought to:
- open the node seperatly in qtc and build it
- kill the original node that was launched from the launch file
- run the executable via qtc, with the same arguments that I the original node runs with.

To find the arguments that the original node runs with I do:

ps aux | grep moveit_interface_node
avnerm   22192  0.3  0.9 1052892 75676 ?       Ssl  17:28   0:06 /home/avnerm/interbotix_ws/devel/lib/interbotix_moveit_interface/moveit_interface_node __name:=moveit_interface_node __log:=/home/avnerm/.ros/log/ab204e42-25ec-11ea-9d6e-74d02b912ce1/rx150-moveit_interface_node-9.log

I kill the original process

kill -9 22192

Before running via qtc, I want to run the node directly from the command line (not via roslaunch)

/home/avnerm/interbotix_ws/devel/lib/interbotix_moveit_interface/moveit_interface_node __name:=moveit_interface_node __log:=/home/avnerm/.ros/log/ab204e42-25ec-11ea-9d6e-74d02b912ce1/rx150-moveit_interface_node-9.log

But I am get a runtime error: "Robot model parameter not found! Did you remap 'robot_description'?"
In the launch file, there is a namespace parameter ns="$(arg robot_name)"
This parameter is not shown in the process list (when doing "ps aux | grep moveit_interface_node")
I suspect that this is setting is missing when running directly in the command line.

    ns="$(arg robot_name)"/>

How can I run the node in the command line (and following that in qtc for debugging purposes)?


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-12-23 20:28:02 -0500

Avner gravatar image

adding the parameter __ns:=rx150 solved the problem

/home/avnerm/interbotix_ws/devel/lib/interbotix_moveit_interface/moveit_interface_node \
 __name:=moveit_interface_node \
 __log:=/home/avnerm/.ros/log/ab204e42-25ec-11ea-9d6e-74d02b912ce1/rx150-moveit_interface_node-9.log \
edit flag offensive delete link more


It may be easier to use the launch-prefix attribute in your .launch file. See How to Roslaunch Nodes in Valgrind or GDB.

gvdhoorn gravatar image gvdhoorn  ( 2019-12-24 03:24:40 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2019-12-23 20:12:19 -0500

Seen: 67 times

Last updated: Dec 23 '19