This project simulates a four wheeled service robot that collects an item from one points and drops it in another location. The project is implemented using ROS localization and slam packages as seen below:
The robot is created using urdf files and xacro and simulated in Gazebo. It uses Gazebo camera and lidar plugins along with skid steer drive controller plugin for control.
The mapping is done using gmapping
ros package which is a wrapper for OpenSlam Gmapping
library that uses lidar and robot pose from wheel odometry to create a 2D occupancy grid map of robots environement. Gmapping uses Rao-Blackwellized particle filters for occupancy grid mapping. In their approach each particle carries an individual map of the evironment and the number of particles are minimized by marginalization. This package is used to generate an occupany grid map of the gazebo world and fed into the localization package.
The localization is done using the AMCL
localization package. AMLC package takes in an occupancy grid map and uses laser scan to estimate robot's pose. This package has three categories of parameters for tuning: Overall filter parameters, Laser model parameters, Odometry model parameters. The odom model used is diff-corrected and the laser model is likelihood-field.
The navigation is performed using move_base
package. It uses a global and local planner that each use an individual cost map to navigate the robot to a goal point in the environment. It can use different local and global planners that adhere to nav_core::BaseGlobalPlanner interface. Here the navfn is used for global planner that uses Dijkstra's algorithm. base_local_planner is used for the local planner that uses Trajectory Rollout to estimate velocity commands required to move the robot in the right direction. Trajectory Rollout is based on discrete sampling of the robot's control space (velocities) and perform forward simulation for each sample to find the best trajectory using different measures like proximity to obstacles, global path, or etc. These criteria can be fine-tuned based on the robot's environment.
$ git clone https://github.com/farzingkh/Service-Robot.git
$ cd Service-Robot/catkin_ws
$ catkin_make
$ source devel/setup.bash
$ ./src/service.sh
Use other provided scripts for testing and fine tuning the parameters.
catkin_ws/src ├── add_markers │ ├── CMakeLists.txt │ ├── package.xml │ └── src │ └── add_markers.cpp ├── amcl_localization │ ├── CMakeLists.txt │ ├── config │ │ ├── base_local_planner_params.yaml │ │ ├── costmap_common_params.yaml │ │ ├── global_costmap_params.yaml │ │ ├── local_costmap_params.yaml │ │ └── __MACOSX │ ├── launch │ │ └── amcl.launch │ ├── maps │ │ ├── map.pgm │ │ └── map.yaml │ └── package.xml ├── maps │ ├── CMakeLists.txt │ ├── mymap.pgm │ ├── mymap.yaml │ └── package.xml ├── pick_objects │ ├── CMakeLists.txt │ ├── package.xml │ └── src │ └── pick_objects.cpp ├── robot │ ├── CMakeLists.txt │ ├── launch │ │ ├── robot_description.launch │ │ └── world.launch │ ├── meshes │ │ └── hokuyo.dae │ ├── package.xml │ ├── rviz │ │ └── RViz.rviz │ ├── urdf │ │ ├── my_robot.gazebo │ │ └── my_robot.xacro │ └── world │ ├── empty.world │ └── office.world ├── rvizConfig │ ├── CMakeLists.txt │ ├── package.xml │ └── RViz.rviz ├── scripts │ ├── add_markers.sh │ ├── pick_objects.sh │ ├── test_navigation.sh │ └── test_slam.sh ├── slam_gmapping │ ├── gmapping │ └── slam_gmapping └── teleop_twist_keyboard