LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Limiting Inverse Kinematics range?

Hello,

 

I'm currently experiencing a bit of a problem with the implementation of inverse kinematics in the robotics module.

 

I used the following example:

http://www.ni.com/white-paper/10687/en 

 

The problem is:

I want to set limits to the maximum allowed angles for the joints. For instance: a few of my DOF can only go from -90 degrees to + 90 degrees (PI rad). Is it possible to set limits/boundaries to the maximum angles used in the calculation for the inverse kinematics?

 

Forward kinematics works fine because then I can define my own input range for the specific DOF.

 

thanks in advance.

0 Kudos
Message 1 of 19
(3,622 Views)

Hi ,

 

Do you mean to set limits to the joint positions array?

 

Best regards,

 

Corné Westeneng

Applications Engineer

NI-Netherlands

0 Kudos
Message 2 of 19
(3,587 Views)

Can you use In Range and Coerce to coerce the values to be within limits?


@randy.k17 wrote:

Hello,

 

I'm currently experiencing a bit of a problem with the implementation of inverse kinematics in the robotics module.

 

I used the following example:

http://www.ni.com/white-paper/10687/en 

 


 

0 Kudos
Message 3 of 19
(3,585 Views)

Yeah that's what I mean. The inverse kinematics vi sometimes gives me solutions that I'm unable to reach with my robotic arm. I want to modify it in a way so that this isn't happening anymore. How can I set limits to the joint positions array?

0 Kudos
Message 4 of 19
(3,578 Views)

The In Range and Coerce Function will act on arrays, but you have to change the settings on the function.  Set the Comparision Type on the function to "compare elements" and it will process each element in the array and produce another array with coerced (not exceeding your limits) values.

0 Kudos
Message 5 of 19
(3,576 Views)

Thank you, I will try this tomorrow and let you know if it worked.

0 Kudos
Message 6 of 19
(3,570 Views)

Your range and coerce is quite helpful for indicating where the problem is. But it's not exactly the solution for my problem.

 

It's now possible to see which joint is exceeding it's value. But what I actually want is that the inverse kinematics VI doesn't calculate values that it isn't able to reach. For example: The 2nd and the 4th value aren't in range, so my robotic arm is unable to reach that point. Is it possible to define the limits for the calculation?

 

And another question, if the value is out of range the following error pops-up: "LabVIEW Robotics:  (Hex 0xFFFB44E8) LabVIEW cannot converge to a solution in the number of steps you specified. Make sure that the serial arm can achieve the transform you desire." I'm able to continue or stop after this error, but what I actually want is that just a led or something lights up when it's out of range without giving the error message. And with the possibility to continue the program in a normal manner.

 

 

Download All
0 Kudos
Message 7 of 19
(3,559 Views)

Put in Error Handling into your VI so that you can see which subVI is causing your issue.  I suspect its the "Create Transform from Translation" subVI that is causing your error.  If you add the error controls and indicators into the program you can see at what spot your program died.

 

Error Handling.pngError Handling_FP.png

 

You have an indicator on the "In Range?" output.  But for the coercing, you should place an indicator on the top right of the function to see the resulting array.  This array should be what you're looking for.  Remember to right click the "in Range and Coerce" to verify the setting is for "Compare Elements" so it can accept arrays.

 

0 Kudos
Message 8 of 19
(3,549 Views)

In Range and Coerce BD.pngIn Range and Coerce FP.png

0 Kudos
Message 9 of 19
(3,546 Views)

In Range and Coerce BD.pngIn Range and Coerce FP.png

0 Kudos
Message 10 of 19
(3,543 Views)