Path Planning and Localization
The ROS Navigation stack is capable of accepting sensor data, a pre-generated map, odometry data, etc. and process it all via its global and local planner to generate velocity commands which are then used to drive the actuators. A point cloud-generated map will be pre-loaded on the robot to aid in localization. Region Growing, feature point tracking across closely spaced frames, or motion modelling are a few of the methods for visual odometry along with the point cloud from Xtion Pro. Particle filter-based Monte Carlo localization is an effective method for determining the robot’s pose and is based on the concept of particle filters. These filters work on the principle of Bayesian probability and use randomly generated particles to estimate posterior belief.
For path planning there are two cost maps which are used. One is the global cost map used to generate long-term plans over the entire map and other is local cost map used for short term plans and obstacle avoidance.
The twist messages published by the navigation stack can’t be directly executed by our platform since it is capable of only holonomic turns. To take care of this, a local ROS node running on the platform processes these commands and breaks them down in to segmented arc moves (by performing turn-in-place and linear moves sequentially).
Particle filter in action
The local planner being used for navigation is Dynamic Window Approach Planner. The dwa_local_planner package provides a controller that drives a mobile base in the plane. This controller serves to connect the path planner to the robot. Using a map, the planner creates a kinematic trajectory for the robot to get from a start to a goal location. Along the way, the planner creates, at least locally around the robot, a value function, represented as a grid map. This value function encodes the costs of traversing through the grid cells. The controller’s job is to use this value function to determine dx,dy,dtheta velocities to send to the robot.
DWA Planner in action
Mapping
The map of the parking lot is critical for localization and path planning subsystems. It was therefore decided to use Xaxxon Oculus Prime API and alongwith robust ROS S.L.A.M package gmapping to build an accurate map of the environment. Oculus prime provides an interface through their remote server application to use ros gmapping. Using the navigation interface it is possible to move the robot around starting from docked position make a 2D floor plan type map of the environment. The ROS depthimage_to_laserscan package is used to convert the depth image data of Asus Xtion Pro into laser scan data compatible with gmapping package. This is then fed into the gmapping ROS package with other robot parameters. When the mapping routine is complete, the map can be stored as a .pgm file. After a satisfactory map is obtained, it can be edited using a BitMap editor to enhance features.
Navigation
The navigation on the platform is carried out by setting way-points using the TelNet API. These way-points are then called by in a sequential manner to make the platform towards its destination. The network of way-points can be seen in the figure below.