| System Requirements | Version / Release |
|---|---|
| Operating System | Ubuntu 16.04 LTS (Xenial Xerus) |
| ROS Distribution Release | Kinetic Kame* |
| C++ Version | At least C++11 |
*Note: Ensure ROS Kinetic Kame is installed with the desktop-full option. The ros-kinetic-turtlebot package is required as well.
This project is part of the module EE4308 - Advances in Intelligent Systems and Robotics in the National University of Singapore. The goal of this project is to design an autonomous navigation system for the Turtlebot in the Gazebo environment using ROS, which includes pathfinding as well as obstacle avoidance in a grid like maze world.
For our project, we implemented the A* search algorithm as our pathfinding tool to plan for the Turtlebot's path to goal depending on the obstacles detected by its on-board RGB-D Kinect sensor. Our system is robust enough to handle both known and unknown worlds as long as the start and end coordinates remain the same at (0, 0) and (4, 4) respectively.
-
Create a new catkin workspace.
In your terminal shell, navigate to your intended directory for your new workspace and execute the following commands, replacing
<wsname>with your intended workspace name.$ mkdir -p <wsname>/src $ cd <wsname>/src/ $ catkin_init_workspace $ cd .. $ catkin_make
-
Clone this repository and copy necessary folders into your catkin workspace.
In the same
<wsname>directory, execute the following:$ git clone https://github.com/dariustanrd/ROS-Turtlebot-Navigation-Project.git $ cd ROS-Turtlebot-Navigation-Project/ $ cp -r src/bot ../src $ cp -r worlds docs project_init.sh ../ $ cd .. $ catkin_make
-
Clone this repository and copy necessary folders into your existing catkin workspace.
In your terminal shell, navigate to your existing catkin workspace root directory and execute the following:
$ git clone https://github.com/dariustanrd/ROS-Turtlebot-Navigation-Project.git $ cd ROS-Turtlebot-Navigation-Project/ $ cp -r src/bot ../src $ cp -r worlds docs project_init.sh ../ $ cd .. $ catkin_make
To initialise the Gazebo world, run the following commands in a terminal:
$ source devel/setup.bash
$ chmod +x project_init.sh
$ ./project_init.shIn a new terminal, run the following commands to begin the Turtlebot autonomous navigation.
$ source devel/setup.bash
$ roslaunch bot bot.launchWhen the Turtlebot has reached the goal coordinates, the notification will be printed out on the terminal together with the time taken to reach the goal.
There are 4 main nodes that we wrote for this package which handles different aspects of the autonomous navigation of the Turtlebot.
-
pos_infoThis node subscribes to the
odom_combinedtopic published by therobot_pose_ekfnode, which is a refined version of standard odometry provided by\odomas it incorporates Extended Kalman Filtering of the odometry data with Inertial Measurement Unit (IMU) data from the Turtlebot. It then publishes the Turtlebot's pose estimate for other nodes to subscribe to. -
depth_infoThis node publishes the depth information from the Turtlebot's RGB-D kinect sensor at the middle point, which acts as our basic obstacle detection system for obstacles directly in the path of the Turtlebot.
-
scan_infoThis node subscribes to the
\scantopic published by thelaserscan_nodelet_managernode that obtains the scan depth information from thedepthimage_to_laserscan, which uses the RGB-D kinect sensor data to create a form of 'fake' laser readings similar to that of a LIDAR sensor. This node then publishes the depth information for the left most, right most and middle readings in the horizontal axis. This data is then used in thebot_controlnode to act as our preemptive obstacle detection system for obstacles that are along the way of the Turtlebot's current intended path. -
bot_controlThis node is our main node that conducts the motion control, obstacle avoidance and pathfinding for the Turtlebot. It subscribes to the
/auto_ctrl/scan_info,/auto_ctrl/depth_infoand/auto_ctrl/pos_infotopics and determines the next coordinate to move towards using the algorithms found in thealgo.hheader file while avoiding obstacles, updating the algorithm with presence of obstacles in order to reach the goal coordinates.
This file contains 2 algorithms, the Flood Fill as well as A* search algorithms. However, we primarily use the A* search algorithm due to its faster computation time and reliability. This file also has the code for the internal 2D array map stored by the Turtlebot so that the algorithm will be able to compute the next move.
-
world.launchThis launch file is launched in the
project_init.shshell file to launch the gazebo environment using the defined worlds inproject_init.shas well as the Turtlebot base. It also includes theempty_world.launchfile which sets the different arguments for the launching of gazebo.This file can actually be found in the ROS install path
/opt/ros/kinetic/share/turtlebot_gazebo/launch/turtlebot_world.launchbut was included in order to ammend theempty_world.launchfile path to our version. -
empty_world.launchThis launch file can also be found in the ROS install path
/opt/ros/kinetic/share/gazebo_ros/launch/empty_world.launch. However, in our version, we added the line<remap from="tf" to="gazebo_tf"/>in order to ensure that the tf tree constructed by Gazebo does not affect the tf tree constructed by Turtlebot. This had to be done in order to use therobot_pose_ekfnode as there was a conflict in the tf frames created by Gazebo and therobot_pose_ekfnode which prevented\odom_combinedfrom being connected to the tf tree. -
bot.launchThis launch file is our main launch file to run the
robot_pose_ekfnode and the 4 nodes that we wrote mentioned previously.
In order to choose the world that you wish to test the Turtlebot performance in, the project_init.sh file needs to be ammended to change the chosen world file.
-
test_world_1.worldTime taken to reach goal: ~50s
This world is the most basic world to test our system as it has the shortest and easiest path in terms of obstacle avoidance to get the Turtlebot from start to goal.
-
test_world_2.worldTime taken to reach goal: ~100s
This world has the added complexity of more obstacles to be avoided as well as a longer path to travel from start to goal, which increases the chance of the Turtlebot drifting off its intended course.
-
test_world_trap.worldTime taken to reach goal: ~2000s
This world was designed to push our system by added 5 potential dead ends along the path of the Turtlebot and to test if it is able to recover after being trapped in the dead end and navigate to the goal.


