Edit on GitHub

TurtleBot3 Home Service Challenge

NOTE:

Home Service Challenge Stadium and Objects used during the challenge.

What you need to Join the Home Service Challenge

TurtleBot3 Waffle Pi

OpenMANIPULATOR-X

Remote PC

Getting Started

NOTE: Be sure to complete the following instructions before installing Home Service Challenge packages in the pc.

Remote PC Setup

  1. [Remote PC] Install Home Service Challenge packages.
    $ cd ~/catkin_ws/src/
    $ git clone https://github.com/ROBOTIS-GIT/turtlebot3_home_service_challenge.git
    $ sudo apt-get install ros-kinetic-ar-track-alvar ros-kinetic-ar-track-alvar-msgs
    $ cd ~/catkin_ws && catkin_make
    
  2. [Remote PC] Load the TurtleBot3 Waffle (or Waffle Pi) with OpenMANIPULATOR on RViz.
    $ export TURTLEBOT3_MODEL=${TB3_MODEL}
    $ roslaunch turtlebot3_manipulation_description turtlebot3_manipulation_view.launch use_gui:=true
    

    NOTE: Specify ${TB3_MODEL}: waffle, waffle_pi before excuting the command. Set the permanent export setting by following Export TURTLEBOT3_MODEL instruction.

    turtlebot3_manipulation_view

    Rviz View

  3. [Remote PC] In order to use your PC remotely, you need to make SSH keys. Create a script file to generate SSH key.
    $ nano ~/tb3_ssh_keygen
    
  4. [Remote PC] Copy and paste the followings to the script, and save it.

     #!/bin/bash
     argc=$#
     args=("$@")
    
     if [ 0 -eq $argc ]
     then        
       echo "need to argument that host ip for ssh connection"
       echo "Usage: $0 [ip address] ..."
       exit 1
     fi
    
     for((index = 0; index < $#; index++ ))
     do
       ssh-keygen -R ${args[$index]}
       ssh-keyscan ${args[$index]} >> ~/.ssh/known_hosts
     done
    
  5. [Remote PC] Make the file executable.
    $ chmod +x ~/tb3_ssh_keygen
    
  6. [Remote PC] Execute the file with TurtleBot3’s IP address.
    $ ~/tb3_ssh_keygen 192.168.1.10
    

    NOTE: Be sure Remote PC and TurtleBot3 are connected under the same IP.

  7. Check ~/.ssh/known_hosts file if SSH is successfully generated.

SBC Setup

  1. [Turtlebot3 SBC] Using a machine tag, create env.bash file located in the /home/pi.
    $ nano ~/env.bash
    
  2. [Turtlebot3 SBC] Copy and paste the followings to the script, and save it.

     #!/bin/bash
    
     # check if other turtlebot3_core is already running
     is_running=`ps ax | grep turtlebot3_core`
     IFS=' ' read -ra is_runnings <<< "$is_running"
     process_name=${is_runnings[4]}
     if [ ${process_name} == "python" ]
     then
       echo "other turtlebot3_core is already running."
       exit 1
     fi
    
     #### ROS ####
     source /opt/ros/kinetic/setup.bash
     source ~/catkin_ws/devel/setup.bash
    
     #### ROS Network ####
     ip_address=`hostname -I`
     ip_address_trim=${ip_address%% * }
     ip_address_no_space="$(echo -e "${ip_address_trim}" | tr -d '[:space:]')"
     export ROS_HOSTNAME=${ip_address_no_space}
    
     ##### Set TURTLEBOT3 Model ####
     export TURTLEBOT3_MODEL=waffle_pi
    
     exec "$@"
    
  3. Make the file executable.
    $ chmod +x ~/env.bash
    

Hardware Setup

OpenCR Setup

Camera Calibration

Calibrate a camera to decrease or minimize distortion. Follow the camera calibration process step by step.

Camera Setting

  1. [Remote PC] Use the following command to run a camera remotely. Make sure to type IP address where TurtleBot3 and remote pc are connected together.
    $ roslaunch turtlebot3_home_service_challenge_tools turtlebot3_pi_cam_remote.launch address:=TURTLEBOT_IP
    

    NOTE: Be sure Remote PC and TurtleBot3 are connected under the same IP.

  2. [Remote PC] Execute rqt_image_view.
    $ rqt_image_view
    
  3. Select /raspicam_node/image/compressed (or /raspicam_node/image/) topic on the check box.

    camera view

  4. [Remote PC] Excute rqt_reconfigure.
     $ rosrun rqt_reconfigure rqt_reconfigure
    
  5. Click raspicam_node, and modify parameter value to see clear images from the camera.

    camera setting

  6. Open camera.yaml file located in turtlebot3_home_service_challenge_tools/config/camera_calibration.

  7. Write modified values to the file.
     ISO: 400
     awb_mode: auto
     brightness: 50
     contrast: 0
     exposureCompensation: 0
     exposure_mode: auto
     hFlip: false
     saturation: 0
     sharpness: 0
     shutterSpeed: 0
     vFlip: false
     videoStabilisation: false
     zoom: 1.0
    

Intrinsic Camera Calibration

Print a checkerboard on A4 size paper. The checkerboard is used for Intrinsic Camera Calibration.

  1. [Remote PC] Use the following command to run a camera remotely. Make sure to include IP address when using the command.
    $ roslaunch turtlebot3_home_service_challenge_tools turtlebot3_pi_cam_remote.launch enable_raw:=true address:=TURTLEBOT_IP
    

    NOTE: Be sure Remote PC and TurtleBot3 are connected under the same IP.

  2. [Remote PC] Run a intrinsic camera calibration.
    $ rosrun camera_calibration cameracalibrator.py --size 8x6 --square 0.024 image:=/raspicam_node/image camera:=/raspicam_node
    

    NOTE: The size of squres may differ depending on the print paper size A3, A4 or others. In which case, adjust the value (0.024) of –square option in the given command according to the square size in the print paper.

    calibration display

  3. Use the checkerboard to calibrate the camera, and click CALIBRATE.

    NOTE: Move and tilt the checker board around to the left, right, top, bottom and various angles to get X,Y, Size and Skew calibration data. As the data is computed enough, X,Y, Size and Skew will have a green bar.

    calibraion

  4. Click Commit to save the intrinsic calibration data to the default folder.(~/.ros/camera_info)

    commit

  5. Open camerav2_1280x720.yaml file located ~/.ros/camera_info from Turtlebot SBC and check the saved data, which has the form like the script below.
    image_width: 1280
    image_height: 720
    camera_name: camerav2_1280x720
     camera_matrix:
     rows: 3
     cols: 3
     data: [1280.628466572832, 0, 658.384219880362, 0, 1277.989132765768, 360.8363923435625, 0, 0, 1]
    distortion_model: plumb_bob
    distortion_coefficients:
     rows: 1
     cols: 5
     data: [0.2032697817127332, -0.4147569733010375, -0.001420915782245743, 0.003110652248245379, 0]
    rectification_matrix:
     rows: 3
     cols: 3
     data: [1, 0, 0, 0, 1, 0, 0, 0, 1]
    projection_matrix:
     rows: 3
     cols: 4
     data: [1312.630981445312, 0, 661.4149459665205, 0, 0, 1312.107055664062, 360.0239481801327, 0, 0, 0, 1, 0]
    

SLAM

SLAM stands for Simultaneous Localization and Mapping. Using this feature, TurtleBot3 can draw a map. More information on this, see SLAM

  1. [Remote PC] Use the following command to run a camera remotely. Make sure to include IP address when using the command.
     $ roslaunch turtlebot3_home_service_challenge_tools turtlebot3_robot_remote.launch address:=TURTLEBOT_IP
    

    NOTE: Be sure Remote PC and TurtleBot3 are connected under the same IP.

  2. [Remote PC] Run slam node.
    $ roslaunch turtlebot3_home_service_challenge_tools slam.launch
    
  3. [Remote PC] Run keyboard teleoperation node.
    $ roslaunch turtlebot3_home_service_challenge_tools mobile_teleop_key.launch
    

    After the node is run, the following controller will be displayed on a terminal window.

     Control Your TurtleBot3!
     ---------------------------
     Moving around:
             w
        a    s    d
             x
    
     w/x : increase/decrease linear velocity
     a/d : increase/decrease angular velocity
     space key, s : force stop
    
     CTRL-C to quit
    
  4. Update a map with the keyboard controller.

    making_map

  5. [Remote PC] Save the map when it is fully updated.
     $ ROS_NAMESPACE=tb3_hsc rosrun map_server map_saver -f tb3_hsc
    

    map

Starting Missions

Run a Demo and Manager Pacakge

  1. [Remote PC] Run the demo pacakge. Make sure to include IP address when using the command. This package contains various features: Remote Bringup with a machine tag, Moveit, Navigation, Camera sensing
    $ roslaunch turtlebot3_home_service_challenge_tools turtlebot3_home_service_challenge_demo_remote.launch address:=TURTLEBOT_IP
    

    NOTE: Be sure Remote PC and TurtleBot3 are connected under the same IP.

    demo_01

  2. [Remote PC] Run the manager package used to carry out Home Service Challenge’s mission.
    $ roslaunch turtlebot3_home_service_challenge_manager manager.launch
    

Commands

[Remote PC] Use the following commands during Home Service Challenge.

Operation Test

[Remote PC] Publish the following topics to test a navigation or manipulation feature.

Configuration

[Remote PC] Modify data in configuration files according to the given environment.

Details about the Home Service Mission

The goal of the Home Service Challenge is to move four different objects from a living room to a specific place with given rules, and to return to the starting point.

Using the demo package, the process of moving objects in Home Service Challenge is as follows.

  1. Navigating to a target in the living room.
    • Find a target, and reach it using a Navigation package.
      demo_02
  2. Approaching the target.
    • For the approach to the target with precise, TurtleBot3 wheels are directly controlled by computing target’s location from AR marker. (Used Topic : /tb3_hsc/cmd_vel). To produce a reliable performance, Closed-loop and control system can be used for the specified number of times. demo_03
  3. Picking the target with OpenMANIPULATOR-X’s gripper.
    • Pick the target object using the moveit package (Joint space control, Task space control and Gripper control)

    manipulation_diagram

    MoveIt Diagram

    demo_04

    Picking a Target Using MoveIt Package.

  4. Leaving for the next room to place the object (Used Topic : /tb3_hsc/cmd_vel)
    • When moving back from the target, the wheels are directly controlled by the manager program using /tb3_hsc/cmd_vel topic.
  5. Navigating to the place where the object will be placed.
    • Find a next target, and reach it using a Navigation package.

    demo_05

  6. Approaching the target.

  7. Placing the object using the gripper.

  8. Returning to the starting point using the navigation package.

    demo_06

Simulation

Simulate TurtleBot3 with OpenMANIPULATOR-X in Gazebo.

  1. [Remote PC] Run Gazebo.
     $ roslaunch turtlebot3_home_service_challenge_simulation competition.launch
    

    gazebo

  2. [Remote PC] Run a simulation demo for Gazebo.
     $ roslaunch turtlebot3_home_service_challenge_tools turtlebot3_home_service_challenge_demo_simulation.launch
    

    simulation_rviz

  3. [Remote PC] Run Home Service Manager.
     $ roslaunch turtlebot3_home_service_challenge_manager manager.launch
    
  4. Use the Home Service Challenge commands, See Commands