Replace untilted_stepper_position with planner.unapply_leveling, use in set_current_from_steppers_for_axis#4814
Conversation
jouirau
left a comment
There was a problem hiding this comment.
I am currently working on a SCARA robot that is not Morgan based (ie no Theta + Psi on the 'Y' arm)
I would argue that there are three types of arms in the SCARA family: Morgan, LeftArm, RightArm. The kinematics are almost identical - just the theta + psi change, and the direction of the stepper drives.
My comment on the latest update is that the older IS_SCARA test may be more representative of the family than ENABLED(MORGAN_SCARA) . Nearly all of the code works fine for all SCARA types with a few exceptions.
For example with setting the scaling factor in lcd_control_motion_menu() in ultralcd.cpp I think the IS_SCARA is better than ENABLED(MORGAN_SCARA), as the scaling factor applies to all the SCARA types not just the Morgan.
One place where it makes sense to me to check for MORGAN_SCARA is the Theta + Psi in the procedure inverse_kinematics():
#if MORGAN_SCARA
delta[B_AXIS] = DEGREES(THETA + PSI); // equal to sub arm angle (inverted motor)
#else // all other 'normal' SCARA
delta[B_AXIS] = DEGREES(PSI); // equal to sub arm angle (inverted motor)
#endif
Overall I am really liking the SCARA support in this firmware. Marlin has been working superbly on my SCARA machine (with a few minor tweaks) G2 & G3 also seem to work fine (more testing required). Your current efforts to make more sense of the logical versus physical position stuff are highly welcomed. Thank you!
caf43e8 to
06aacc6
Compare
fe05315 to
0b3713b
Compare
|
@thinkyhead I have not used the scale factor yet. I assume that it is a way of tweaking the ratio of the stepper motor steps to the number of degrees moved on the fly. It does not seem to be that different in effect to tweaking the XStepsMM/YStepsMM. My immediate question is whether this is a logical or physical tweak. IE is it the scaling for the A and B arm steppers or is it the logical scale of the x and y axis? Do you know the intent of the original inclusion of these scale options? At some point more descriptive menu items might be needed for SCARA. Thing like 'A steps/degree' instead of 'X steps/mm' and 'AScaleFactor' instead of 'XScaleFactor' to move away from the slightly misleading use of X and Y in the SCARA situation. (unless the XScale factor is actually meant to be the logical scale...) The point I was trying to make was if there is a need for a 'scaling factor' then it should probably apply to all types of SCARA not just the Morgan. More generally I am arguing that the IS_SCARA test or ENABLED(SCARA) should be used for most of the SCARA related stuff instead of ENABLED(MORGAN_SCARA) to reflect the overall similarities of the SCARA family. And then use ENABLED(MORGAN_SCARA) for the few very specific Morgan related differences. |
bcf482c to
d3cb864
Compare
|
The The firmware cannot make something bigger or smaller merely by scaling the XY (cartesian) coordinates, which is what these factors attempt to do. If someone's custom build needs tweaking due to being scaled up from the Morgan (or other SCARA) build plans, it must be done through configuration. If the idea is to scale for the sake of using a pen or paintbrush, well, again, that is not limited to SCARA. And again, it should be done in the slicer or Inkscape plugin export feature, not in the firmware. |
d3cb864 to
9458533
Compare
The items enabled specifically for I suppose it could be You'll note that I haven't added the kinematics and other MakerArm-specific changes. It's just hinting at things to come. I'm not entirely free to release the code just yet because the machine is still in development, but no one has this robot yet anyway. |
|
Good points! So in fact the two scale menu items can be deleted along with PS - impressed that you have both leftArm and rightArm working! I am |
If you have (or can download) OpenSCAD, then you should download my gist demonstrating Ambidextrous SCARA Kinematics. I note that the equations are similar —but not identical— to the kinematics from the SCARA code. I did a lot of messing around to arrive at the functions that worked best. Use the OpenSCAD "Animation" panel to see it in all of its circular glory. |
I'll do that in a separate PR after this one, which seems finally to be in good shape. |
55a19f3 to
d70abeb
Compare
71dba72 to
83b45fb
Compare
c4f893a to
9060a4a
Compare
9060a4a to
3d411e5
Compare
Like the title says…