Skip to content

Playing around with ROS and Gazebo ,Ball chasing robot.

Notifications You must be signed in to change notification settings

Nikerane/ball_chasing_robot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ball_chasing_robot

Playing around with ROS and Gazebo ,Ball chasing robot.

In this Project I have used Adaptive Monte Carlo Localization to make the robot move in a Gazebo environment.

Overview

In this project ROS AMCL package is used to localize a mobile robot inside a map in the Gazebo simulation environments. Few aims of this project are as follows:

  • Create a ROS package that launches a custom robot model in a custom Gazebo world
  • Utilize the ROS AMCL package and the Tele-Operation / Navigation Stack to localize the robot
  • Explore, add, and tune specific parameters corresponding to each package to achieve the best possible localization results
ball_chasing_robot_AMCL_Video.mp4

Prerequisites/Dependencies

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

Setup Instructions (abbreviated)

  1. Meet the Prerequisites/Dependencies
  2. Open Ubuntu Bash and clone the project repository
  3. On the command line execute
sudo apt-get update && sudo apt-get upgrade -y
  1. Build and run your code.

Run the project

  • Open the repository and make
catkin_make
  • Launch my_robot in Gazebo to load both the world and plugins
roslaunch my_robot world.launch
  • Launch amcl node
roslaunch my_robot amcl.launch
  • Testing
    You have two options to control your robot while it localize itself here:
    • Send navigation goal via RViz
    • Send move command via teleop package.
      Navigate your robot, observe its performance and tune your parameters for AMCL.

Option 1: Send 2D Navigation Goal
Your first option would be sending a 2D Nav Goal from RViz. The move_base will try to navigate your robot based on the localization. Based on the new observation and the odometry, the robot to further perform the localization.
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 would like to give amcl node a nudge, you could give the robot an initial position estimate on the map using 2D Pose Estimate.
Option 2: Use teleop Node
You could also use teleop node to control your robot and observe it localize itself in the environment.
Open another terminal and launch the teleop script:

rosrun teleop_twist_keyboard teleop_twist_keyboard.py

You could control your robot by keyboard commands now.

Tips

  1. It's recommended to update and upgrade your environment before running the code.
sudo apt-get update && sudo apt-get upgrade -y
  1. Got an error when launching amcl.launch
    check the amcl.launch file that you have correctly mapped the topics to the correct published ones
<remap to="scan" from="my_robot/laser/scan"/>  

About

Playing around with ROS and Gazebo ,Ball chasing robot.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published