Project

General

Profile

Bug #3528

Fix obstacle avoidance issue

Added by msunardi over 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
High
Assignee:
-
Start date:
06/20/2013
Due date:
07/08/2013
% Done:

0%

Estimated time:
Spent time:

Description

When sonar detect obstacle, the robot supposed to do these steps:
  1. if (move==fwd && obstacle==front), doMove(reverse), else if (move==reverse && obstacle==rear), doMove(forward) //basically move in the opposite direction)
  2. if (obstacle==fwd-right), turn(left), else if (obstacle==fwd-left), turn(right), else if (obstacle== rear-left), turn(left), else if (obstacle==rear-right), turn(right)

Issue:
after several time successfully executing the above sequence, the robot stopped doing the sequence for unknown reasons. Find the reasons and fix it!

History

#1 Updated by msunardi over 6 years ago

File to update: src/navigation/motor_control/mcecsbot_base2/mcecsbot_base2.ino

#2 Updated by msunardi over 6 years ago

  • Due date set to 07/08/2013
  • Status changed from In Progress to Resolved

Found problem: no action is specified when in reverse and the back sonars detected obstacles. (This is fixed)

The rest of the time, troubleshooting so robot behaves more safely avoiding obstacles. Right now it avoids obstacle by:
  • if obstacle in front, move back a little bit
    • if obstacle in front left, turn right, else turn left
  • else (if obstacle is in back) go forward a little bit
    • if obstacle in back left, turn left, else turn right (in this case, we use "turn left/right" because we're using the same turning methods for when going fwd)

By "a little bit" it means: a random number generator was used to give a delay between 800 - 1500 milliseconds (in the Arduino code)

#3 Updated by Anonymous almost 6 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF