Hi!
My setup:
- ** Remote PC**: ROS Indigo, Ubuntu 14.04 LTS
- ** Local PC**: ROS Indigo, Ubuntu 14.04 LTS, Qt Creator 3.0.1
I have a remote PC where I start my node using gdbserver:
user@remote:~$ gdbserver :1234 ~/catkin_ws/devel/lib/my_node/my_node
This node contains multiple SimpleActionServer-s and callbacks for each of those. All servers' flag for autostart have been set to false
(see here). I'm using this tutorial as a reference.
On my local PC I have two things (note that here and above I exclude the obvious roscore running :)):
- Qt Creator 3.01 - here I want to connect to the gdbserver on the remote and debug my node
- Publishing - using
rostopic pub ...
I publish Goal messages to my remote.
I should say that normally everything works. However when I use gdbserver the callbacks don't get activated. At first I thought it was my Qt Creator's configuration. However everything there works fine and up to the spin() point I can debug step-wise through my code. Once the spin() is reached I can only pause it (it stops at the spin function call) which tells me two things:
- The node is spinning properly
- The messages for some reason are not passed to the action server(s)
In order to investigate further I decided to call my executable on the remote machine (without Qt Creator or even gdbserver). I connected via SSH to it and ran
user@remote:~$ ~/catkin_ws/devel/lib/my_node/my_node
The node started. However every time I send a goal to it nothing happens (same behaviour as with Qt Creator).
- My first question is do I always have to run ROS nodes using rosrunor roslaunch? I guess that rosrun as well as roslaunch load some things without which a node cannot function in its full glory.
- My second question is how do I go around all that?
If I really have to use rosrun the complexity of the debugging procedure skyrockets:
- Server's callback runs in a separate thread
- Server is started as an attached child process to rosrun
- Rosrun is executed by gdbserver
- Local machine connects to remote gdbserver (however we have rosrun here so we have too hook Qt Creator to the child process of rosrun representing our node)
This seems to be an overkill so I'm guessing/hoping that I've done something weird and in fact things are much simpler...
Originally posted by rbaleksandar on ROS Answers with karma: 299 on 2015-09-14
Post score: 1