How to run a node on the command line instead of from a launch file
Hi,
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.
<node
name="moveit_interface_node"
pkg="interbotix_moveit_interface"
type="moveit_interface_node"
respawn="false"
output="log"
ns="$(arg robot_name)"/>
How can I run the node in the command line (and following that in qtc for debugging purposes)?
Thanks