LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Simulate Movement (rotation,translation) of object with images or similar

Hello guys, I'm trying to develop an app where I specify certain distance (in pixels or similar) so an image or object can move in the Y and X axis and can also rotate. For example Move 9 , Rotate 50, Move Backwards 39. Is this possible in Labview and if so what's the easiest way in your opinion I can accomplish it?. I appreciate any link or info you can provide me so I can start with the development, thanks in advanced !

0 Kudos
Message 1 of 8
(5,028 Views)

@LAJohn wrote:

Hello guys, I'm trying to develop an app where I specify certain distance (in pixels or similar) so an image or object can move in the Y and X axis and can also rotate. For example Move 9 , Rotate 50, Move Backwards 39. Is this possible in Labview and if so what's the easiest way in your opinion I can accomplish it?. I appreciate any link or info you can provide me so I can start with the development, thanks in advanced !


Look at the following LabVIEW example

 

Help -> Find Example.. -> Building User Interfaces -> Generating 2D Pictures -> 2d Serial Robot Animation.vi

 

Ben64

0 Kudos
Message 2 of 8
(5,015 Views)

Also look at the Generating 3D Pictures examples.  LabVIEW gives you VIs to generate simple objects (Boxes, Cones, Cylinders, Spheres), so this might get you started.  The Order of Transformations example shows how some of the LabVIEW tools are used.

 

Bob Schor

Message 3 of 8
(4,993 Views)

Thanks bob, I'm already using the labview example that creates an object and transforms it, but I can't manage to rotate an object and keep it in the same angle when moving forward, for example I rotate a box but when I move it in the X axis it doesn't respect the new angle it has and just moves forward with the angle of the object instead of moving forward in the new angle it has.

0 Kudos
Message 4 of 8
(4,967 Views)

If I understand your problem correctly, what you need to do is transform the distance you want your object to move "forward" into X and Y movements. the easiest way of doing it (that I know of) will be to use "Polar To Re/Im" from numeric>complex.

Just throw in the distance you want the object to move as "r" and the object's rotation angle (in radians) as "theta", and you'll get the neccessary movement in respect to X and Y.

So if your object is rotated 45 degrees, and you want it to move 10 cm forward:
r=10

theta=pi/4

 

then you'll get

X=7.07107

Y=7.07107

Message 5 of 8
(4,952 Views)

@robertlks wrote:

Thanks bob, I'm already using the labview example that creates an object and transforms it, but I can't manage to rotate an object and keep it in the same angle when moving forward, for example I rotate a box but when I move it in the X axis it doesn't respect the new angle it has and just moves forward with the angle of the object instead of moving forward in the new angle it has.


I think it is hopeless for us to help you unless you are more specific. Currently, there is not enough information given.

 

  • Are you talking about objects in 2D or 3D?
  • What is the name of the example you are using?
  • Can you show us the code that does not work?
  • What values are you using to control it?
  • What is your LabVIEW version?
Message 6 of 8
(4,941 Views)

 

  • Thanks for theinfo it really helped me and I'm using labview 2013. My solution at the end was to convert the X, Y translation according to the angle of movement.

    Best Regards. 
0 Kudos
Message 7 of 8
(4,932 Views)

good afternoon Bob. I am a math professor at miami dade college and i want to introduce the rotational matrices in my class of linear algebra through robotics.

the question is: how can i paint a link and a rotational joint, connect them and simulate different rotations in labView. 

i know that labView has a simulation module but i dont have any ideas.

thank you very much.

manolo

0 Kudos
Message 8 of 8
(3,637 Views)