An open API service indexing awesome lists of open source software.

https://github.com/mtrebi/catkin_ws

Bug0 navigation algorithm in a Turtlebot 2.0 to move from A to B avoiding obstacles
https://github.com/mtrebi/catkin_ws

navigation turtlebot turtlebot-avoiding-bostacles

Last synced: 7 months ago
JSON representation

Bug0 navigation algorithm in a Turtlebot 2.0 to move from A to B avoiding obstacles

Awesome Lists containing this project

README

          

# turtlebot
## Demo
Checkout the videos! (click on the image)

[![Turtlebot avoiding bostacles](http://img.youtube.com/vi/7wiXgdLNfO0/0.jpg)](https://www.youtube.com/watch?v=7wiXgdLNfO0&list=PLeGS7otZ9mSc-kfSqJHZLcTUpjxLSWuh7&index=1 "Turtlebot avoiding bostacles")

## Implementation
Implementation of Bug0 navigation strategy with a Turtlebot.

Bug0 Pseudocode:

1. Head toward goal
2. Follow obstacles until you can head toward goal again
3. Continue

To do so we use:

- Subscribe to Odometry to do positioning (known current position & goal)
- Subscribe to Laser Scan to detect objects
- Publish to Speed (Linear & Angular)

We have defined some global vars to customize the behaviour of the Bug0 algorithm:
distance (m) detection of obstacte when the robot stop and begin to turn
self.obstacle_threshold = 1

distance (m) obstacle_threshold+obstacle_threshold_add when the robot detects that the robot i more far starts to go fowrward to avoid it
- self.obstacle_threshold_add = 0.25

distance (m) in status 2 that the robot move to try avoid the obstracle and go to the goal after turn in front of obstracle
- self.distance_try_avoid_obstacle = 0.4

this linear variable * distance to goal lets to make a variable velocity
- self.linear_constant=0.5

max speed of the robot, if is very high is possible that the robot don't have enought time for stop whith obstabce
- self.max_speed=0.25

- self.accepted_error_try_avoid_obstable = 0.1

degrees/sec that turns the robot when detects obstable.
- self.turn_speed = 25

this linear velocity variable * distance to goal lets to make a variable linear velocity
- self.head_toward_linear_constant=1

this angular velocity variable * distance to goal lets to make a variable angular velocity
- self.head_toward_angular_constant=2