This project implements a wall-following algorithm in python for an autonomous mobile 2 wheeled robot with a laser scanner sensor using the Robot Operating System (ROS) libraries, Gazebo as simulator and Python as programming language. The proposed wall-following algorithm makes a robot wander at random until a wall is found, then follows the wall - through an implemented proportional control to keep a constant distance from it - in the outside and inside of a “V" and "W" shaped wall, respectively.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
- ROS: Indigo
- Ubuntu: 14.04LTS
- Python: 2.7.6
- (Gazebo: 7.12.0)
.
├── catkin_ws # Catkin Workspace
│ ├── src # Source files
│ │ ├── two-wheeled-robot-motion-planning
│ │ │ ├── scripts # Folder that contains the follow wall scripts
│ │ │ └── ...
│ │ └── ...
│ ├── devel # Folder created after compilation
│ │ ├── setup.bash # Shell Script to add environment variables to your path
│ │ └── ... # etc.
│ └── build # Compiled files
└── simulation_ws
.
└── simulation_ws # Simulation Workspace
├── src # Source files
│ ├── two-wheeled-robot-simulation
│ │ ├── m2wr_description # Folder that contains the robot definition
│ │ ├── my_worlds # Folder that contains world's definitions
│ │ └── ...
│ └── ...
├── devel # Folder created after compilation
│ ├── setup.bash # Shell Script to add environment variables to your path
│ └── ... # etc.
└── build # Compiled files
After clone the project navigate to the project folder
cd ros-wall-follower-2-wheeled-robot-master
Navigate to Catkin Workspace and run catkin_make
cd catkin_ws
catkin_make
Return to the project folder
cd ..
Navigate to Simulation Workspace and run catkin_make
cd simulation_ws
catkin_make
To run the tests it will be necessary to use 3 different terminals. Follow the steps starting at project root folder.
Do not close this terminal
- Run the command to setup the environments variables on this terminal:
source simulation_ws/devel/setup.bash
- Choose and launch the World that you want to simulate:
roslaunch my_worlds V_world.launch
or
roslaunch my_worlds W_world.launch
- Run the command to setup the environments variables on this terminal:
source simulation_ws/devel/setup.bash
- Spawn the Mobile 2 Wheeled Robot on the World:
roslaunch m2wr_description spawn.launch y:=1
Do not close this terminal
- Run the command to setup the environments variables on this terminal:
source catkin_ws/devel/setup.bash
- Run the wall-following script:
rosrun two-wheeled-robot-motion-planning follow_wall.py