In this simulation, the turtlebot2 module has been mainly deployed into ROS and is simulated in CoppeliaSim. The robot uses the Gmapping package feature to build a map of its surroundings and localize itself. The robot uses the move_base navigation stack to create a path and control its path towards the final goal using the Dijkstra algorithm as the Global Planner and DWA (Dynamic-Window-Approach) as the Local Planner.
Repo: 10595507_autonomous_nav
Module: Science and Technology of Autonomous Vehicles ROCO506Z Coursework
Clone this repository to your Home folder.
It is recommended to place the file in Home folder.
The following packages were used to successfully tested and verified using the following:
Ubuntu 16.04
ROS kinteic Desktop Full
CoppeliaSim_Edu_V4_1_0_Ubuntu16_04
sudo apt-get install ros-kinetic-navigation
sudo apt-get install ros-kinetic-gmapping
sudo apt-get install ros-kinetic-move-base ros-kinetic-pointcloud-to-laserscan
sudo apt-get install ros-kinetic-dwa-local-planner
Open the folder (10595507_autonomous_nav) it contains a folder named autonomous_nav_wss which is a meta package that contains multiple packages.
Unzip the folder
first step: catkin_make the package turtlebot_msgs.
cd ~/10595507_autonomous_nav/autonomous_navigation_wss/turtlebot_msgs/
catkin_make
then you need to source the package.
cd ..
source source_all.bash
then repeat the same steps as the one above for each and keep this turtlebot_simulation at the end.
turtlebot
turtlebot_2dslam
turtlebot_interaction
turtlebot_map_and_nav
after building and sourcing all above pakcages, we do the same for turtlebot_simulation.
then we go to this path ~/autonomous_navigation_wss/turtlebot_simulation/devel/lib
copy the file "libv_repExtRos.so" to CoppeliaSim_Edu_V4_1_0_Ubuntu16_04 main folder
move CoppeliaSim_Edu_V4_1_0_Ubuntu16_04 to a new folder in Home directoy called Programs.
open a terminal and source coppeliamSim to bashrc by copying the below code to bashrc
export COPPELIASIM_ROOT_DIR=~/Programs/CoppeliaSim_Edu_V4_1_0_Ubuntu16_04
alias coppeliaSim="cd $COPPELIASIM_ROOT_DIR && ./coppeliaSim.sh"
the on the terminal run ros
roscore
then in a new terminal, source and run coppeliaSim
source .bashrc
coppeliaSim
to verify that your installation is successful, after launch coppleasim, you should find those lines in the previous termnial
[CoppeliaSim:loadinfo] plugin 'ROSInterface': loading...
[CoppeliaSim:loadinfo] plugin 'ROSInterface': load succeeded.
first run roscore
roscore
then launch vrep turtlebot_simulation (Coppeliasim)
cd ~/10595507_autonomous_nav/autonomous_navigation_wss
source source_all.bash
roslaunch vrep_simulation vrep_simulation.launch
in a new terminal,launch turtlebot_rviz (Coppeliasim)
cd ~/10595507_autonomous_nav/autonomous_navigation_wss
source source_all.bash
roslaunch turtlebot_rviz_launchers turtlebot_rviz.launch
if you get into Rviz window, you will see that the turtlebot does not appears, you just need to run the simulation in CoppeliaSim. and choose base_link frame.
then run Gmapping to build a map in new terminal.
cd ~/10595507_autonomous_nav/autonomous_navigation_wss
source source_all.bash
roslaunch turtlebot_gmapping turtlebot_gmapping.launch
when you switch to Rviz, you will see that the map is start to generate.
if there is no map, then add rviz topic by click on add >> by topic >> /map >> Map.
You can use telop keyboard to move turtlebot in the simulation and generate the map.
cd ~/10595507_autonomous_nav/autonomous_navigation_wss
source source_all.bash
roslaunch turtlebot_teleop keyboard_teleop.launch
to launch the global planner, open a new terminal and launch the file.
cd ~/10595507_autonomous_nav/autonomous_navigation_wss
source source_all.bash
roslaunch turtlebot_navigation turtlebot_move_base.launch
then,by looking at Rviz, we can add new topic as well.
add >> by topic >> /move_base >> /global_planner.
add >> by topic >> /move_base >> /DWAPlannerROS >>/local_plan.
add >> by topic >> /move_base >> /global_costmap.
add >> by topic >> /move_base >> /local_costmap.
Videos can be found for each implementation step of Gmapping and Path Planning.
Gmapping
Path Plannig
Video can be found explaining Controller tuning.
Controller Parameters Tuning
Mario Gianni.Intial Developer
Nadhir Mezouar. Implementing Turtlebot Simulation and controller develpment
Thanks to Dr.Mario Gianni for the great course.