[SOLVED] Command to Move in Joint mode

More
24 Feb 2020 14:57 #158382 by Aciera
dgarrett: thanks for all your work!

I have two questions:
1. Switching kinematics works for me as MDI Commands. However using them in gcode trips a message "M429: identity kins M429: Wrong motion.switchkins-type or missing hal net to analog-out-0x STOP"
My ini file contains the line "HALCMD = :kinstype-select <=motion.analog-out-03 => motion.switchkins-type" What am I missing here?
2. Would it be possible to expand this approach to three kinematics, say for a tool coordinate mode?

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

More
24 Feb 2020 17:13 - 24 Feb 2020 17:14 #158397 by dgarrett

However using them in gcode trips a message

thanks for report,
fixed at today's commit 2216a4ba8 (force-pushed)

Would it be possible to expand this approach to three
kinematics, say for a tool coordinate mode?

in the dgarr/s_kins branch, switchable kinematics modules
must provide two functions:
kinematicsSwitchable(); //indicates kins can be switched
kinematicsSwitch(int switchkins_type); //accepts integer for kins type

A switchable kinematics module must handle this integer type
in both its kinematicsForward() and kinematicsInverse()
routines.

genser-switchkins.c supports 2 types (0 and 1),excerpt:
int kinematicsSwitch(int new_kins_type)
{
    switchkins_type = new_kins_type;
    switch (switchkins_type) {
        case 0: rtapi_print_msg(RTAPI_MSG_INFO,
                "kinematicsSwitch:genserkins\n");
                *switchdata->kinstype_is_0 = 1;
                *switchdata->kinstype_is_1 = 0;
                break;
        case 1: rtapi_print_msg(RTAPI_MSG_INFO,
                "kinematicsSwitch:Trivkins\n");
                *switchdata->kinstype_is_0 = 0;
                *switchdata->kinstype_is_1 = 1;
                break;
...
int kinematicsForward(const double *joints,
...
    switch (switchkins_type) {
       case 0: return genserKinematicsForward(joints, pos, fflags, iflags);break;
      default: return   trivKinematicsForward(joints, pos, fflags, iflags);
...
int kinematicsInverse(const EmcPose * pos,
...
    switch (switchkins_type) {
       case 0: return genserKinematicsInverse(pos, joints, iflags, fflags);break;
      default: return   trivKinematicsInverse(pos, joints, iflags, fflags);

(the *switchdata->kinstype_is_* vars are used as convenience hal pins to
alter a (pyvcp) display)

Refs:
github.com/LinuxCNC/linuxcnc/blob/dgarr/...ser-switchkins.c#L74
github.com/LinuxCNC/linuxcnc/blob/dgarr/...er-switchkins.c#L119
github.com/LinuxCNC/linuxcnc/blob/dgarr/...er-switchkins.c#L150

I have no ideas about tool coordinates but if the required
information can be made available on hal pins, it can
be read by your custom kinematics module.
Last edit: 24 Feb 2020 17:14 by dgarrett.
The following user(s) said Thank You: tommylight, bkt, Aciera

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

More
25 Feb 2020 08:13 - 25 Feb 2020 09:55 #158440 by Aciera
Thank you for the prompt reply!

I built the new version but I'm still unable to run the gcode.


Disregard! I'm a noob and have copied the old remap.ngc files back to the new build.

Thanks
Attachments:
Last edit: 25 Feb 2020 09:55 by Aciera.
The following user(s) said Thank You: bkt

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

More
19 Mar 2020 18:12 - 20 Mar 2020 10:21 #160760 by bkt
Replied by bkt on topic Command to Move in Joint mode
Vary thanks for these option dgarret

Thanks
Last edit: 20 Mar 2020 10:21 by bkt.

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

Time to create page: 0.117 seconds
Powered by Kunena Forum