Discussion:
LinxCNC Python Module
(too old to reply)
Phillip Carter
2017-06-26 04:58:42 UTC
Permalink
Raw Message
Is the documentation correct for the LinuxCNC Python Module in regards
to kinematics_type?

In the documentation for the LinuxCNC Python Interface there is
reference to:
kinematics_type
(returns integer) - identity=1, serial=2, parallel=3, custom=4 .


in the kins manpage there is reference to:
kinstype=1 for KINEMATICS_IDENTITY (default if kinstype= omitted)
kinstype=[b|B] for KINEMATICS_BOTH
kinstype=[f|F] for KINEMATICS_FORWARD_ONLY
kinstype=[i|I] for KINEMATICS_INVERSE_ONLY


in emcmodule.cc there is reference to:
ENUM(KINEMATICS_IDENTITY);
ENUM(KINEMATICS_FORWARD_ONLY);
ENUM(KINEMATICS_INVERSE_ONLY);
ENUM(KINEMATICS_BOTH);

Cheers, Phill.
andy pugh
2017-06-26 09:33:08 UTC
Permalink
Raw Message
On 26 June 2017 at 05:58, Phillip Carter <***@gmail.com> wrote:

> Is the documentation correct for the LinuxCNC Python Module in regards to
> kinematics_type?
>
> In the documentation for the LinuxCNC Python Interface there is reference
> to:
> kinematics_type
> (returns integer) - identity=1, serial=2, parallel=3, custom=4 .


This looks like a holdover from:
https://github.com/LinuxCNC/linuxcnc/blob/42ff261dfb854f7bdfbd3c29565323ee1944462e/src/emc/nml_intf/emc_nml.hh#L1060

I suspect that that entry dates back to before we had kinematics modules
and that the docs are wrong.

--
atp
"A motorcycle is a bicycle with a pandemonium attachment and is designed
for the especial use of mechanical geniuses, daredevils and lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1916
Jeff Epler
2017-06-26 12:34:38 UTC
Permalink
Raw Message
On Mon, Jun 26, 2017 at 02:58:42PM +1000, Phillip Carter wrote:
>Is the documentation correct for the LinuxCNC Python Module in regards
>to kinematics_type?
>
>In the documentation for the LinuxCNC Python Interface there is
>reference to:
>kinematics_type
>(returns integer) - identity=1, serial=2, parallel=3, custom=4 .

Yeah I agree that is not what the module does. Use the
pseudo-enumerated values you see in emcmodule.cc:
>ENUM(KINEMATICS_IDENTITY);
>ENUM(KINEMATICS_FORWARD_ONLY);
>ENUM(KINEMATICS_INVERSE_ONLY);
>ENUM(KINEMATICS_BOTH);

doc patches welcome.
Jeff Epler
2017-06-27 00:29:17 UTC
Permalink
Raw Message
Please keep replies on the list. Whole message quoted so that the
context is not lost.

On Tue, Jun 27, 2017 at 09:39:00AM +1000, Phillip Carter wrote:
>On 26/06/17 22:34, Jeff Epler wrote:
>
> On Mon, Jun 26, 2017 at 02:58:42PM +1000, Phillip Carter wrote:
>
> Is the documentation correct for the LinuxCNC Python Module in
> regards to kinematics_type?
>
> In the documentation for the LinuxCNC Python Interface there is
> reference to:
> kinematics_type
> (returns integer) - identity=1, serial=2, parallel=3, custom=4 .
>
>
> Yeah I agree that is not what the module does.  Use the pseudo-enumerated
> values you see in emcmodule.cc:
>
> ENUM(KINEMATICS_IDENTITY);
> ENUM(KINEMATICS_FORWARD_ONLY);
> ENUM(KINEMATICS_INVERSE_ONLY);
> ENUM(KINEMATICS_BOTH);
>
>That being the case:
>In commit [1]681cf92 I created a variable (trivkinstype) that I now think is
>unnecessary.
>Should I submit a patch that removes this variable?

Yes, I suspect it is more correct to get this value from the stat buffer
instead of from an inifile item. For one thing, the code that is
parsing the [KINS]KINEMATICS value will only work when the kinematics is
trivkins, not when it's something else like genserkins, right?

Jeff

>
> doc patches welcome.
>
>
>I will look into this.
>
Loading...