LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Inverse Kinematics: Limiting possible trajectories?

First time poster:

 

I am using the Inverse Kinematics VI to control a robot arm. The base is resting on the table, and I am trying to figure out how to include some sort of condition that keeps the VI from trying to calculate trajectories that would make one of the joints try to go through the table. Also, the arm is wired to a Lynxmotion SSC-32 servo controller, so I am working on a VI that converts the joint angles into servo positions.

 

Another three questions I have:

--Depending on the what the end position is, the angle for the base joint changes, being either positive or negative, and that makes converting to the appropriate servo position for that servo a bit problematic. Any explanations for the difference in joint angle, or way to work around the problem?

--Why does setting the poses matter? I just experimented to try and figure out what difference the poses make, setting them all to "qn", and absolutely nothing appeared to change. Can somebody explain what purpose the Set Pose VI serves (and setting poses in general)?

--How do I get my starting and ending position values to be saved in the VI? Whenever I reopen the inversekin.vi, it reverts back to:

-----Start x: -0.6, Start y: -0.5, Start z: 0, End x: 0, End y: 0.5, End z: 0.4

 

Also, if my sub VI for getting the joint angles to within a range of -2pi to 2pi (instead of more than 70 radians, which the Inverse Kinematics VI sometimes calculates. Don't know why...) would help in looking at my program, I can provide that in a second post.

 

I am extremely new to programming, to the point where I am just starting to really understand how arrays are different from clusters. That is the level I am at, so please be kind and put everything in simple terms, and I would appreciate detailed explanations rather than (or at least, in addition to) any NI documentation, as I have found the tutorials and documentation unhelpful for one as inexperienced as myself.

 

Thanks in advance!

0 Kudos
Message 1 of 8
(2,675 Views)

Also, for some reason, I kept getting an error when I first tried to post and included attachments, so here they are.

Download All
0 Kudos
Message 2 of 8
(2,674 Views)

...And now the edit option is no longer working for me, so here is what I was going to add to my original post. Apologies for the second and third posts.

 

-------------------------------------------------------------------------------------------------------------------------------------------------

 

Some of the Start/End positions I am experimenting with:

--Start x: 0, Start y: -0.15, Start z: 0.29, End x: 0, End y: 0.18, End z: 0.1

--Start x: 0, Start y: -0.15, Start z: 0.29, End x: 0.05, End y: 0.18, End z: 0.1

--Start x: 0, Start y: -0.15, Start z: 0.29, End x: -0.05, End y: 0.18, End z: 0.1

--Start x: 0, Start y: 0.15, Start z: 0.23, End x: 0.05, End y: 0.12, End z: 0.19

--Start x: 0, Start y: -0.15, Start z: 0.23, End x: 0.05, End y: 0.12, End z: 0.19

--Start x: 0, Start y: -0.15, Start z: 0.23, End x: -0.05, End y: 0.12, End z: 0.19

 

The array of numeric indicators on the right show the final joint angles, and the first one is for the base joint. If you try the different position combos I listed, you'll see that sometimes it is negative, sometimes positive, and I don't understand why. Help?

0 Kudos
Message 3 of 8
(2,666 Views)

@boomboomboom wrote:

--How do I get my starting and ending position values to be saved in the VI?


 


I'll take the simple one: three ways:

- right-click on "Start X" on the front panel, select "DATA Operations" -> "Make Current Value Default"

- on the menu, select "Edit" -> "Make Current Values Default"

- right-click "Start X" (front panel or block diagram), select "Create" -> "Property Node" -> "Default Value". Right-click it and change it to Write. This way only works in the development environment - not on a built application.

 

 "Working Radians Correction.vi".

0 Kudos
Message 4 of 8
(2,659 Views)

Oops, meant to say you didn't attach "Working Radians Correction.vi"

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

One down, 4 to go! Thanks! Every little bit helps.

0 Kudos
Message 6 of 8
(2,656 Views)

The Set Pose.vi does not have any implications for inverse kinematics. It is merely a way to save standard positions of the arm and access them by name. This is a feature of some controllers that has been replicated.

 

Can you reiterate the outstanding problems I am unsure of what the 4 questions left are.

0 Kudos
Message 7 of 8
(2,624 Views)

Here is a method to normalize angles to between 0 and 2pi which I think will let you get appropriate servo values.

0 Kudos
Message 8 of 8
(2,622 Views)