The HomeServiceRobot project aims at programming a home service robot to pick up and drop off object autonumously in an environment without knowing its initial pose. The SLAM (Simultaneous Localization And Mapping) algorithm is implememnted to keep track of the robot current pose by MCL (Monte Carlo Localization) with known map assumption and the current map in robot's head by occupancy grid mapping with known robot pose assumption, which is essentially a close feedback loop process. ROS Navigation stack will be used, which is based on the Dijkstra's, a variant of the Uniform Cost Search algorithm, to plan our robot trajectory from pick-up to drop-off goal position.
-
Open a new terminal and build the catkin workspace:
-
$ mkdir -p /home/workspace/catkin_ws/src
-
$ cd /home/workspace/catkin_ws/src
-
$ catkin_init_workspace
-
-
Make and compiler the project (remember to source the environment variables in every new opened terminals):
-
cd /home/workspace/catkin_ws
-
catkin_make
-
source devel/setup.bash
-
-
Install the
xterminal
in workspace:sudo apt-get install xterm
-
Clone the project under /home/workspace/catkin_ws/src directory:
git clone https://github.com/tonyli0130/ROS_HomeServiceRobot.git
-
Update and upgrade the workspace image to get the lattest features of Gazebo, open a terminal and write the following statements:
$ sudo apt-get update && sudo apt-get upgrade -y
-
Now run the HomeServiceRobot project, first run the
test_slam.sh
shell script to test if the SLAM works or not in RViz:(Add executable permission to each shell scripts by
chmod +x /SHELL_SCRIPT_NAME
before running them)./test_slam.sh
You should be able to control the robot in the xterminal with
teleop
node published and the map should generate simultaneously in RViz, it is not necessary to generate the entire map: -
Next run the
test_navigation
shell script to test if the navigation path planning works:./test_navigation.sh
After use the
button to locate goal position, the robot should move toward the goal autonomously as shwon below:
-
Next run the
pick_onjects
shell script to test if the robot is able to move toward the pick-up goal and drop-off goal location autonumously:./pick_objects.sh
The pick-up and drop-off goal are requested to the action server, more details located in
pick_objects.cpp
file. -
Next run the
add_markers
shell script to test if the marker which represetns the virtual object apppears in the RViz:./add_markers.sh
The marker is a red cube as shown below (top view):
-
After running all the testing shell scripts and no error shows up, then it is time to run the main
home_service.sh
shell script to launch the entire project:./home_service.sh
The robot moves toward the pick-up goal to pick up the cube object. After arriving the pick-up goal, the robot rests for 5 seconds and heads up to drop-off goal:
Finally, the robot should drop off the cube object at dropp-off goal sucessfully: