Released Continuous integration Documented
If your robot loses connection to the base station it will stop motors or navigate home.
- Maintainer status: maintained
- Maintainer: Daniel Snider <danielsnider12 AT gmail DOT com>
- Author: Daniel Snider <danielsnider12 AT gmail DOT com>
- License: Unlicense
- Source: git https://github.com/danielsnider/lost_comms_recovery.git (branch: master)
If your robot loses connection to the base station it will navigate to a configurable home. The base station connection check uses ping to a configurable list of IPs.
$ sudo apt-get install ros-kinetic-lost-comms-recovery
$ roslaunch lost_comms_recovery lost_comms_recovery.launch ips_to_monitor:=192.168.1.2
This node is not real-time safe. The monitoring loop waits 3 seconds between checks.
If move_base is running
If move_base is running, an autonomous recovery navigation will take place. The default position of the recovery goal is the origin (0,0) of the frame given it the goal_frame_id param and the orientation is all 0s by default. This default pose can be overridden if a messaged is published on the recovery_pose topic. If move_base is already navigating to a goal it will not be interrupted and recovery navigation will happen when move_base is idle.
If move_base is not running
If move_base is not running when communication failure occurs then motors and joysticks are set to zero by publishing a zero geometry_msgs/Twist message and a zero sensor_msgs/Joy message.
Important: Instead of relying on this this feature, you're better off with motor control software that sets zero velocity after a certain amount of time not receiving any new commands.
Actions Calledmove_base (move_base_msgs/MoveBaseAction)
- The move_base action server performs the autonomous recovery navigation.
Subscribed Topicsrecovery_pose (geometry_msgs/PoseWithCovarianceStamped)
- A pose that the robot will recover to if communication to the base station is lost. This will override the default recovery goal which is to the origin (0,0) of the goal_frame_id param.
Published Topicscmd_vel (geometry_msgs/Twist)
- Send a zero Twist message on this topic when communication to the base station is lost.
- Send a zero Joy message on this topic when communication to the base station is lost.
Parameters~goal_frame_id (string, default: map)
- The tf frame for move_base goals.
- Number of pings that must fail for communication to be considered lost. Each ping waits 1 second for a response.
- Comma separated list of IPs to monitor using ping.
Use in the University Rover Competition (URC)
This functionality is helpful for the autonomous task of the University Rover Competition (URC) and we hope this helps you.
$ roslaunch lost_comms_recovery lost_comms_recovery.launch ips_to_monitor:=192.168.190.136 [INFO] Monitoring base station on IP(s): 192.168.190.136. [INFO] Connected to base station. [INFO] Connected to base station. ... [ERROR] No connection to base station. [INFO] Executing move_base goal to position (x,y) 0.0, 0.0. [INFO] Initial goal status: PENDING [INFO] This goal has been accepted by the simple action server [INFO] Final goal status: SUCCEEDED [INFO] Goal reached.