The purpose of this repository is to program a home service robot that will autonomously map an environment and navigate to pickup and deliver objects.
The steps are listed as summary of tasks.
Inside the Gazebo world one can identify:
- Two wheeled Robot with caster.
- Sensors (lidar and camera) mounted on the robot.
.HomeServiceRobot # Robot SLAM and navigation
├── my_robot # my_robot package
│ ├── launch # launch files
│ │ ├── robot_description.launch # Generate urdf from xacro
│ │ ├── world.launch # launch Gazebo world along with robot
│ │ ├── amcl.launch # launch robot localization using amcl
│ │ ├── mapping.launch # launch mapping node using rtabmap
│ │ ├── localization.launch # launch mapping with localization
│ │ ├── teleop.launch # launch teleop_twist_keyboard to move robot
│ │ ├── gmapping.launch # launch ROS gmapping for robot
│ ├── meshes # meshes folder for sensors
│ │ ├── hokuyo.dae # Hokuyo lidar sensor
│ ├── urdf # urdf folder for xarco files
│ │ ├── my_robot.gazebo # Plugin for sensor/actuator (RGBD camera/Hokuyo lidar/Differential drive)
│ │ ├── my_robot.xacro # Robot description
│ ├── world # world folder for world files
│ │ ├── office.world
│ ├── CMakeLists.txt # compiler instructions
│ ├── package.xml # package info
│ ├── config # parmater for robot's navigational goal
│ │ ├── costmap_common_params.yaml # rosparam for move_base package
│ │ ├── local_costmap_params.yaml # rosparam for move_base package
│ │ ├── global_costmap_params.yaml # rosparam for move_base package
│ │ ├── base_costmap_params.yaml # rosparam for move_base package
│ ├── maps # map storage
│ │ ├── map.pgm # map generated from pgm_map_creator package
│ │ ├── map.yaml # map metadata
│ │ ├── slam_map.yaml # map generated from SLAM testing using shell_script/test_SLAM.sh
│ ├── rtabmap # database generated from mapping
│ │ ├── rtabmap.db # database file
│ ├── rviz # saved rviz config files
│ │ ├── marker.rviz # view_navigation from turtlebot_rviz_launchers with marker added
├── pgm_map_creator # map creator package (submodule)
├── teleop_twist_keyboard # package to control robot motion through keyboard (submodule)
├── turtlebot_interactions # turtlebot_rviz_launchers package for preconfigured rviz workspace
├── pick_objects # Navigational goal node
│ ├── launch # launch files
│ │ ├── pick_objects.launch # launch file for pick_objects node
│ ├── src # source files
│ │ ├── pick_objects.cpp # node for navigational goal
├── add_markers # Model virtual objects
│ ├── launch # launch files
│ │ ├── add_markers.launch # launch file for visualizing marker in home service robot
│ │ ├── add_markers_test.launch # launch file for testing marker visualization
│ ├── src # source files
│ │ ├── add_markers.cpp # node for visualizing marker in home service robot
│ │ ├── add_markers_test.cpp # node for testing marker visualization
├── amcl.rviz # visualization file for localization using amcl
├── shell_scripts # store various shell scripts
│ ├── launch.sh # demo launch file for gazebo, rosmaster and rviz
│ ├── pick_objects.sh # script to launch robot, amcl, rviz with navigational goal
│ ├── test_navigation.sh # script for localization and navigation testing
│ ├── test_slam.sh # script for slam testing (gmapping)
│ ├── add_marker.sh # script to test marker visualization (robot, amcl, rviz and add_markers)
│ ├── home_service.sh # script for home service robot (robot, rviz config, pick_objects and add_markers)
└──
- Node/Topic view for SLAM and Navigation for my_robot
- An overview of the packages used in this project is summarized here.
-
Operating System — Ubuntu 16.04 LTS. (Udacity VM Image)
-
- Please check the "Show EOL distros" and check the gmapping github branch appropriate for your version of ROS.
- Alternatively, if the package is not installed for above VM (ros kinetic), please install as below.
sudo apt install ros-kinetic-slam-gmapping
orsudo apt-get install ros-kinetic-gmapping
- To verify installation, run
gazebo
- Update and upgrade the Workspace
sudo apt-get update && sudo apt-get upgrade -y
- Create a catkin workspace
$ mkdir -p ~/catkin_ws/src
- Navigate to source directory
$ cd ~/catkin_ws/src
- Initialize the catkin workspace which will create a
CMakeLists.txt
file.
catkin_init_workspace
- Clone this repository and its submodules.
git clone https://github.com/sidharth2189/RoboND-HomeServiceRobot.git
git submodule update --init --recursive
- Copy
my_robot
,teleop_twist_keyboard
,turtlebot_interactions
,pick_objects
andadd_markers
packages into the source folder for catkin workspace,/catkin_ws/src
. - Navigate to catkin workspace.
cd ~/catkin_ws/
- Build packages.Note that the command is issued from within the top level directory (i.e., within
catkin_ws
NOTcatkin_ws/src
)
catkin_make
- Source the set up script of the workspace.
source devel/setup.bash
- To check for missing package and install dependency if not done.
rosdep check <package name>
rosdep -i install <package name>
- Turn shell script to executable.
chmod +x home_service.sh
- Launch script.
./home_service.sh
- Note that to run the script
./test_Navigation.sh
, the dependency for gmapping needs to be followed.
Some improvements to the code base can be considered as provided by project reviwer.
-
Instead of hard-coding goal poses in the
pick_objects.cpp
, one can load goal locations as<rosparam>
through launch file and send pick up and drop locations topick_objects
node. Use the<rosparam>
tag to load the parameter to ROS master. -
In
pick_objects.cpp
, the move_base action server is coded to send goals in sequential order inside the main function. This is good for beginners. But in the longer run, a better approach will be to use functions to do these tasks.- For example, one can use a function called
send_move_base_goal(x, y)
which will call the movebase action server. This will make the code more readable and reusable in the longer run. - Also function can be called with different (x, y) values without having to duplicate the code.
- For example, one can use a function called
-
Use 2D gmapping map instead of map from pgm_map_creator.
- Refer understanding gmapping and how to use the package
- Basic navigation tuning guide.
- Duplicating a repository
- Robot reference
- Navigation tuning guide
- Knowledge discussion on amcl and base planner tuning.
- Configuration space
- Minkowski addition
- Voronoi diagram
- State value function in Markov decision process for probabilistic path planning
- Uniform cost search algorithm
- Visualize discrete path planners
- Types of graphs
- Comparative study for Probabilistic roadmap planners.
- Path planning for non-circular Micro Aerial Vehicles in constrained environment
- Turtlebot rviz launchers - a package for preconfigured rviz workspace.
- Tutorial for sending simple navigational goals.
- Turorial for modeling virtual objects with markers in rviz.
- Handle ROS param through YAML. (For example instead of hard-coding goal poses in the code, one can load goal locations as
<rosparam>
through launch file and send pick up and drop locations topick_objects
node. Use the<rosparam>
tag to load the parameter to ROS master) - RGBD camera openni_kinect & Laser Hokuyo
- Tune the navigation parameters for better performance and understanding of the navigation software stack.
- README formatting
- How various parameters of the mapping code can be tuned to improve the map accuracy.
- How to build a real robot including how to select hardware and also a brief note on the communication protocol that can be used on a real robot.