Ros nodes and losing WIFI connection

asked 2016-02-17 10:39:38 -0500

NickDP gravatar image

We have a mobile device (an Odroid) with a camera that runs a ROS node that publishes the camera data. We interface the device by SSHing into it via its WiFi dongle. We want to record a dataset while moving outdoors, i.e. where the device loses its WiFi connection.

We try do this the following way:

ssh odroid@[odroid ip]
roscore &
roslaunch my_pkg camera_node.launch
[ctrl-A, d] # detach the screen
rosbag record /my_camera_topics
[ctrl-A, d] # detach the screen
[ctrl-D] # close SSH session

When we return to the WiFi area, we reconnect to the device via SSH, which has automatically re-established the network connection. We see both screens open and attaching to them shows that both the camera node and the rosbag recroding are still going on.

The problem is that the recording is incomplete. The rosbag simply ends at a point which we assume to coincide with the moment the device lost the network connection. The ROS_IP environment variable is set to the (static) IP this device has, but the problem persists if ROS_IP is left unset.

How can we record complete datasets in this kind of scenario?

edit retag flag offensive close merge delete


Would the same thing happen if you automatically started roscore and rosbag using an automated script that doesn't involve ssh'ing in and detaching?

Kurt Leucht gravatar image Kurt Leucht  ( 2016-02-19 16:35:17 -0500 )edit

Can the robot successfully ping its own hostname after the wifi is lost? ROS likes to be able to ping its own hostname.

Kurt Leucht gravatar image Kurt Leucht  ( 2016-02-19 16:37:03 -0500 )edit

Thanks for the reply. I haven't tried pinging the hostname. However, I found that the bags are (almost always) complete if I do the above procedure with ROS_IP unset and then remove the WIFI dongle. At the end of the dataset, I re-attach the dongle and SSH in to stop the logging.

NickDP gravatar image NickDP  ( 2016-02-27 07:37:02 -0500 )edit

Yes. Unsetting ROS_IP does ring a bell. I think I've had to do that before.

Kurt Leucht gravatar image Kurt Leucht  ( 2016-10-28 13:12:00 -0500 )edit