Skip to content
This repository has been archived by the owner on Sep 28, 2023. It is now read-only.

Navigation and localization

mdepp edited this page Jan 28, 2020 · 6 revisions

Navigation and localization

Navigation

We use the ROS Navigation Stack for navigation and path planning. The navigation stack is a complicated and highly configurable piece of software, but in our configuration it takes as input

  • An estimate of the rover's current pose from the global EKF, as an Odometry message from the topic /ekf/map/odometry/filtered.
  • A map of the robot's environment from RTAB-Map, from the /rtabmap/grid_map topic. This is a sort of "base map" to which the navigation stack adds obstacles from its sensors. There is no requirement that this map be similar or identical to the map used in localization or SLAM. It can even be blank, in which case navigation is performed entirely using detected obstacles. However, in our case, we use the map created by RTAB-Map's localization.
  • A point cloud of all obstacles in front of the rover, as found using RTAB-Map's point cloud obstacle segmentation, from the /obstacles_detection/obstacles topic. The navigation stack can also take raw sensor inputs and find obstacles from those, but RTAB-Map's method is more sophisticated.

The navigation stack outputs Twist messages to the topic /rover_diff_drive_controller/cmd_vel describing how the rover should move. It is not responsible for determining how exactly the wheels should turn in order to perform this movement.

For more details, see the launch filemove_base.launch in the spear_rover package, as well as the configuration files in spear_rover/config/move_base.

Localization

As mentioned above, the ROS navigation stack needs an estimate of the rover's current pose. We use multiple EKFs implemented by the package robot_localization to provide this estimate.

The first EKF, the local or odom EKF, provides a smooth but drifting position estimate suitable for navigation. The second, the global or map EKF, provides a non-smooth but stable position estimate. The first EKF fuses

  • relative linear velocity from wheel odometry
  • linear and angular velocity from visual odometry
  • absolute orientation from the IMU

and the second fuses all of these sources, with the addition of

  • absolute position from the GPS

For more information, see the launch file state_estimate.launch in the spear_rover package, as well as the configuration files in spear_rover/config/ekf.