Thoughts on the next iteration of the Maslow 4

Testing this in VS Code tells me that I have potentially found a solution. This will have been my first time cobbling together python, most of my experience is logic circuits, JS/C#, and various node-graph “languages”, so bear with me.

Note: I’ve removed the x/y/z offset values to simplify the code, since this should work both with or without them. This example assumes bottom left corner of frame is 0,0 and that the belts are parallel to the plane of the work surface.

from scipy.optimize import fsolve
import numpy as np

# Define constants
sledWidth = 100.0  
sledHeight = 100.0  
XMS = 800.0  
YMS = 600.0  
L1 = 430.116  
L2 = 430.116  
L3 = 430.116  
L4 = 430.116  


# Define the equations
def equations(vars):
    carriageCenterX, carriageCenterY = vars
    eq1 = (carriageCenterX - 0.5 * sledWidth)**2 + (YMS - carriageCenterY - 0.5 * sledHeight)**2 - L1**2
    eq2 = (XMS - carriageCenterX - 0.5 * sledWidth)**2 + (YMS - carriageCenterY - 0.5 *sledHeight)**2 - L2**2
    return [eq1, eq2]

# Initial guess for the solution
initial_guess = [0.0, 0.0]  

# Solving the system of equations
solution = fsolve(equations, initial_guess)
carriageCenterX, carriageCenterY = solution
print(f"Carriage Center X: {carriageCenterX}")
print(f"Carriage Center Y: {carriageCenterY}")

# Define the equations
def equations(vars):
    carriageCenterX, carriageCenterY = vars
    eq3 = (carriageCenterX - 0.5 * sledWidth)**2 + (carriageCenterY - 0.5 * sledHeight)**2 - L3**2
    eq4 = (XMS - carriageCenterX - 0.5 * sledWidth)**2 + (carriageCenterY - 0.5 * sledHeight)**2 - L4**2
    return [eq3, eq4]

# Initial guess for the solution
initial_guess = [0.0, 0.0]  

# Solving the system of equations
solution = fsolve(equations, initial_guess)
carriageCenterX, carriageCenterY = solution
print(f"Carriage Center X: {carriageCenterX}")
print(f"Carriage Center Y: {carriageCenterY}")

From what I can tell, we should be able to use 2 opposing belts to get a guess, and then the other 2 belts to get another, and then reconcile the results.

The output I got from the above is:

Carriage Center X: 400.0
Carriage Center Y: 300.00045308840976
Carriage Center X: 400.0
Carriage Center Y: 299.9995469115895

Carriage Center Y should be 300, so I think we can call that a success.

I’m not asserting that this is everything we’d need, because I don’t know that it can be applied for the Maslow, but it’s at least not a “hard” problem where there are no known paths forward for the math.

1 Like