Keeps incrementing every switch by the value of the offset.
| joints[0] = z + sqrt(L2 - sq(Ax-x) - sq(Ay-y)) + J0off; joints[1] = z + sqrt(L2 - sq(Bx-x) - sq(By-y)) + J1off; joints[2] = z + sqrt(L2 - sq(Cx-x) - sq(Cy-y)) + J2off; |
--
website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit
---
You received this message because you are subscribed to the Google Groups "Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to machinekit+...@googlegroups.com.
Visit this group at http://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.
Enter code here...
joints[0] = (z + sqrt(L2 - sq(Ax-x) - sq(Ay-y))) - J0off;
--
Charles Steinkuehler
cha...@steinkuehler.net
inverse:joints[0] = z + sqrt(L2 - sq(Ax-x) - sq(Ay-y)) + J0off;forward:double q1 = joints[0] - J0off;have you tried homing directly after you change one of the offset values?
what happens then?
are you able to modify J0off, J1off and J2off and _see_ the carriage moving without influencing X, Y and Z coordinates in the screen, and without switching modes?did you do other modifications in other parts of the code other then kinematics that might interfere?
What do you do here?
Nothing as of yet just working through the Kinematics right now.
Just tried it on my printer. Works fine for me. Guess it was something funny with the sim config.
FYI. I am adding on the inverse and subtracting on the forward. Really doesn't matter as long as they are inverted.
So here is where were at. A joint offset can be applied while running with the lineardeltakins.J#off. Pin. With one downside. I'm questioning what accelerations and velocities are being applied to the offset.
Really we are writing directly to the joint. I say this as I am getting following errors when setting the hal pins to large values (10mm). Of course that's probably 10x larger than we intend to apply but it brought this to light.
Second issue is that offsetting in world is useless.
The offset needs to be applied in joint. However if you apply an offset while in joint it does not cause motion. Feeling like it has to do with not in telop mode.
Am 11.01.2015 um 00:15 schrieb jean-paul moniz <jmo...@pmiautomation.com>:
On Saturday, January 10, 2015 at 6:00:28 PM UTC-5, Bas de Bruijn wrote:
On 10 Jan 2015, at 22:41, Charles Steinkuehler <cha...@steinkuehler.net> wrote:On 1/10/2015 3:30 PM, jean-paul moniz wrote:Tried that but still got the same behavior. This is what i had.
Enter code here...
joints[0] = (z + sqrt(L2 - sq(Ax-x) - sq(Ay-y))) - J0off;
joints[1] = (z + sqrt(L2 - sq(Bx-x) - sq(By-y))) - J1off;
joints[2] = (z + sqrt(L2 - sq(Cx-x) - sq(Cy-y))) - J2off;
I think your problem is you need to apply or not apply the offset based
on whether or not you're homing the joint.
it IS the wrong place for a _changable_ offset
the reason is - if you fiddle kinematics values mid-flight you will create sudden jumps in position feedback _within the control loop_
in other words, you suddenly create a huge following error, and the loop cannot follow - bang
also: even if the machine is stopped, you need to be super-careful to not create sudden 'position warps' - the code for the mode-switching logic in motion is anything but obvious (see also the thread on modeless motion:https://github.com/machinekit/machinekit/issues/396)
| From: Bas de Bruijn Sent: Sunday, January 11, 2015 4:52 AM |
| From: Bas de Bruijn Sent: Sunday, January 11, 2015 4:56 PM To: Charles Steinkuehler |
Subject: Re: [Machinekit] Lineardeltakins joint offset |
The f-error is not an issue anymore in my mind. When I was playing with it last night 2AM. My mind was not thinking well. There is no logical need to adjust the offset while in world. So what I suspect I will do is just create an Mcode that switches to joint and apply the offset then signal the user to re-home the machine. When applying the offset in joint mode, motion is not allowed for some reason (my guess is something to do with telop). Applying the offset in joint is not an issue as you have to be in joint anyways to home. After homing again the probing can be repeated to confirm.
JP
in the terminal i do:- halcmd axis.0.home_offset 720- I press the home button (I only home joint[0])- the carriage goes up, triggers the endswitch- i see “720.0” flash by in the screen- immediately the carriage travels down to the position 711.1I did not expect that.
> On 12 Jan 2015, at 13:15, Charles Steinkuehler <cha...@steinkuehler.net> wrote:
>
>> On 1/12/2015 12:35 AM, Bas de Bruijn wrote:
>> Hi, I think for a efficient way of calibrating we’d need both JP's
>> and Charles’ solution. (Only talking about manual calibration, let’s
>> keep it simple for now)
>>
>> @Charles, I have the feeling (while you made the HAL pins you
>> mentioned something of memory use cleanup) that there is still some
>> legacy stuff (old way). Could that not be the source of the move?
>> because the move to the “old” offset (INI file value) seems to be in
>> a commanded motion. No f-error despite the big change in value. So
>> perhaps it’s still being commanded to go to the old_copy-value of the
>> INI file.
>
> Someone needs to test this change on a system with homing switches to
> see if it works as expected. If so, I can easily clean up the code and
> send a PR. I was confused by the move after homing, but it actually
> should move if HOME != HOME_OFFSET, even on my machine w/o switches.
Yes of course. I hadn't thought about HOME and so I didn't change HOME.
I ran on a physical machine with physical home switches yesterday evening FWIW.
Ok,I'm breaking this off into a separate thread.Looks like We have to change the way we think about these offset pins. either that or I'm not understanding something.Currently with the code I have.The offset pins will offset each joint when in Coord however there seems to be a bug that I am looking in to.It seems that if you switch between joint and world the offset will continue to add from each transition Joint > world meaning:
- setp lineardeltakins.J0off 0
- Home machine in joint
- J0 = 0.00 J1= 0.00 J2= 0.00
- Switch to world
- X = 0.000 Y = 0.000 Z = 0.00
- Switch to joint
- J0 = 0.00 J1= 0.00 J2= 0.00
- setp lineardeltakins.J0off 1
- Switch to world
- X = 0.000 Y = 2.000 Z = 0.00
- Switch to joint
- J0 = 1.00 J1= 0.00 J2= 0.00
- Switch to world
- X = 0.000 Y = 4.000 Z = 0.00
- Switch to joint
- J0 = 2.00 J1= 0.00 J2= 0.00
Keeps incrementing every switch by the value of the offset.Thinking we need an enable input or just handle it in hal.JP