Coder Social home page Coder Social logo

kvnptl / safety_detector_robot Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 45.14 MB

Obstacle detection (custom) robot using 2D Lidar sensor (Hokuyo). Robot stops moving once obstacle detected within its safety boundry.

CMake 68.95% C++ 31.05%
ros robotics mobile-robot obstacle-detection robot shield

safety_detector_robot's Introduction

Safety detector robot

Output:

Here, I am using linear equations to make a shield around the robot for obstacle detection.

I am considering +ve slope slope line and -ve slope line for making it as a triangle.

Overview: A subscriber function receives laser scan data (Format: 1-D array of float values) from hokuyu sensor and checking whether data range values fall whithin robot shield. If obstacle detected whithin the limit, then the robot will immediately stop by publishing 0 value on cmd_vel topic (subscribed by gazebo). If no obstacle detects,then robot will constinue its jounrney forward untill it hits the obstacle.

Logic:

Here, I am using linear equations to make a shield around the robot for obstacle detection.

I am considering the +ve slope line and -ve slope line for making it a triangle.

Code: Using For loop to check data from peak to the bottom (as shown by the array in the figure)

algo

How to run:

  1. Terminal 1: roslaunch my_robot world.launch
  2. Terminal 2: roslaunch my_robot safety_detector.launch

safety_detector_robot's People

Contributors

kvnptl avatar

Stargazers

 avatar  avatar

Watchers

 avatar

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.