LabVIEW for LEGO MINDSTORMS and LabVIEW for Education

cancel
Showing results for 
Search instead for 
Did you mean: 

Ultrasonic sensor to move around obstacle

Hi I'm looking for a solution to use the Ultrasonic sensor to move around  an obstacle. I'm using Labview with NXT, I have looked online but I cant find one. I can get the sonar to see the obstacle, reverse and go in a random direction. But I would love to make my robot see the obstacle and move around it, I'm new to the scene and only a beginner.

 

Thanks for any help/info.

 

Trevor

0 Kudos
Message 1 of 3
(5,984 Views)

If you are using a single size obstacle, you can use "drive distance"  to make a 90 degree turn left or right, move forward sufficiently to clear the obstacle, turn 90 degrees in the opposite direction and more forward again to clear the depth of the obstacle, then turn 90 degrees to return to the original path and then turn 90 degrees to be on your way again.  Drive distance is in degrees of wheel travel so you will have to calibrate how much 90 degrees is based on the size of the wheels you are using.  I hope that helps.

0 Kudos
Message 2 of 3
(5,975 Views)

Hi thanks for the reply, I'll try want you have said, But that could be a bit hard for me as I am new to the scene,But I will try it, Will it be something on the lines of the ultrasonic sensor connected to a case structure. If true do what you suggested in your post, If false have the motors go forward, all inside a while loop.

 

Thanks for any info/help

 

0 Kudos
Message 3 of 3
(5,971 Views)