Skip to content

Implementation of the wavefront algorithm for mobile robot navigation - planning a path to avoid static obstacles

License

Notifications You must be signed in to change notification settings

anurye/navigation-with-wavefront-algorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wavefront

This algorithm is capable of finding the optimal route to the goal in the planning phase, in the initial state. For this purpose, it analyses the map and generates the path in an off-line manner. When finished, the robot simply follows the generated path.

Setup

Requirements

  • Matlab
  • Peter Corke’s RVC toolbox
  • CoppeliaSim simulator
  • Matlab bindings for CoppeliaSim

Important

It is required to use a fairly recent version of Matlab, versions older than 2011 may cause problems.

CoppeliaSim and Robotics Toolbox

  • Download CoppeliaSim EDU and unpack it in the ~/ws_emor workspace directory.
  • Download EMOR tutorials repository and unzip it in ~/ws_emor.

Install the CoppeliaSim bindings for Matlab:

Copy the following three files from the directory of the CoppeliaSim to the directory named youbot within your local copy of EMOR tutorials repository downloaded above.

The three files you need to copy are:

  • remApi.m: located in {CoppeliaSim_path}/programming/remoteApiBindings/matlab/matlab

Note

In the newest version of CoppeliaSim, the files may be located in {CoppeliaSim_path}/programming//legacyRemoteApi/remoteApiBindings/matlab/matlab

  • remoteApiProto.m: located in {CoppeliaSim_path}/programming/remoteApiBindings/matlab/matlab
  • remoteApi.so (if you use Linux) or remoteApi.dll (if you use Windows) or remoteApi.dylib (if you use a Mac). If you have a choice between a 32-bit or 64-bit remoteApi, pick the one that corresponds to your Matlab install.

Important

If you have 32-bit Matlab, pick the 32-bit remoteApi, even if your kernel is 64-bit.

The file is located in {CoppeliaSim_path}/programming/remoteApiBindings/lib/lib You will find these files in the directory containing the CoppeliaSim app. Look in the programming/remoteApiBindings/lib/lib and programming/remoteApiBindings/matlab/matlab subdirectories of the CoppeliaSim app directory (although this can change from version to version). You must copy these files to the youbot directory within your copy of EMOR tutorials repository.

  • Run Matlab and change the current directory to the youbot directory (in Matlab Command Window), e.g. on Linux/Mac:

    cd ~/ws_emor/emor_trs/youbot
  • Then type (in Matlab):

    vrep=remApi('remoteApi');   
    vrep.delete();

Simulation

You can run the simulation with the following command in the MATLAB console:

run_simulation(@wavefront_main, false, [goal_x, goal_y], map_filename)

  • wavefront_main is the control callback function.
  • [goal_x, goal_y] is the position of the goal point.
  • map_filename is the name of the map file.
run_simulation(@wavefront_main, false, [-0.5, 3.8], "map.png")

It also plots the state of the Wavefront Planner for debugging and visualization purposes. The planner runs in the initial state. Then the robot moves to the subsequent cells on the path generated by Wavefront.

image

About

Implementation of the wavefront algorithm for mobile robot navigation - planning a path to avoid static obstacles

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages