This repo contains the related projects for the Udacity's Robotics Software Engineer Nanodegree.
The project was divided in
- Part 1:
Build My World: Designed a Gazebo World Environment for the upcoming parts. - Part 2:
Go Chase It: Designed and built a mobile robot, house it inside the world and then programed it with c++ Nodes in ROS to chase a white ball. - Part 3:
Where Am I: Used the Adaptive Monte Carlo Localization algorithm in ROS to localize the robot. - Part 4:
Map My World: Deployed RTAB-Mapping on the robot to simulate 2D and 3D maps of the environment.
There are two packages within this repository:
Defines mobile robot URDF as well as the world.
Contains 2 nodes, one responsible for locating the position of the white ball, and the second for sending the respective command to follow the white ball.
-
git clonethe repository inside your catkin workspace -
Source the workspace
source devel/setup.bash -
Launch world and robot
roslaunch my_robot world.launch -
To make the robot chase the white ball, open another terminal, navigate to your catking worspace, source it, and then execute:
roslaunch ball_chaser ball_chaser.launch
sudo apt-get install ros-kinetic-navigation
sudo apt-get install ros-kinetic-map-server
sudo apt-get install ros-kinetic-move-base
sudo apt-get install ros-kinetic-amcl
You could use teleop node to control your robot and observe it localize itself in the environment.
Open another terminal and launch the teleop script:
rosrun teleop_twist_keyboard teleop_twist_keyboard.py
Click the 2D Nav Goal button in the toolbar, then click and drag on the map to send the goal to the robot. It will start moving and localize itself in the process.
To test the rtabmap_ros package, launch the world.
Then launch mapping.launchto start RTABMAP.
Then run the teleop_key package in order to start creating the map.
At the end you must result with something like this:

And the final map, should be something like this:

Database must be located at ~/.ros/rtabmap.db
To analyze it, run
rtabmap-databaseViewer src/my_robot/db/rtabmap.db
It's recommended to update and upgrade your environment before running the code.
sudo apt-get update && sudo apt-get upgrade -y

