10-21-2011 11:23 AM
In the model I drew of the posts and cross bar they are to scale i.e.
cross barr is exactly 7.33m and posts are exactly 2.44m high.
There are lines that extend (6 yards box which is on the model is exactly 5.5m from the centers of the posts)
In total the CAD drawing was 20m width and 6m long.
Using your formula :
(from the cross bar information)
=> (Scene units of field/Real field units)*Ball real units=Ball in scene.
=> (Scene units of field/7.33)*0.2=Ball in scene
How do I obtain the scene units of field. I would like to set Scene units of field=7.33 but how do I input this information to tell labview this? I think I am getting confused now. I think I will use a little of trial and error in meantime and figure it out until the ball moves the way I want it to.
Dont worry I will remove Set.scaling altogether.
Saqib
10-21-2011 11:30 AM
Sorry for the confusion. The idea is that the cross bar is 7.33 meters wide. How big is it in the model?
I guess you can determine this by
a) consulting your CAD program to see if they docment how they generate model data for objects with respect to scale, this might even be a setting available while exporting.
b) looking at the verticies of the crossbar and seeing its extent.
10-21-2011 11:42 AM
What I said in the begining is right actually, I just proved it to my self.
In the CAD drawing the picture is 20m wide (everything including the green)
I made a mistake with information I sent for the height. The height is actually 7m not 6m.
And from the orgin of the ball when I move ball from (000) to (10,1,0) the ball is at the top right corner of the net. This is true regardless of the ball radius.
So every increment is indeed 1m and that means therefore I the simulation reflects my CAD and as my CAD was exactly to scale as the real world dimensions then we are all happy. Yes I dont need set scale and this is going in the bin now.
Your formula is true too had my CAD package regardless of whether my package was to scale or not.
So conclusion is that i can say in confidence one increment is 1m. I hope you agree unless I am wrong again.
Stereovision: I will post this up, I am going out for about an hour.
However, I willl mention that I aim to place two cameras on the football pitch and will want to detect the football to obtain its 3d coordinates.
I have suceeded with one camera and done some vision techniques and obtain its 2 coordinates.
I will obtain my second camera next week and basically I would need to use the same vision techniques to both cameras and need to obtain the 3d coordinates (x,y and the z depth). I need information on how would I actually do sterovision using these two cameras. I will give detail more later.
Thanks
Saqib
10-22-2011 02:33 AM
Hello everybody
Well writing in to just update you all. I have sucessfully modified the VI to display the ball in the 3D space and also detect if the ball is over the line!
The reason why the ball didn't show up was because the translation in the while loop was "translation" not "setTranslation". The difference between these is that one is absolute which resets the position, which is vital otherwise the ball once in the loop will increment to infinity. So the setTYranslation did the trick as it always cleared the previous translations.
Overall I am satisfied with the model and with your support and encoaragement guys. Its helped a lot!
Stereovision:
Going to start reading on this today. I will also look at some forums and if I get stuck I will as usual post in my VI and you guys can guide me! Thank you.