Documentation Status

Cannot load information on name: follow_waypoints, distro: electric, which means that it is not yet in our index. Please see this page for information on how to submit your repository to our index.
Cannot load information on name: follow_waypoints, distro: fuerte, which means that it is not yet in our index. Please see this page for information on how to submit your repository to our index.
Cannot load information on name: follow_waypoints, distro: groovy, which means that it is not yet in our index. Please see this page for information on how to submit your repository to our index.
Cannot load information on name: follow_waypoints, distro: hydro, which means that it is not yet in our index. Please see this page for information on how to submit your repository to our index.
Cannot load information on name: follow_waypoints, distro: indigo, which means that it is not yet in our index. Please see this page for information on how to submit your repository to our index.
Cannot load information on name: follow_waypoints, distro: jade, which means that it is not yet in our index. Please see this page for information on how to submit your repository to our index.

Package Summary

Released Continuous integration Documented

The follow_waypoints node will listen for waypoints given as poses and when instructed will follow them one by one by publishing goals to move_base.

Cannot load information on name: follow_waypoints, distro: lunar, which means that it is not yet in our index. Please see this page for information on how to submit your repository to our index.

Overview

This package will buffer move_base goals until instructed to navigate to all waypoints in sequence.

Follow Waypoints

Quick Start

1. Install:

$ sudo apt-get install ros-kinetic-follow-waypoints

2. Launch:

$ roslaunch follow_waypoints follow_waypoints.launch

3. Create waypoints:

Use RViz’s "2D Pose Estimate" tool to create waypoints with mouse clicks.

4. Execute waypoint following:

$ rostopic pub /path_ready std_msgs/Empty -1

Usage

To set waypoints you can either publish a ROS PoseWithCovarianceStamped message to the /initialpose topic directly or use RViz’s tool "2D Pose Estimate" to click anywhere. To visualize the waypoints as pink arrows in RViz, configure RViz to display the topic /current_waypoints which is published by follow_waypoints and must be subscribed to in Rviz as a PoseAarray type.

To initiate waypoint following send a "path ready" message.

$ rostopic pub /path_ready std_msgs/Empty -1

To clear the waypoint queue send a "path reset" message.

$ rostopic pub /path_reset std_msgs/Empty -1

Nodes

follow_waypoints

Actions Called

move_base (move_base_msgs/MoveBaseAction)
  • The move_base action server performs navigation for each goal.

Subscribed Topics

waypoints (geometry_msgs/PoseWithCovarianceStamped)
  • Message containing one waypoint. RViz can be configured to publish clicks as this message type.
path_ready (std_msgs/Empty)
  • Message that will initiate waypoint following.
path_reset (std_msgs/Empty)
  • Message that will clear the queue of waypoints.

Published Topics

waypoints (geometry_msgs/PoseArray)
  • Message containing all waypoints in the current queue. This is useful for displaying waypoints in RViz.

Parameters

~goal_frame_id (string, default: map)
  • The tf frame for move_base goals.

Detailed Description

The follow_waypoints package uses actionlib to send the goals to move_base.

The code for follow_waypoints is structured as a barebones state machine. For this reason it is easy to add to the script complex behavior controlled by defined transitions (ie. a state machine). For modifying the script to be an easy task, you should learn about the Python state machine library in ROS called smach. The state transitions in the script occur in the order GET_PATH, FOLLOW_PATH, and PATH_COMPLETE and then they repeat.

Use Case

Use in the University Rover Challenge (URC)

Waypoint following could find usefulness at URC in the following ways:

  • To search a variety of locations, ideally faster than by teleoperation
  • To allow for assisted autonomous obstacle avoidance where an obstacle is known to fail detection
  • To navigate to multiple goals in the autonomous task with a single command

Normal Output

$ roslaunch follow_waypoints follow_waypoints.py

[INFO] : State machine starting in initial state 'GET_PATH' with userdata: ['waypoints']
[INFO] : Waiting to receive waypoints via Pose msg on topic /initialpose
[INFO] : To start following waypoints: 'rostopic pub /path_ready std_msgs/Empty -1'
[INFO] : To cancel the goal: 'rostopic pub -1 /move_base/cancel actionlib_msgs/GoalID -- {}'
[INFO] : Received new waypoint
[INFO] : Received new waypoint
[INFO] : Received path ready message
[INFO] : State machine transitioning 'GET_PATH':'success'-->'FOLLOW_PATH'
[INFO] : Executing move_base goal to position (x,y): 0.0123248100281, -0.0620594024658
[INFO] : Executing move_base goal to position (x,y): -0.0924506187439, -0.0527720451355
[INFO] : State machine transitioning 'FOLLOW_PATH':'success'-->'PATH_COMPLETE'
[INFO] : ###############################
[INFO] : ##### REACHED FINISH GATE #####
[INFO] : ###############################
[INFO] : State machine transitioning 'PATH_COMPLETE':'success'-->'GET_PATH'
[INFO] : Waiting to receive waypoints via Pose msg on topic /initialpose

Wiki: follow_waypoints (last edited 2017-12-23 23:14:45 by Daniel Snider)