Nicholas Seward wrote:cdsteinkuehler wrote:The way I figure it, you get two modified arcs and have to figure out where they intersect. Given a motor position, figure the angle (c or d in your kins png) assuming a 90 degree angle between the base (L) and the first arm l. This gets you the distance from the shoulder for your arc (a or b), but that distance has to be modified slightly as the base arm moves around the shoulder pivot. But there's no way to get a full cardioid spiral that I can see! AFAIK, what you'd get from a physical Wally would be at *MOST* the outermost loop in quadrants I and II of the cardioid image (limited by how far the other arm will reach). What am I missing?!?
Of course in reality you can not spin the arm forever but math doesn't care about silly things like the backboard. We will need most of the curve in the graph. The curve actually goes on to infinity and fills up the whole circle but I stop the curve generation when the arm completely folded in on itself. At any given time only about 180 degrees of this is usable but it could be any portion of it. I am going to do some circle fitting of this curve over the work envelope and see how close we get.
I've been working with Wally again, and thinking about the forward kinematics. The arc approach suffers from the wrapping problem, and numerical solutions are kind of ugly. It seems to me it might work to twist the problem around slightly.
Given the motors are at a known position, it should be possible to write a function to provide the Y value as a function of X. This side-steps the wrapping issue of using the arm-shoulder angle in the calculations, which as you point out makes an infinite spiral. Given the two functions, one then simply needs to determine which X value works for F(X) = F'(L-X), where F is the Y position of the left arm, and F' is the Y position of the right arm. One equation, one unknown, and this all assumes there isn't some nasty gotcha in the trig to calculate the Y position given an X value.
I wanted to jot this down while it was fresh, but it's more math than I'm up to working through right now. I'm currently busy trying to get my Wally fixed up enough I can print using LinuxCNC (with real-time inverse kinematics) before the Midwest RepRap Festival, which means I need to string my Z axis and build my first Bowden cold-end. Forward kinematics would be nice, but are not absolutely required.