Why does X has a 'tran' and V doesn't?
I cannot give you a totally clear answer but that is basically just the way the data structure is setup:
pos->tran.x, pos->tran.y and pos->tran.z are the 'translational' parts of the cartesian axis pose (ie X,Y,Z axes)
The other axes elements are just called pos->a, pos->b, pos->c, pos->u, pos->v and pos->w
Is this the part of the component/programming that changes the position of the joints?:
The lines with 'pos->* = j[*]' are part of the 'Forward' kinematic model (ie the section you have on your last post). This is used to calculate the AXIS position after the respective joint has been homed. In your particular case the axis is set the same as the joint.
The lines with ' j[* = pos->*]' are part of the 'Inverse' kinematic model . This is used to calculate that particular JOINT position according to the requested AXIS position. In your particular case the joint is set the same as the axis.
Note that in your CASE 1 the joints/axes mapping is actually trivial just like 'trivkins' and the only thing you do in CASE 2 it to swap the joints/axes
So each 'CASE n' in the forward model needs to have a matching reciprocal 'CASE n' in the inverse model. In other words, if you run a joint position value through the forward kinematic and you run the resulting axis position value through the inverse model you should get the exact joint position value you started out with. If the models do not match upyou will get unstable results (eg runaway values).
More specifically, when the kinematics switch is made is the above what causes the X and V axes DRO's to switch?
The switch is made using a case structure in the forward and the inverse kinematic:
Code:
switch (switchkins_type) {
case 0:
....
case 1:
....
}
Each case represents a kinematic model. In millturn.comp we have two but you can have as many as you like.
The 'switchkins_type' value is changed using an analog motion pin which is connected to a dedicated hal pin (see [HAL] section of the millturn sim config):
Code:
HALCMD = net :kinstype-select <= motion.analog-out-03 => motion.switchkins-type