2012/8/28 Todd                      Zuercher <zuerc...@embarqmail.com>:
> I am very new to this, so please pardon the dumb questions.
>
> Do I add these if/else commands in both the forward and inverse kinematics 
> sections of the new kins.c?

I think that You will need them in both - inverse and forward kins,
otherwise it will be inconsistent.
For example, this is no good, because, when "swap" will be true, then
running through inverse and forward kinematics, will lead to pos->w =
joint[8] = tran.pos->z. So moving Z and keeping the same W command
will lead to error:

pos->w = joints[8]

joints[2] = tran.pos->z
if (swap = 1){
    joints[8] =  tran.pos->z
}
else joints[8] = pos->w

> Is there any problems with having the tran.pos->z tied to both the joint[2] 
> in one line and joint[8] in the else line (or do both of these need to be 
> done in one line somehow?)

I am not sure that I understand Your question correctly?
Do You ask about the section, where tran.pos->z is calculated from
joint positions?

If yes, I would recommend to keep it the same:
tran.pos->z = joints[2]

And link joints[8] o pos->w. But I am now thinking, what to do with
pos->w, when "swap" is true. It should be disconnected from joint[8].
Maybe You can hardcode it to the location, where You will do the
swapping.


> When you say the positions should match, is matching just in local 
> coordinates (including offsets) good enough or does it have to be machine 
> coordinates that match (the latter really wouldn't be much use).  If the 
> local coordinates and tool offsets applied to W aren't maintained through the 
> swap to ZZ mode, this won't do me a whole lot of good.

I mean the joint position. Hmm, yes, my suggestion would simply slave
joint[8] to Z axis, so, when "swap" is true, that joint forgets
anything about W, including all the offsets, that are applied to W.

Hmm, let me think, if I can come up with something.
Is it ok for You to hardcode the particular Z and W position, where
the swap takes place?
The initial idea is to bring Z and W to the same position in local
position with all the offsets and, when "swap is true", add to
joint[8] whatever the distance is between actual joint[2] position
from the "swap point". That would mean something like joint[8] =
pos->w + offset;

> Just curious what does the "tran" in tran.pos-> mean anyway?

Something about kinematics. I have no idea, but my guess is that it
comes from "transpose".

-- 
Viesturs

If you can't fix it, you don't own it.
http://www.ifixit.com/Manifesto

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to