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
- Host: GitHub
- URL: https://github.com/mtrebi/catkin_ws
- Owner: mtrebi
- License: mit
- Created: 2015-04-13T13:36:40.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2017-03-12T12:52:57.000Z (about 9 years ago)
- Last Synced: 2025-02-22T06:26:17.516Z (about 1 year ago)
- Topics: navigation, turtlebot, turtlebot-avoiding-bostacles
- Language: Python
- Homepage:
- Size: 150 KB
- Stars: 0
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# turtlebot
## Demo
Checkout the videos! (click on the image)
[](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