I’ve been working on this still as time allows. I’m taking a break to mentally walk through the current process in order to structure my thinking a bit and make troubleshooting easier.
I solved the problem regarding moving the chassis point of a link. To recap the problem, the inverse kinematic process basically involves taking the base suspension setup as it is, and describing the attitude of the wheel in terms of 6 parameters (camber, castor, toe, X, Y, Z). It also calculates the basic link lengths. Through some form of black magic in the form of a Jacobian matrix which describes the rate of change of each link length with respect to each parameter, a set of parameters can be iteratively solved for to acheive a set of link lengths, plus an “error array” which you can vary to simulate a changing link length (ie, a shock).
However, when you are steering the system, you’re not changing a link length, you’re moving an inboard chassis point. This creates a problem, because you no longer have the “base” geometry, which you need to know in order to calculate the jacobian. After much thought, I came across a solution:
Calculating the difference in length from an old-outboard/old-inboard link versus old-outbaord/new-inboard link yields the same result as the difference in length from a new-outboard/old-inboard link versus new-outbaord/new-inboard link… It’s hard to explain in words, so just look at the above diagram… You take this link length delta and put it in your error term- simple as that.
Best part is: Works for roll as well!
So, with these new tools, I’ve started expanding the code to iteratively roll the chassis, steer the wheels bump the wheels and solve for a parameter matrix for each combination. So far it works, but I’m having problems with the bit of code that rolls the chassis about the roll axis.
Rotating a point about an axis in 3D is not as easy as I’d hoped. Fro what I’ve read, the typical solution is to move the points such that the rotation axis is incident with the origin and one axis, which reduces the rotation to a simple 2d problem, then rotating and moving everything back. This should be doubly easy, since the old JRodSIM used a similar method of rotation to put all the spheres into a single plane before calculating, however, I’m struggling to get it to work at the moment.
Until next time…