If you can't understand LaserRangeFinder come in(Just to newer,Thanks to Paul)
Many people use Microsoft Robotic Studio just to understand how robots works,or how to make a program to control a robot in the attracted simulation environment.Sometimes they don’t have a “real” robot,I am one of them.
So it may be hard to understand how the robot works,especially sensors on robot(like contact or LRF sensor).I post my question on this form,many warm-heart and kind people helped me(like Paul,thanks you a lot).Now I think I have understood how LRF works,so I share it to many green-hand hope it helps :-D
In the LRF sensor.it return a value of an int-type array named DistanceMeasurements.If you don’t do any change to it,it updatas 5 time per second.The index of it from 0 to n (n = DistanceMeasurements.Length).0 Means the most right side. n means the most left side.it clearly that n/2 means the forward of the bot.To present clearly,I “draw” the following picture:
-90 to -22.5 degrees - referred to as "Right"
-22.5 to 22.5 degrees - referred to as "Center" (a 45 degree arc centered on the direction the robot is facing)
22.5 to 90 degrees - referred to as "Left"
DistanceMeasurements:
_,,.-/-.,,,
,-'` | `'-,
_,' | ``. .
`. ,- | ', .`
', / | \ .`
.', |PI/2 .-`
/ `. | .` \
/ `. | .` \ Right
Left / `. | .` ,
| `. | .` |
| `. | .` |
| `. | .` |
| `.| .` |
PI--\`- 0
nn/20
So in the program,we define these variables:
Offset,Limit : The right and left range of once check.
Increment : It’s easy to understand,like “delta”.
Best : Now smallest num found in once scan.
Name : Partition different type of scan.
In the program robot compare 3 different variables : Left,Right,Centre,if a obstacle in the forward of this robot,he should turn to left or right side(lie on their values).
Hope it helps
Tan Wangda.

