Skip to content

This package implements an obstacle avoidance algorithm for Turtlebot 3 using planar laser range-finder. It has been tested using Turtlebot 3 in ROS using Gazebo simulator.

Notifications You must be signed in to change notification settings

takkie-halimi/Obstacle-Avoidance-TurtleBot3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Obstacle Avoidance for Turtlebot 3 Using Planer-Ranger Finder implemented in ROS

Introduction

An obstacle avoidance algorithm simulated with Turtlebot 3 in Gazebo, ROS. The Turtlebot uses planar laser range-finder to detect obstacles in front as well as 10 degrees left and right from the front. Then based on the obstacle range, it either goes forward with linear velocity or, stops and rotates with angular velocity until it finds an obstacle-free path to go forward again.

Pre-requisites

Installation

cd ~/catkin_ws/src
git clone https://github.com/enansakib/obstacle-avoidance-turtlebot.git
cd ~/catkin_ws
catkin_make

Usage

roslaunch turtlebot3_gazebo turtlebot3_world.launch
roslaunch obstacle-avoidance-turtlebot naive_obs_avoid.launch

Demo

1.png 2.png

Details

The code inside the src folder already has necessary comments to understand what's going on. We define a obstacle_avoidance_node which subscribes to /scan topic and reads LaserScan type messages (because we want to detect obstacles). And it publishes Twist type message to /cmd_vel topic (because we want to move the robot).

If you do rosmsg show LaserScan and rosmsg show Twist, you would see the message formats.

  • we are interested in the float32[] ranges from the LaserScan message which is nothing but a list of 359 obstacle distances from the robot (0 degree to 359 degree). And,
  • we are interested in both linear and angular 3D vectors' x and z values, respectively (to move forward and rotate) from the Twist message.

Note

This is implemented on Ubuntu 16.04 LTS, ROS 1 version kinetic.

Reference

  1. http://wiki.ros.org/ROS/Tutorials
  2. https://github.com/ROBOTIS-GIT/turtlebot3_simulations.git
  3. http://gazebosim.org/tutorials?tut=ros_overview

About

This package implements an obstacle avoidance algorithm for Turtlebot 3 using planar laser range-finder. It has been tested using Turtlebot 3 in ROS using Gazebo simulator.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages