LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

find sudden point on XY graph

Hi, 

 

I'm trying to implementing a path plan algorithm, I'm trying to plot the correct sudden points on a XY graph reading from an input of Lidar in LabVIEW robotic simulation. The sudden point is defined as  determined by output of range sensor which detects the sudden changes in distance from sensor to the nearest obstacles. I upload a picture for you to look at it. 

sudden points.JPG

 

I have come with an implementation to find sudden points from an input of an instant reading of Lidar sensor. The inputs ontains magnitude and direction arrays. magnitude is an arry with length of radius from position of sensor to the detect edge(4m is the maximum range), and direction is an arry with degrees of angle from -70 degree to 70 degree corresponding to the elements in magnitude array. However, my implementation is not working.

 

I explain what I have done here. I compare magnitude array element of i with i+1. If their difference is greater than  0.8m, then, depend on which one is larger, I set a sudden point at the large element. To plot the XY graph I converted the radius and degrees into X and Y coordinate respectively. 

 

I upload the VI I created.

 

Thank you for any help.

 

Chao

 

 

 

0 Kudos
Message 1 of 7
(3,633 Views)

Chao,

 

Thank you for posting your code, could you tell me what typical input and output of the program looks like? Right now the magnitude and direction arrays are blank so I can't watch it work.

Austin
Staff Software Engineer
NI
Message 2 of 7
(3,573 Views)

Hi Austin,

 

Thank you for your reply, I didn't set the arrays into default values. I've come up with right implementation. But still thank you for your reply.

 

Chao

0 Kudos
Message 3 of 7
(3,540 Views)

I successly find the sudden points with Lidar data in robotic simulation as I said above. However, my project is involved in automous robot using a kinect. I got depth reading data from my group member in a XY coordinates 8 hours ago. And I have been trying to using this data to find sudden points. I've truncted the length of data from 8000 to around 2000 (all zeros and distance more than 3 meter are deleted).

 

I upload the XY graph here, 3 objects with shorter length are obstacles, the longest one is a wall.

detection.JPG

 

 

I have this thought, to find the sudden point, I group the data that are close to each other. In this way, the points that define objects are grouped. I would like to make lines to represent objects. So it's like using mathmatics to find the lines that the points of the objects are close to. 

 

I've uploaded the VI for kinect data VI,  set the data into default values and commented the VI.

 

Thank you for any help. 

 

Chao

0 Kudos
Message 4 of 7
(3,533 Views)

I've checked the curve fit formula, I've tried to feed it into a curve express VI. The result is a straight line. However, I would like to find the best fit(lines) for each objects in the XY grapgh seperatly. Do you guys have any ideas on how to do this?

 

Thank you for the help.

0 Kudos
Message 5 of 7
(3,527 Views)

It looks to me that you could try to calculate the first derivative for your data and then set a suitable threshold to identify your sudden points. 

0 Kudos
Message 6 of 7
(3,516 Views)

Chao,

 

It sounds like you've successfully identified your sudden points and now want to use those points to define the borders of objects in the environment, using curve fitting to define the borders using lines. Is that correct? If so, can you easily seperate the points into groups?

Austin
Staff Software Engineer
NI
0 Kudos
Message 7 of 7
(3,492 Views)