LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Maapping using Maxsonar

Hello everyone,

I am a beginner and trying to use the maxsonar EZ1 sensor on a robot to perform mapping. The maxsonar would be placed on a 180 degree rotating servo, just like the PING ))) on DANI Robot. I really have no knowledge on how to proceed. I am getting better at labview but need your expert advices.

Regards,
Danish

0 Kudos
Message 1 of 10
(3,255 Views)

Hi Danish,

              see the attachment:-

              http://www.ni.com/white-paper/11564/en

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Thanks as kudos only:)
0 Kudos
Message 2 of 10
(3,252 Views)

Thanks for the reply, and i have gone through that. But i need a little more advanced information. like the kind of mapping required and how i would be able to achieve it,, i.e. a sketch of the VI i would require.
Regards,
Danish

0 Kudos
Message 3 of 10
(3,248 Views)

Please help us help you. Give more information. I do not work for NI, so I am not going to go around looking for the manual for this EZ1. I've used sensors before, and it would all depend on the data transfer protocol. From the name, I can see it is a sonar sensor, so I would need to know if the sensor actually gives you numeric data or a pulse that you would have to measure its width.

 

I've used a sonar sensor before but not with labview. But I think I may be able to help anyway.

0 Kudos
Message 4 of 10
(3,242 Views)

The maxsonar is one of the best in the market, with an inch resolution, and can sense upto 6.5 meters, and consumes only 2mA current. There are three output pins; Serial (9600 baud), Analog and PWM. Depending upon your application you can choose the kind of output you require. I will be using the PWM output. It does not support I2C, but thats alright.
the sonar is mounted on a servo, which rotates at 180 degrees. Need anything more?

Regards,
Danish

0 Kudos
Message 5 of 10
(3,225 Views)

I'm not sure what you mean by mapping. You will connect the PW pin from the sensor to some sort of device that hooks up to your computer. I have no idea what device you will be using. In any case, there will be no "drivers" of any sort, and I believe this will be very low level, but it seems quite simple. All you would do is detect a rising edge, start a timer and read its value once you get a falling edge. Alternatively, you could use a timed loop that simply increments some number (use registers or feedback node) after a rising edge and read the value of the register after getting a falling edge (see sensor.vi attached). Then you can convert that number into inches, depending on the timing of your loop. 

 

Keep in mind that this vi has not been tested. I also haven't thought it through fully, there may be easier / more efficient ways to do what I am suggesting.

Download All
0 Kudos
Message 6 of 10
(3,219 Views)

Thank you once again, your reply does help. I am using a mbile robot; and by mapping I mean, I want to let the robot move freely and the data it collects from the sonar (distances from edges and walls and stationary object) will be used to create a map of the room. Looking at the map, I will then guide my robot from a point A in the room to a point B, probably with new random moving obstacles in the way as well. This is my task.
Regards

0 Kudos
Message 7 of 10
(3,216 Views)

Oh, that. Never done it before, but let me think about it with you. Tt would be very centralized in my opinion. You would have several smaller maps that are relative to the location of the robot. With the robot in one position, you would get the sensor value at 0 degrees. Rotate the sensor, store the new value, repeat until you have completed a full circle.

Move the robot for some arbitrary distance, repeat the sensing, etc.


You could store that in an array that would look something like this

 

Coordinate from Starting position  |  Angle  |  Distance reported

0,00

0,010

0,020 

...

0,1

 

Then you could create a pixel array. start with coord 0,0, and paint some radius around it white (U8 255) except for those where a distance has been reported. Some trig would be involved. When you move to the next coordinate in the array, you somehow want to have a way to correlate that with the pixel map. And thats all I can come up with for now. Good luck filling all the gaps! This has been done many times, I remember seeing it (not with labview). Don't constrain yourself to the ni boards, you can get ideas from elsewhere. try to find actual papers from robotics journals or something.

 

By the way, what you are doing would probably be more easily done using a laser instead of sonar. Only drawback is that laser tends to be more exp, i think.

0 Kudos
Message 8 of 10
(3,214 Views)

okay that helps. but now the real trouble would be converting it into LABVIEW.
anyways thanks a lot friend.
Regards,
danish

0 Kudos
Message 9 of 10
(3,194 Views)

This isn't a description of exactly how to do it, but it might help (particulary section 3.3)

http://digitalrepository.trincoll.edu/cgi/viewcontent.cgi?article=1219&context=theses

 

 

This might help with your path planning question

http://forums.ni.com/t5/LabVIEW/quot-a-star-algorithm-quot/td-p/657081

0 Kudos
Message 10 of 10
(3,175 Views)