Skip to content

zilinli0130/home_service_robot_sim

Repository files navigation

ROS Home Service Robot Simulation

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.

Installation

  1. 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

  2. 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

  3. Install the xterminal in workspace:

    • sudo apt-get install xterm
  4. Clone the project under /home/workspace/catkin_ws/src directory:

    • git clone https://github.com/tonyli0130/ROS_HomeServiceRobot.git
  5. 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

Usage

  1. 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:

    test_slam

  2. Next run the test_navigation shell script to test if the navigation path planning works:

    • ./test_navigation.sh

    After use the test_navigation_2 button to locate goal position, the robot should move toward the goal autonomously as shwon below:

    test_navigation_1

  3. 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

    pick_objects

    The pick-up and drop-off goal are requested to the action server, more details located in pick_objects.cpp file.

  4. 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):

    add_markers

  5. 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:

    home_service_1

    home_service_2

    Finally, the robot should drop off the cube object at dropp-off goal sucessfully:

    1

About

Implement SLAM and unit cost search path planning algorithm to program a robot to pick up and drop off objects for home service purpose

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published