A circular roomba robot is present in an already mapped environment. The map is in the format of a binary occupancy grid.
Each cell in the grid contains a boolean value indicating if an obstacle is present at a given location, i.e true -> obstacle
and false -> free
. The OccupancyGrid
struct contains a 1d array of boolean
that denotes a 2d grid in a row major format. The intent is to find a safe collision-free path from a given location
to the vicinity of the goal location.
The PathPlanner classes inherits the PathPlannerInterface
class, and implements the getCollisionFreePath()
pure virtual function to provide a trajectory which can be followed by the robot. Note that the start position and goal position may be any point within the occupancy grid.
The origin of the occupancy grid is the bottom left of the image. The positive x-axis is to the right and positive
y-axis is upwards. The grid is of size 320 x 320
with a resolution of 0.05 m
. The OccupancyGrid
class has methods
to set occupancy for a given coordinate, which could be useful for testing solutions.
The robot is a spherical robot of diameter 0.6m
and it operates with a 2d coordinate system with
Eigen is a linear algebra library. Documentation to use Eigen is present here. A cheat sheet with quick usages for Eigen Data structures and functions can be found here
To install Eigen, run the following command:
sudo apt install libeigen3-dev
Yaml-cpp library is used to parse config.yml.
sudo apt install libyaml-cpp-dev
To build , run
cmake -B build && cmake --build build && ./bin/CheckPath