Consider a planar robot
First, install necessary libraries: (1) nlohmann-json for reading configuration files; (2) opencv4 for visualization.
$ sudo apt-get update
$ sudo apt-get install libopencv-dev
$ sudo apt-get install nlohmann-json3-dev
Second, change the parameters in the ``config.json'' file as needed. Current supported parameters include (1) the start and goal pose of the target object; (2) Poses of obstacles in the environment, (3) the length and width of a link; (4) the width and height of an obstacle/target object; (5) Clearance to obstacles.
Third, build the project with "make" command.
$ cd /path/to/repo/root/
$ make
Fourth, run the executable with
$ ./motion_planning
Fifth, when the planner finds a path, it plots an image of the initial state.
Sixth, press any key to start the animation. Some demo videos are attached in the zip file.
The motion plan is computed by RRT-connect. IK is chosen to be the analytical solution with
In the basic version, RRT state feasibility is evaluated with polygon intersections. In this version, I evaluate polygon distance instead. A state is feasible if and only if all the robot links and the target object is at least
- "basic-version-easy.mp4". The basic version planner in an easy test case.
- "basic-version-narrow.mp4". The basic version planner in a challenging test case.
- "clearance-version-5cm.mp4" Clearance version implementation with clearance=5cm.
- "clearance-version-10cm.mp4" Clearance version implementation with clearance=10cm.