Giter Club home page Giter Club logo

obstacle-avoidance-turtlebot's Introduction

A Naive Obstacle Avoidance Technique for Turtlebot 3 implemented in ROS

This is a part of my small effort in creating some basic projects implemented in ROS. As I am totally new at learning ROS, feel free to give constructive comments. If you are absolutely new at learning ROS, it might help you. You may use the codes as-is.

Introduction

This is an obstacle avoidance technique simulated with Turtlebot 3 in Gazebo, ROS. The Turtlebot uses planar laser range-finder to detect obstacles in front as well as 15 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

demo.gif

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 18.04, ROS Melodic Morenia.

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

obstacle-avoidance-turtlebot's People

Contributors

enansakib avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

obstacle-avoidance-turtlebot's Issues

Query Regarding Algorithm used

Hi,

Can you please confirm which obstacle avoidance algorithm has been used for this project e.g bug 2 etc. Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.