On 3/13/2014 3:19 PM, Chris Radek wrote:
> On Thu, Mar 13, 2014 at 01:40:42PM -0500, Charles Steinkuehler wrote:
>>
>> Currently, I can bring up LinuxCNC in joint mode and jog around, but
>> when I have the joints at their home positions and try to switch to
>> world mode, I immediately get joint following errors on the "x" and "y"
>> joints.
>>
>> I do have a kinematicsHome() function defined and exported, but it
>> doesn't seem like it's ever getting called, and my Y position (which is
>> non-zero at the joint home position) never shows anything other than 0.
>>  I dug around in the source tree, but I don't see where/how the
>> kinematicsHome() function gets called.  Is this still supported?
> 
> No, kinematicsHome is not used.
> 
> The way it's supposed to work for inverse only: you home the joints;
> the joints are now in the position matching the world coordinates
> you specified in [TRAJ]HOME and you may switch into world mode;
> inverse kins start running on those world coordinates and you should
> get the joint positions you homed to, so you don't get a position
> jump.  That's the bootstrap process.  

THANKS!   That's a very helpful bit of knowledge.  I don't currently
have anything in [TRAJ]HOME.

> So be aware that if you ever switch out of world mode [and move any
> joint??] switching into world mode is disallowed until you home
> again.  There is only one joint position where you can switch into
> world mode -- the joints-are-just-homed position -- because you've
> manually done something like forward kins for that position and
> specified the result in [TRAJ]HOME manually.

Yep, that much I already realized.

> Now that's all the way it's *SUPPOSED* to work.  I don't know if
> inverse-only really works right, lately.  If you haven't tried JA4
> it might be better (it's better in very important ways for
> nontrivkins, but I have only used it with kinematics type BOTH).
> 
> Writing forward kins for this doesn't look too hard...  That might
> be easier than fixing inverse-only, considering your hard deadline.

I'm working on it, but it's non-trivial (to me, anyway), and I'm already
sleep deprived.  Even the guy who designed the machine just gave up on
the forward kins and just throws the joint values and inverse kinematics
at scipy and numerically solves it for a few cases needed when his
python script is auto-calibrating for things like bed level.

>> The kinematics code is on github, and can be built with "comp" if you
>> just grab the wallykins.c file:
>>
>> https://github.com/cdsteinkuehler/linuxcnc/blob/cramps-config/src/emc/kinematics/wallykins.c
> 
> I can't understand your kins without study and picture-drawing, but
> there's some worrying stuff in there:
> 
> x = joints[0];
> ...
> left_virtual = atan(-y/x);
> 
> obvious problem is this is unsafe for joint position 0 (wild guess:
> is that your joint home position?), less obvious problem is you
> should probably be using atan2 so your quadrants aren't wonky.

The inverse code is good, unless I borked it turning it into a C
program.  The "segmentize" program with the inverse kinematics I'm
copying is here:

https://github.com/NicholasSeward/ConceptFORGE/blob/master/Wally/GCODE%20PREPROCESSOR/wally%20segmentize.py#L129

...and this is a very helpful diagram of the mechanism:

https://github.com/NicholasSeward/ConceptFORGE/blob/master/Wally/DOCUMENTATION/INVERSE%20KINEMATICS.png

> Find me on IRC if you think I can help more.

Thanks, I'm hoping the TRAJ hint gets me going!

-- 
Charles Steinkuehler
[email protected]

Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to