Virtual World Posted March 4, 2011 Report Share Posted March 4, 2011 I made SCARA Robot in Solidworks and imported in LAbVIEW using 3D Picture control toolkit. I am being able to access individual part.....however I still have some mating issues between few parts.... Please have a look at VI I have attached and see how Angle change for Arm2 gives weird Rotation, I guess center of Rotation needs to be moved but don't know how. Need help. Thanks in advance. SCARA.zip Quote Link to comment
Virtual World Posted March 7, 2011 Author Report Share Posted March 7, 2011 No One I made SCARA Robot in Solidworks and imported in LAbVIEW using 3D Picture control toolkit. I am being able to access individual part.....however I still have some mating issues between few parts.... Please have a look at VI I have attached and see how Angle change for Arm2 gives weird Rotation, I guess center of Rotation needs to be moved but don't know how. Need help. Thanks in advance. SCARA.zip Quote Link to comment
vugie Posted March 7, 2011 Report Share Posted March 7, 2011 Save it in 2009 - I'll take a look Quote Link to comment
Virtual World Posted March 7, 2011 Author Report Share Posted March 7, 2011 Here it is ....I just got a reply from Ben to contact you.....Thanks a lot for your helpSCARA2009.zip Save it in 2009 - I'll take a look Quote Link to comment
vugie Posted March 8, 2011 Report Share Posted March 8, 2011 I made SCARA Robot in Solidworks and imported in LAbVIEW using 3D Picture control toolkit. I am being able to access individual part.....however I still have some mating issues between few parts.... Please have a look at VI I have attached and see how Angle change for Arm2 gives weird Rotation, I guess center of Rotation needs to be moved but don't know how. Need help. Thanks in advance. The rotation pivot is always in (0,0,0) of local coordinate system. When you import objects from external file, they hasn't any initial transformation (even if they look like). So in order to rotate an object around pivot of your choice, you have to translate the object so that pivot is in (0,0,0) of parent object, then rotate it and translate it back: Note that Rotate and Translate has to be used instead of Set Rotation and Set Translation (which clear transformation) 1 Quote Link to comment
Virtual World Posted March 8, 2011 Author Report Share Posted March 8, 2011 THANK YOU The rotation pivot is always in (0,0,0) of local coordinate system. When you import objects from external file, they hasn't any initial transformation (even if they look like). So in order to rotate an object around pivot of your choice, you have to translate the object so that pivot is in (0,0,0) of parent object, then rotate it and translate it back: Note that Rotate and Translate has to be used instead of Set Rotation and Set Translation (which clear transformation) Quote Link to comment
Virtual World Posted March 24, 2011 Author Report Share Posted March 24, 2011 Hello Vugie ...Few more favors plzzz Is there a way I can focus and zoom in zoom out particular portion of the scene, I can do it along Z axis but it will zoom whole scene. I guess Camera Control setting but not getting how to do it. Also 1. When I RUN a vi, change camera (spherical) position and STOP a vi, next time I run my vi scene display shows last Camera position, Is there a way that for every new RUN of a program Scene Display erases old image and starts over again. Looks like re initializing Camera Position. 2. Scene in Continuous loop and Camera Controller >> Spherical. Scene display gives kind of broken and flashy display while changing camera position using mouse. 3. If I translate any object and again translate-rotate to change center of rotation, isn't it Total translation and then rotation. 4. When I plan to show stretch/compress from one end, it will be again translating object half a distance similar to Pivot ??? Is there any easy way to find Translation you apply to move your center of rotation, I waste lot of time when I import someone's vrml model, its lot easy if I make my own using 3D geometries at least I know half a distance to move. <br clear="all"> Also see another method I am trying in which I have all 3 objects imported as a separate vrml and I called via one vrml. I tried different translate-rotate combination but nothings working out Thanks in Advance For Some reason I am not being able to attach I also posted same question on NI forum which is here at the end, to download my vi SCARA3309 Quote Link to comment
vugie Posted March 25, 2011 Report Share Posted March 25, 2011 Is there a way I can focus and zoom in zoom out particular portion of the scene, I can do it along Z axis but it will zoom whole scene. I guess Camera Control setting but not getting how to do it. What do you mean by zooming, but not the whole scene? And programatically or with native interface? I guess you know Shift+LMB+drag and Ctrl+LMB+drag combos... 1. When I RUN a vi, change camera (spherical) position and STOP a vi, next time I run my vi scene display shows last Camera position, Is there a way that for every new RUN of a program Scene Display erases old image and starts over again. Looks like re initializing Camera Position. Setup Camera method of 3D Picture control. You might also like to play with Modelview Matrix (property of 3D Picture). Refer to uncle G. and this forum. Keywords: modelview, OpenGL 2. Scene in Continuous loop and Camera Controller >> Spherical. Scene display gives kind of broken and flashy display while changing camera position using mouse. Probably you have "Auto Redraw" checked. Control is updated periodically and it may happen that it is being refreshed in the middle of some transformation. Particularly if you do transformation each iteration. 3. If I translate any object and again translate-rotate to change center of rotation, isn't it Total translation and then rotation. Yes, but rotation always is first. So you have to sum rotated translations. 4. When I plan to show stretch/compress from one end, it will be again translating object half a distance similar to Pivot ??? Is there any easy way to find Translation you apply to move your center of rotation, I waste lot of time when I import someone's vrml model, its lot easy if I make my own using 3D geometries at least I know half a distance to move. <br clear="all"> Also see another method I am trying in which I have all 3 objects imported as a separate vrml and I called via one vrml. I tried different translate-rotate combination but nothings working out Internally transformations are stored as 4x4 Transformation Matrix (it is a property of SceneObject). Total object transformation (rotation, translation and scale) in relation to parent is coded inside it. There are many good articles about it. Understanding it helps a lot. Similar issues where already mentioned on this forum as well. As for the file attached - again - 2009 please And please clearly mark if you do cross-posting (indicating links at both places) 1 Quote Link to comment
Virtual World Posted March 25, 2011 Author Report Share Posted March 25, 2011 (edited) What do you mean by zooming, but not the whole scene? And programatically or with native interface? I guess you know Shift+LMB+drag and Ctrl+LMB+drag combos... Yes I know about native interface, I want to do it programmatically. If you see in figure below cyan box is the scope and there is horizontal Z Arm base (Red) with Object (Blue). I want to zoom in/out base and view the object from close distance. Setup Camera method of 3D Picture control. You might also like to play with Modelview Matrix (property of 3D Picture). Refer to uncle G. and this forum. Keywords: modelview, OpenGL I can not find this links by Uncle G. I resolved that AutoRedraw check issue I will search more about model matrix in open GL...thanks for guiding me Attached 2009 version VI and on NI website here Sorry if I am not following particular protocols and asking primitive question....Just consider me as a beginner Thanks again Edited March 25, 2011 by Virtual World Quote Link to comment
vugie Posted March 25, 2011 Report Share Posted March 25, 2011 Yes I know about native interface, I want to do it programmatically. If you see in figure below cyan box is the scope and there is horizontal Z Arm base (Red) with Object (Blue). I want to zoom in/out base and view the object from close distance. If you want to use perspective projection, use either Setup Camera, Projection.Frustum, or Projection.Perspective methods to zoom. For orthographic projection you have to directly modify projection matrix (property of 3D Picture). I can not find this links by Uncle G. Here, here, here, here, here, here Quote Link to comment
Virtual World Posted March 25, 2011 Author Report Share Posted March 25, 2011 Thanks Vugie I will check those properties. Also have you looked at the 2009 v VI I attched on NI website. Can you please have a look. Quote Link to comment
Virtual World Posted March 28, 2011 Author Report Share Posted March 28, 2011 Thanks Vugie I will check those properties. Also have you looked at the 2009 v VI I attched on NI website. Can you please have a look. Also see another method I am trying in which I have all 3 objects imported as a separate vrml and I called via one vrml. I tried different translate-rotate combination but nothings working out Now I am being able to attach it on LAVA, can you show me where I am making mistake. Also about the zooming thing methods you have suggested will zoom in/out complete scene, I wanted only particular part to be zoom. Thanks VugieSCARA 33v09.zip Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.