Skip to content

Latest commit

 

History

History
27 lines (16 loc) · 1.26 KB

README.md

File metadata and controls

27 lines (16 loc) · 1.26 KB

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