Skip to content

This project uses the Adaptive Monte Carlo Localization algorithm in ROS to localize a mobile robot!

License

Notifications You must be signed in to change notification settings

Vamshi2198/Where-am-I

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation



Find the location of a mobile robot using AMCL Agorithm

OverviewPrerequisitesDirectory StructureHow To LaunchTesting

Overview

This project is a part of Udacity's Robotics Software Engineer Nanodegree Program. In this project, I used ROSbot as a mobile robot and aws-robomaker-small-house-world as a gazebo world to replicate realistic simulation. ROSbot is localized using ROS AMCL (Adaptive Monte Carlo Localization) package inside a map in the simulation environment. The map is generated using gazebo_ros_2Dmap_plugin. There are two options to control the robot and see how it localizes in the simulation environment:

  1. 2D Navigation Goal:
  • The first option would be sending a 2D Nav Goal from RViz. The move_base will try to navigate your robot based on the new observation and the odometry to perform the localization, you could also give the robot an initial position estimate on the map using 2D Pose Estimate.
  1. teleop_node:
  • You can use teleop_twist_keyboard node to control ROSbot using the keyboard keys.

Prerequisites

  • Gazebo >= 7.0
  • ROS >= Kinetic
  • ROS navigation package
sudo apt-get install ros-${ROS_DISTRO}-navigation
  • ROS map_server package
sudo apt-get install ros-${ROS_DISTRO}-map-server
  • ROS move_base package
sudo apt-get install ros-${ROS_DISTRO}-move-base
  • ROS amcl package
sudo apt-get install ros-${ROS_DISTRO}-amcl

Directory Structure

.Where-am-I                                    # Where am I Project
├── catkin_ws                                  # Catkin workspace
│   ├── src
│   │   ├── aws-robomaker-small-house-world    # package that contains small house world
│   │   ├── gazebo_ros_2Dmap_plugin            # package that contains plugin to generate map of simulated world
│   │   ├── images 
│   │   ├── my_robot                           # my_robot package 
│   │   │   ├── config                         # config folder for configuration files   
│   │   │   │   ├── base_local_planner_params.yaml
│   │   │   │   ├── costmap_common_params.yaml
│   │   │   │   ├── global_costmap_params.yaml
│   │   │   │   ├── local_costmap_params.yaml
│   │   │   ├── launch                         # launch folder for launch files  
│   │   │   │   ├── amcl.launch                # Launches AMCL node 
│   │   │   │   ├── robot_description.launch
│   │   │   │   ├── world.launch               # Launches bookstore world
│   │   │   │   ├── teleop.launch              # To drive the rosbot
│   │   │   ├── maps                           # folder that contains maps
│   │   │   │   ├── map_generated.pgm
│   │   │   │   ├── map_generated.yaml
│   │   │   ├── meshes                         # meshes folder for sensors
│   │   │   │   ├── astra.stl
│   │   │   │   ├── box.stl
│   │   │   │   ├── rplidar.stl
│   │   │   │   ├── upper.stl
│   │   │   │   ├── wheel.stl
│   │   │   ├── realsense2_camera              # folder that contains launch files for realsense camera
│   │   │   ├── realsense2_description         # folder that contains description files for realsense camera
│   │   │   ├── urdf                           # urdf folder for xarco files
│   │   │   │   ├── materials.xacro            #contains material properties used in rosbot
│   │   │   │   ├── my_robot.xacro             
│   │   │   │   ├── rosbot.gazebo              #contains plugins to interact with rosbot
│   │   │   ├── worlds                         # world folder for world files
│   │   │   │   ├── empty.world
│   │   │   ├── CMakeLists.txt                 # compiler instructions
│   │   │   ├── Where-am-I.rviz                # rviz configuration
│   │   │   ├── package.xml                    # package info
│   │   ├── teleop_twist_keyboard              # package that contains teleop_node to control ROSbot with keyboard

How To Launch

Clone the project in catkin_ws/src/ and source the environment

$ cd /home/workspace/catkin_ws/src/
$ git clone https://github.com/Vamshi2198/Where-am-I
$ source /opt/ros/${ROS_DISTRO}/setup.bash

Note : The world file proivided is empy because it only contains the url of remote repository, for this purpose you need to clone the aws-bookstore-world and place it inside your src folder. Also, delete the folder named aws-robomaker-bookstore-world manually before cloning.

$ cd /home/workspace/catkin_ws/src/Where-am-I/src/
$ git clone https://github.com/aws-robotics/aws-robomaker-small-house-world

Also, repeat the same with gazebo_ros_2Dmap_plugin and teleop_twist_keyboard packages. i.e, remove the empty file folder and clone the packages

$ cd /home/workspace/catkin_ws/src/Where-am-I/src/
$ git clone https://github.com/marinaKollmitz/gazebo_ros_2Dmap_plugin
$ git clone https://github.com/ros-teleop/teleop_twist_keyboard

Build the Where-am-I project

$ cd /home/workspace/catkin_ws/ 
$ catkin_make

After building the package, source your workspace

$ cd /home/workspace/catkin_ws/
$ source devel/setup.bash

Launch my_robot in Gazebo

$ roslaunch my_robot world.launch

Launch amcl node

$ roslaunch my_robot amcl.launch

Testing

Click the 2D Nav Goal button in the toolbar, then click and drag on the map to send the goal to the robot. It will start moving and localize itself in the process. if you want to use teleop_node then run :

$ rosrun teleop_twist_keyboard teleop_twist_keyboard.py

The code was tested on the following specifications:

  • Processor: Intel Core i7-10875H
  • Graphics: Nvidia GeForce GTX 1650 Ti 4GB GDDR6
  • OS: Ubuntu 20.04.3 LTS
  • Kernal: 5.10.60.1-microsoft-standard-WSL2
  • ROS: noetic

About

This project uses the Adaptive Monte Carlo Localization algorithm in ROS to localize a mobile robot!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published