Skip to content

Ammarazab/Project5-Home-Service-Robot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Home Service Robot

Project Objectives

The goal of this project Homa Service Robot is to work by all ROS tools by building enviroment in the gazebo and map it using gmapping package and give robot a specific point to go through it using Mont Carlo Localization and practice the algorithm by AMCL package, the following point inform the step taked in this project;

  • In Gazebo, use the Building Editor to create a robot's enviroment.

  • Teleoperate the robot and test SLAM manually and finally create the map.

  • Test the amcl package are work well by using the ROS navigation stack and the 2D Nav Goal arrow in rviz, so I manually direct the robot to go to different points.

  • Create a pickup objects node to direct the robot to the desired pickup and drop-off locations.

  • Modify pick_objects node and add_markers node to establish communication between them, to complete desired home service robot implementation

Prerequisites

(since I have not tested on multiple platforms, and versions, I am listing only the configuration I used)

  • Ubuntu 16.04 OS with default make (>=4.1) and g++/gcc (>=5.4) packages
  • Gazebo >= 7.0
  • ROS Kinetic
  • following ROS packages were used and the process of obtaining them is detailed below:
    • gmapping
    • turtlebot_teleop
    • turtlebot_rviz_launchers
    • turtlebot_gazebo

Directory Tree and contents

.
├── README.md
│   ├── ... ...
├── CMakeLists.txt
├── add_markers
│   ├── include 
│   └── src
│       ├── add_markers.cpp
│       └── add_markers_time.cpp
├── pick_objects
│   └── src
│       ├── pickup_objects.cpp
│       
│   ├──  ... ...
├── scripts
│   ├── add_marker.sh
│   ├── home_service.sh
│   ├── launch.sh
│   ├── pickup_objects.sh
│   ├── test_navigation.sh
│   └── test_slam.sh
├── slam_gmapping
│   ├── gmapping
│   |── ... ...
├── turtlebot
│   |── turtlebot_teleop
│   |── ... ...
├── turtlebot_interactions
│   |── turtlebot_rviz_launchers
│   |── ... ...
|── turtlebot_simulator
│   ├── turtlebot_gazebo
│
│   ├──  ... ...
├── my_robot
│   ├── maps
│   │    ├── map.pmg
│   │    └── map.yaml
│   ├── worlds
│   │    └── finaloffice.world
│   └── ...
|── ... ...

This directory represents the main project's src folder structure with following contents

  • README.md: this file.
  • images - folder with images and videos for this report
  • add_markers - add marker C++ node
  • config - folder with configuration file to specify pick-up and drop-off locations
  • map - map and gazebo world files
  • pick_objects - pick-objects C++ node
  • rvizConfig - folder with rViz configurations used with some launch scripts
  • scripts - shell scripts
    • add_marker.sh - script for testing add_marker concept with add_markers_time.cpp
    • home_service.sh - main script for the home service robot
    • pickup_objects.sh - script for testing pick_objects concept with pick_objects_test
    • test_navigation.sh - script for testing navigation
    • test_slam.sh - script for performing SLAM and preparing map
  • slam_gmapping - official ROS package with gmapping_demo.launch file
  • turtlebot - official ROS package with keyboard_teleop.launch file
  • turtlebot_interactions - official ROS package with view_navigation.launch file
  • turtlebot_simulator - official ROS package with turtlebot_world.launch file

Clone and Build

Since the folder presented here comprises only of ROS package, one needs to first create a catkin workspace and initialize it. Also, note that the official ROS packaged are already included here, but their dependencies need to be installed; steps for this are given below.

Within your home directory, execute the following:

mkdir -p catkin_ws/src
cd catkin_ws/src
catkin_init_workspace

Install dependencies:

rosdep -i install gmapping -y
rosdep -i install turtlebot_teleop -y
rosdep -i install turtlebot_rviz_launchers -y
rosdep -i install turtlebot_gazebo -y

NOTE: If any of the official packages give error, I recommed you delete associated folder and clone with src folder using appropriate line from here:

git clone https://github.com/ros-perception/slam_gmapping.git  
git clone https://github.com/turtlebot/turtlebot.git  
git clone https://github.com/turtlebot/turtlebot_interactions.git  
git clone https://github.com/turtlebot/turtlebot_simulator.git

Go back to catkin workspace and build it

cd catkin_ws/
catkin_make

Launch specific application and visualize

Specific applications can be launched using scripts provided. In this section I will go over how I have used these scripts.

Gazebo-world, SLAM test & map-creation

For my world file I started with the gazebo-world I have used in past. However, during SLAM and map preparation I realized that this world had following flaws:

  • it has very few features and a lot of open space. This leads to gmapping error with following messages:
    • Scan Matching Failed, using odometry. Likelihood=0
  • There were two carts in the model which were not fixed. So while the robot completed a loop and came back to a spot near one of the carts, the mapping algorithm was getting confused and resulting in image rotation in rviz, similar to that shown below.

For SLAM-test go to src/scripts folder and run test_slam.sh script:

cd catkin_ws/src/scripts
./test_slam.sh

This will launch:

  • turtlebot_world.launch to deploy turtlebot in my world with specific pose
  • gmapping_demo.launch to perform SLAM
  • view_navigation.launch to observe map in rviz
  • keyboard_teleop.launch to manually control robot

After navigating the robot around multiple times, once I was satisfied with the map appearance in comparison to the world-file, I saved it using:

rosrun map_server map_saver -f <map-location-and-name>

Localization and navigation test

For localization testing, I used test_localization.sh as follows:

cd catkin_ws/src/scripts
./test_localization.sh

This will launch:

  • turtlebot_world.launch to deploy turtlebot in my world with specific pose
  • amcl_demo.launch to localize turtlebot
  • view_navigation.launch to observe map in rviz

I used 2D Nav tab in rviz to manually point out to two different goals, one at a time, and direct the robot to reach them and orient itself with respect to them.

Navigation Goal Node (pick-objects)

To test robot's capability to reach multiple goals, as specified by the program (and not manually), I created pick_objects package and specifically pick_objects_test.cpp function. This can be tested following script which launches turtlebot, AMCL, rviz and pick_objects node:

cd catkin_ws/src/scripts
./pickup_objects.sh
Virtual Objects Node (add-markers)

To model a virtual object with markers in rviz, I created add_markers package and specifically add_markers.cpp function. This can be tested following script which launches turtlebot, AMCL, rviz and add_markers node:

cd catkin_ws/src/scripts
./add_markers.sh
Home-Service-Robot package

To simulate a full home service robot capable of navigating to pick up and deliver virtual objects, communication was established between the add_markers and pick_objects nodes via a "/goal_reached" topic. For this purpose modified versions of previous test codes were created respectively pick_objects.cpp and add_markers.cpp. The entire package can be launched using:

cd catkin_ws/src/scripts
./home_service.sh

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published