Error at InverseKinematics Function

More
10 years 7 months ago #71273 by jstoquica
Hi Andy,

I have the inverse and forward kinematics of my robot arm of 5 DOF. Simulation results are everything fine. Now, I am working with the real robot, but the motors are placed outside of the origin system coordinates, because It is a old manipulator.

Then, I need modify the output kinematics signal to the real motors, because the relationship between joint angles and motor turns isn't linear. Like:

5th DOF motor turns depends of theta 2, theta 3 and theta 4.
4th DOF motor turns depends of theta 4 and theta 5.

And When I tried to modify the kinematics file, linuxcnc generated error because the relationship between joint angles and motor turns only affects the inverse kinematics.

I thing that I should set the correct scale for the step generator to give the correct steps per degree, but with non linear relationship between joint angles and motor turns I don't know how can I do that...... or through the HAL motion component, but again I don know how.....

Did you understand? I wish you can help me, thanks a lot again Andy.

Please Log in or Create an account to join the conversation.

More
10 years 7 months ago #71275 by andypugh
You need a different kinematics then, one that includes the non-linearity.

The point is that any changes you include in the inverse kinematics also need to be mirrored in the forwards kinematics.

The kinematics converts motor rotations to cartesian coordinates and the reverse. The joint angles probably need to be calculated as an intermediate step, but they are neither an input nor an output of the kinematics in your case.

Please Log in or Create an account to join the conversation.

More
10 years 7 months ago - 10 years 7 months ago #71279 by jstoquica
Andy, thanks for your answer.

I think it, do a other kinematics, even I have the forward and inverse kinematics of the relationship between joint angles and motor turns. I did it in my original kinematics file, but it didn't run, I think because I have a error concept of the inputs and outputs kinematics parameters. I attached the file (irb.c).

Is It right ? In the same *.c file to have the relationship between motor turns and joint angles?

In the pic you can see the realtionship equations.



1. In the *.c file in the forward_kinematics() function I added the equations, where I took Joint like motor turns and I can calculate the joint angles (theta). With that I can calculate the forward kinematic parameters of the manipulator.

2. then, for inverse_kinematics() function I calculated the joint angles (theta) and after that I can calculate the motor turns and set joint values.

I don't know if it's right my logic, but when I want simulate, linuxcnc generates errors like "Joint 0 following error"....

I appreciate your help, thanks again.
Last edit: 10 years 7 months ago by jstoquica.

Please Log in or Create an account to join the conversation.

More
10 years 7 months ago #71332 by jstoquica
Hi everyone,

Any idea?

Thanks a lot.

Please Log in or Create an account to join the conversation.

More
10 years 7 months ago - 10 years 7 months ago #71333 by andypugh
To step back a level.
In the kinematics file the values
Code:
pos->tran.x pos->tran.y pos->tran.z pos->a pos->b pos->c pos->u pos->v pos->w
are the XYZ etc values from G-code. At the end of G0 X 100 pos->tran.x = 100

The values
Code:
joints[0] joints[1] joints[2] joints[3] joints[4] joints[5] joints[6] joints[7] joints[8]
correlate directly to the HAL pins axis.N.motor-position-cmd.

Your kinematics file needs to bridge the gap between the numbers, in both directions.

The only thing between the motors and the HAL numbers is the encoder scaling. If you want, you can scale for motor positions in radians, for example.
Last edit: 10 years 7 months ago by andypugh.

Please Log in or Create an account to join the conversation.

More
10 years 7 months ago #71822 by jstoquica
Andy,

Regrettably the kinematic equations of the actuators only have accepted results for some angle values. It means, the equations are only reciprocals for the forward and inverse actuator kinematics in some angles, for that LinuxCNC got error in the simulation.

That equations are only made for one way, like a scale factor for the inverse kinematics outputs.

Can I modify only the HAL motion module for the motor rotation? If I can do it, How do I can? or What do you suggested for this issue?

Thanks a lot.

Please Log in or Create an account to join the conversation.

Time to create page: 0.109 seconds
Powered by Kunena Forum