Academic Hardware Products (myDAQ, myRIO)

cancel
Showing results for 
Search instead for 
Did you mean: 

Hokuyo_URG-04LX-UG01_ with NI-MyRIO

Good Afternoon, 

 

I am using myRIO and  URG-04LX-UG01 together and trying to get the distance of the obstacle, but the URG-04LX-UG01 is only giving me magnitudes and directions with a very huge size of array. 

I tried to get the distance with practical way to get an equation that represent a relation between the magnitude and distance. but that did not work since the magnitudes were almost the same in all cases. 

Any idea how to get the distance ?

Thanks

Download All
0 Kudos
Message 1 of 5
(3,513 Views)

Hello AishaRadwan

 

Have you tried to implement an average with all the data?

 

Regards

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

Hello Mr. David22JRA,

 

You mean to take the average of the magnitudes and the directions? 

how that will help to find the distance?

 

Appreciate your response 

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

Hello AishaRadwan

 

Could you upload a graphical example?

 

Feel free to use any graph or any diagram

 

Regards

0 Kudos
Message 4 of 5
(3,444 Views)

Hi the equation is very easy , if you want the magnitude and angle of an obstacle :

The angle of the obstacle:

we had:A (D, Theta) list of vector with distance and angles

Ax=D*cos(Thetha)

Ay=D*sin(Thetha)

AXtotal=Sum(Ax)

AYtotal=Sum(Ay)

angle=atan2(Ay,Ax)

for the distance to the object:

d=sum(D)/(number of distances)

 

I hope this help

 

 

 

 

 

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