Create variables in function of kinematics values

More
25 Sep 2015 19:05 #62971 by andypugh

1. I think isn't necessary, but, Is it possible works with the simulation and real operation in "Joint Mode"?

I don't know, but I suspect not. It looks like the code you have written to calculate the angles doesn't actually run in joint mode.
One of the other options discussed, such as converting the motor-position-cmd into a joint angle in HAL would probably work in both modes.

2. I still have not tried, but, are the position-cmd and position-fb loopback independents when I will simulate and control the motors.

It shouldn't _be_ a loopback, the feedback should be from the joint motor encoder so that the system can detect when the machine is not in position.

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

More
25 Sep 2015 20:46 #62980 by jstoquica
Hi,

andypugh wrote:

It looks like the code you have written to calculate the angles doesn't actually run in joint mode.


I am sure that kinematics code run in "joint mode", in fact It run normally, but with integration of new HAL pins doesn't run in "joint mode" appropriately. I don know why, I thing there is a incompatibility with some HAL module or a definition of the joint, already I don't know.

One of the other options discussed, such as converting the motor-position-cmd into a joint angle in HAL would probably work in both modes.


Excuse me for my lack of knowledge, but How can I do that?

Thanks a lot.

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

More
25 Sep 2015 20:54 - 25 Sep 2015 20:54 #62983 by andypugh

I am sure that kinematics code run in "joint mode", in fact It run normally, but with integration of new HAL pins doesn't run in "joint mode" appropriately


Kinematics converts joint positions to XYZ positions in space, and vice-versa
If your new HAL pins don't change value when the machine is in Joint mode I see that as an indication that the Kinematics_Inverse() function simply does not get called in Joint Mode. There is no reason to run it, after all, as there is non XYZ command data to convert.

You could test to see if the Kinematics_Forward() function is running in Joint mode and set the pins from there instead if it is. It would be the reverse calculation, though. Getting Vismach angles from joint positions rather than the angles being an intermediate value in the calculation of the joint positions from XYZ.

One of the other options discussed, such as converting the motor-position-cmd into a joint angle in HAL would probably work in both modes.
Excuse me for my lack of knowledge, but How can I do that?


Any way you want.

Lincurve, scale,custom component.
Last edit: 25 Sep 2015 20:54 by andypugh.

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

More
26 Sep 2015 06:40 #63014 by jstoquica
andypugh wrote:

There is no reason to run it, after all, as there is non XYZ command data to convert.


I just change in kinematics_Inverse() function the order of the out variables like this:
   joint[0] = th1;
   joint[1] = th2;
   joint[2] = th3;
   joint[3] = th4;
   joint[4] = th5;

   *(haldata->th1) = th1;
   *(haldata->th2) = th2;
   *(haldata->th3) = th3;
   *(haldata->th4) = th4;
   *(haldata->th5) = th5;

And in the HAL file I left everything without any change (with th? variables to move vismach joints) and the response at the "joint mode" was the same. Don't move the model.

But when I changed in HAL file the th? variables (irb.th?) for the default joints signals (forgetting irb.th? variables) everything was success, in "joint mode". That means the kinematics_inverse() function gets called in "Joint Mode".

I guess the new HAL pins - *(haldata->th1), aren't compatibles with Joint[ i ]. I don't know. Why is it happen?

Thanks.

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

More
26 Sep 2015 06:51 #63015 by andypugh

But when I changed in HAL file the th? variables (irb.th?) for the default joints signals (forgetting irb.th? variables) everything was success, in "joint mode". That means the kinematics_inverse() function gets called in "Joint Mode".


I don't think it means that at all. What it means is that in Joint mode the joint position jog commands from the GUI go straight to HAL and change the motion pins _without_ being modified by kinematics.

One way to check this: Create another output pin, and increase the value it shows every time. I reckon you will see the number counting up in World mode, and not in Joint mode.

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

More
26 Sep 2015 07:25 #63016 by jstoquica
Hi,

I don't know, let me ask you.

If kinematics_inverse() function are not active or pins _without_ being modified by kinematics in "joint mode", why did the simulation obtain a desired trajectory (with G program)? I think the kinematics changes the motion pins values.

I only have to understand why with the new HAL pins the "joint mode" doesn't move the model in vismach? It's a nerd matter :) .

Regards.

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

Time to create page: 0.088 seconds
Powered by Kunena Forum