Using the ROS MoveIt! and Navigation Stack

In the previous chapters, we have been discussing the design and simulation of a robotic arm and mobile robot. We controlled each joint of the robotic arm in Gazebo using the ROS controller and moved the mobile robot inside Gazebo using the teleop node.

In this chapter, we are going to address the motion planning problem. Moving a robot by directly controlling its joints manually might be a difficult task, especially if we want to add position or velocity constraints to the robot motion. Similarly, driving a mobile robot, avoiding obstacles, requires the planning of a path. For this reason, we will solve these problems using the ROS MoveIt! and Navigation stack.

MoveIt! is a set of packages and tools for doing mobile manipulation in ROS. The official web page (http://moveit.ros.org/) contains the documentations, the list of robots using MoveIt!, and various examples to demonstrate pick and place, grasping, simple motion planning using inverse kinematics, and so on.

MoveIt! contains state-of-the-art software for motion planning, manipulation, 3D perception, kinematics, collision checking, control, and navigation. Apart from the command line interface, MoveIt! has some good GUI to interface a new robot to MoveIt!. Also, there is a RViz plugin, which enables motion planning from RViz itself. We will also see how to motion plan our robot using MoveIt! C++ APIs.

Next is the Navigation stack, another set of powerful tools and libraries to work mainly for mobile robot navigation. The Navigation stack contains ready-to-use navigation algorithms which can be used in mobile robots, especially for differential wheeled robots. Using these stacks, we can make the robot autonomous, and that is the final concept that we are going to see in the Navigation stack.

The first section of this chapter will discuss more on the MoveIt! package, installation, and architecture. After discussing the main concepts of MoveIt!, we will see how to create a MoveIt! package for our robotic arm, which can provide collision-aware path planning to our robot. Using this package, we can perform motion planning (inverse kinematics) in RViz, and can interface to Gazebo or the real robot for executing the paths.

After discussing the interfacing, we will discuss more about the Navigation stack and see how to perform autonomous navigation using  SLAM (Simultaneous Localization And Mapping) and amcl (Adaptive Monte Carlo Localization).