07-06-2008 07:15 PM
What determines the rotation speed and lenght of each stick at any given time?
>>> the stick has an encoder on it which gives rotational values from 0-360 degress, and a potentiometer (0-90 deg)which determines the length of each stick.
What is the program allowed to do to prevent collision (change speed/direction, change radius, stop everything)
>>>for instance if their distance is about 6 meters from each other i can change their speed from high speed to low speed and when it is on the minimum allowed distance possible, say 3 meters, both of them will stop and the only possible movement is go the other way.
Since you want to prevent collision, you need a predictive algorithm. Once they overlap, the collision has already happened. Too late!
>>>yes. that is what i am trying to find.
What information does your algorithm get (e.g. r1, r2, theta1, theta2, delta-thetat1, delta-theta2, etc.), i.e. does the program only get static information and need to construct the trajectory from sequential history data or does it get dynamic information about speed and direction?
>>>i do get dynamic data, i have the following data; coordinates of stick one at both ends, coordinates of stick two at both ends, Radius of each stick
07-07-2008 04:28 AM
Hello
I made an example VI to show what i wanted to do. But i am still stuck to the same problem of getting the nearest distance between the two lines. Kindly see the attached Vi`s.
If you run the VI, and play on the inclinometer and encoder control i will know if the two circle will have a chance to collide if the LED lits. But i still cant find out how can i get the distance between the two stick so that i can create a preventive measure before they will collide.
Thanks for any advise.
07-07-2008 04:51 AM
Hi jtc,
why do you think this don´t work? If you only need the distance, please try the attached example.
Hope it helps.
Mike
07-07-2008 04:58 AM
Hi jtc,
which distance do you mean?
Mike
07-07-2008 05:01 AM
07-07-2008 05:44 AM
Hi jtc,
that´s right. So you need the distance between the other two points? Please see my previous post.
Mike
07-07-2008 06:27 AM
Hi jtc,
is this what you want?
Mike
07-07-2008 04:05 PM
07-07-2008 09:00 PM
Hello Mike and Lynn,
Thank you for all your reply and sample VI. Please give me a little time to study your suggestions and will get back to you shortly.
Thanks a lot.
jtc