New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Task Abort loop on joint soft limit #96
Comments
This bug can be reproduced with the sim/axis/gantry config by reducing [JOINT_3]MAX_LIMIT from 50 to 40, then homing and jogging towards the Y maximum. |
Make 'on_soft_limit' available to task and avoid abort looping if 'on_soft_limit'. A switch to joint mode may be needed for recovery (as noted in error messages). Note: IF 1) KINEMATICS_IDENTITY AND 2) System misconfigured such that joint limits are more restrictive than axis limits AND 3) User gui provides no means to switch to joint mode THEN System will probably need to be restarted and configured correctly when a misconfigured soft limit is encountered. (Expert users may use halui mode pins and halui jog pins and/or joint-mode wheel jogging pins to recover). Note: There may be undiscovered side effects if there are errors in addition to the 'on_soft_limit' error Signed-off-by: Dewey Garrett <dgarrett@panix.com>
I dont think d118ec4 is right. Motion should abort on soft limit violation, but it no longer does: This is with an un-modified sim/axis/axis, at the current tip of master (37e6fc4). I homed and jogged to near the X- soft limit, then programmed an MDI arc that violates that limit. Error messages were emitted, but the motion continued to completion. |
This reverts commit d118ec4. Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
This fixes #96, though it may introduce other problems. This is a proof of concept, not a merge candidate. Signed-off-by: Sebastian Kuzminsky <seb@highlab.com>
Part of the problem of this issue is that Axis switches to Teleop mode at a time when Motion is on a Joint soft limit. This causes the never-ending NML-issue-storm in Task. Inhibiting the switch to Teleop avoids the issue-storm. Part of the fix should be to harden Task against this, either by making it gracefully handle the switch to Teleop, or by having it reject the command. But another part of the fix should be to let the user recover from running into the Joint soft limit by jogging off it. Maybe on identity-kins machines we should allow Teleop-on-soft-limit, and allow Teleop jogging in the direction that leads back to the valid volume. But maybe on non-id-kins machines, Teleop outside the Joint limits might be a bad idea? Maybe we should force Free-mode jogging on non-id-kins machines? I'm not sure what the right behaviors and restrictions here are, but i'm interested in having the conversation to come to an agreement. |
For identity-kins machines it's possible to avoid this situation completely. I see two options:
For non-identity kins it's more complicated. On the one hand, it's a configuration error. On the other hand, as working envelope is a cuboid, sometimes it's tempting to extend world limits to get larger envelope, meaning to avoid corners (in both linear and angular coordinates) where joint limits might bite. But technically it's still possible to reach those corners, so the limits will bite sooner or later. What can be done in this situation? Stop, throw a warning "joint limit is exceeded" (that's what happens now) and give user a choice (probably via checkbutton "override soft limits") to get out of there by any means: jog into the limits in world or joint mode, or unhome to free mode, or re-home. When in joint mode, it would be perfect to highlight the joint value(s) in DRO. BTW: I suggest to introduce cylindrical workspace limits for non-identity kins machines, it would be sufficient approximation in most cases. |
The idea of ignoring joint limits on id-kins machines feels strange after everyone worked so hard on the JA branch to create them, but maybe doing so simplifies things for (most) users. If we instead go with load-time validation of joint and axis soft limits on id-kins machines, then the same check would be needed when the user sets these limits via HAL, using the interface in src/emc/ini/. |
Oh, the validation is pretty simple, and it can be skipped for inihal changes as long as the machine behaves more or less normally when the limits break. But really, why would we need 2 sets of limits for one axis=joint? I think that joint limits can be safely and happily ignored for id-kins. This also simplifies INI file. |
How's this sound for a design: id-kins machinesOn id-kins machines the axis soft limits must be wholly contained within the joint soft limits. We can validate this at load-time, and when any soft limits are changed via inihal.
non-id-kins machinesOn non-id-kins machines the axis soft limits may contain points that violate joint soft limits. For example, a robot arm might rotate around its base and reach below its base, but not operate in the volume actually occupied by its base:
|
Sounds pretty good. We should distinguish parallel (hexapod, delta) and serial (robot arm) manipulators. Parallel robots usually have (more or less) cylindrical or cuboid workspace, axes limits are primary. Pretty much all we need for them is circular XY limits. Serial robots have very complex shaped workspace. It's easy to see that it is completely described with joint limits. Hence, we don't need world limits for serial robots at all! Also, checking every line of G-code for joint limits is difficult and (probably) not always possible. But it's not nesessary! I believe that cartesian G-code can be verified for joint limits with full simulation. Say, live plot combined with inverse kins (just a guess). |
I think non-cuboid axis soft limits are an interesting idea, but outside the scope of this particular issue. Axis soft limits should probably be specified by the kinematics component, but this introduces a huge change in the architecture of LinuxCNC since kins is currently part of Motion (which is realtime), and axis soft limits need to be available to Interp in Task (which is non-realtime). Feel free to open another issue for this idea, but let's keep discussion in this issue focused on un-breaking the good old cuboid axis soft limits that we currently have, that broke with the recent merge of JA. |
I don't fully agree with that. World limits or other temporary workspace limiting capability would be needed for example, when serial robot has to work in tight cabinet. |
In master after the JA merge, on a gantry machine. A misconfiguration put the soft limit of the Z axis and the soft limit of the joint of the Z axis in different places. Running in to the joint soft limit triggered a crazy Abort loop in Task:
It never made any progress and I had to quit LinuxCNC to make it stop.
In another misconfiguration we hit the limit switch before the soft limit. In that situation it Aborted just once or twice, then chilled out.
The text was updated successfully, but these errors were encountered: