ROS Navigation Stack

Table of Contents

1 从不同层次控制机器人移动

Controlling a mobile robot can be done at a number of levels and ROS provides methods for most of them. These levels represent different degrees of abstraction, beginning with direct control of the motors and proceeding upward to path planning and SLAM (Simultaneous Localization and Mapping).

(1) Motor Controllers and Drivers
(2) The ROS Base Controller (Proportional Integral Derivative, PID)
(3) Frame-Base Motion using the move_base ROS Package
(4) SLAM using the gmapping and amcl ROS Packages
(5) Semantic Goals

关于各个层次的说明,可参考:ROS by Example, Volume 1, for ROS Indigo, Chapter 7. Controlling A Mobile Base

总结:ROS中控制机器人移动的不同层次可用图 1 表示。


Figure 1: ROS motion control hierarchy

2 move_base包(Setup Navigation Stack)

ROS provides the move_base package that allows us to specify a target position and orientation of the robot with respect to some frame of reference; move_base will then attempt to move the robot to the goal while avoiding obstacles. The move_base package is a very sophisticated path planner and combines odometry data with both local and global cost maps when selecting a path for the robot to follow. It also controls the linear and angular velocities and accelerations automatically based on the minimum and maximum values we set in the configuration files.


Figure 2: A high-level view of the move_base node and its interaction with other components

从图 2 可知,move_base依赖于其它一些节点(图中蓝色节点),要使move_base正常工作,我们必须提供:
(1) 传感器的坐标(通过tf进行坐标转换,这样知道机器人的坐标就相当于知道传感器坐标了)。
(2) 里程计数据(常通过编写一个发布nav_msgs/Odometry信息的节点来实现)
(3) 导航传感器数据(常通过编写一个发布sensor_msgs/LaserScan或者sensor_msgs/PointCloud信息的节点来实现)。


2.1 里程计(odometry)数据



$ rosmsg show nav_msgs/Odometry
std_msgs/Header header
  uint32 seq
  time stamp
  string frame_id
string child_frame_id
geometry_msgs/PoseWithCovariance pose
  geometry_msgs/Pose pose
    geometry_msgs/Point position
      float64 x
      float64 y
      float64 z
    geometry_msgs/Quaternion orientation
      float64 x
      float64 y
      float64 z
      float64 w
  float64[36] covariance
geometry_msgs/TwistWithCovariance twist
  geometry_msgs/Twist twist
    geometry_msgs/Vector3 linear
      float64 x
      float64 y
      float64 z
    geometry_msgs/Vector3 angular
      float64 x
      float64 y
      float64 z
  float64[36] covariance

2.2 导航传感器数据



Author: cig01

Created: <2016-06-10 Fri 00:00>

Last updated: <2017-11-10 Fri 16:00>

Creator: Emacs 25.3.1 (Org mode 9.1.2)