Here is another version that I would love feedback on.
We need to keep moving in the direction of simplifying the process of getting setup and running so there are less steps.
This automates the detection of horizontal vs vertical orientation by extending the top two belts for 1.5 seconds and measuring how much belt extends. This happens automatically at the beginning of the anchor point locating process. In vertical orientation more belt will extend because the machine is hanging from those belts, while in horizontal orientation it won’t extend as much
The key is making sure that we have the detection threshold right.
You should see something like this in the log:
[MSG:INFO: Calibration starting in HORIZONTAL orientation mode]
[MSG:INFO: Frame dimensions from kinematics: TR_X4308.900 TL_X: 139.200 TL_Y: 3230.600 BL_Y: 0.000]
[MSG:INFO: Frame size: 4169.700 x 3230.600 mm]
[MSG:INFO: Computed grid size: 2084.850 x 646.120 mm]
[MSG:INFO: Automatically selected grid size: 9x9]
[MSG:INFO: Setting z-stop position]
[MSG:INFO: Center coordinates updated in MaslowKinematics: X=2197.631 Y=1647.726]
[MSG:INFO: Unable to determine machine position]
[MSG:INFO: Succeeded]
[MSG:INFO: Orientation detection results:]
[MSG:INFO: TL extension: 49.837 mm]
[MSG:INFO: TR extension: 50.406 mm]
[MSG:INFO: Average extension: 50.121 mm] [MSG:INFO: Detected VERTICAL orientation (extension > 35.000 mm)]
[MSG:INFO: Orientation set to: VERTICAL (Maslow_vertical=true)]
[MSG:INFO: Measured waypoint 0]
Here we can see that the machine was set to horizontal orientation by default, but it detected that it was actually in vertical mode and switched.
If you are testing this for sure keep a hand on a hardware E-Stop button because if the test gets it wrong it will go off the rails.
It seems to be worse after powering off then resuming (apply tension) and I first noticed it when testing after testing the calibration, but thought I was imagining it, so I decided to try to duplicate it. Now it pretty consistent. I will try starting from a clean start with a retract, extend etc and see if I can identify where it is failing.
After you run a job, the purple dot moves as expected.
I ran another Configuration to see if that had somehow caused the problem I was seeing - No not that, works as expected still. I guess we can just leave it and see if anyone else has a similar issue or if I get it again I will try to make it replicable.