LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NXT Obstacle Avoidance Help.

I'm trying to program a robot to go around a track.  The track has a dashed line for us to follow.  It will also have obstacles on each side of the track for us to get around.  I am going to use a light sensor to follow the line and two distances sensors to detect when I get close to an obstacle.  If the distance sensor on the right gets to close to and obstacle then I need the robot to turn left to get around.  There is also a distance sensor on the left side of the robot to tell it when there is an obstacle on the left side of the track and it needs to move to the right.

 

I have the line follow working I just need help getting around the obstacles and then going back to the line follow untill another obstacle is detected.  In the attached file you can see what I have so far.  Thanks for any help you can give me this is my first time posting.  This is for a school project so I understand you can't give me the answer but if you could just point me in the right direction that would be greatly appreciated.

0 Kudos
Message 1 of 2
(3,480 Views)

The turning of the NXT is not very precise without the gyroscope released in the most recent version. You may not be able to turn a set amount to avoid the object. I recommend that you position the distance sensors on the furthest edges of the NXT so that you can use them to identify when you will clear the obstacle and then move forward greater then the distance last detected of the object and then turn back until the object is seen. Then you can turn slightly away from the object and proceed until you find the line. That strategy could work but I leave it up to you to decide how to implement it. The important point is to not allow the NXT to get stuck by avoiding the object by too little but still being able to find the line again reliably.  

Alex D
Systems Engineer
Academic Research
National Instruments
0 Kudos
Message 2 of 2
(3,445 Views)