Gifs taken by another member of the development team
This is an attempt at simulating the inverse kinematics system of the Space Shuttle Canadarm. The goal of this function is to calculate the required angles of the joints given the position of the end effector. The general concept works well however there are severe bugs as you will see below. It seems that the major issues occur when the arm is directed to over-extend. The issue where the wrist angles without input is an issue that I have yet to resolve.
OPERATION
Player uses WASDQE inputs to direct the end effector to move appropriately. This passes the requested movements through a function which will calculate the joint angles and rotate the joints so that the specified end effector position and angle can be achieved. The arm has the ability to adjust the joints individually and then these need to be taken into account by and rendered by the function. The joints are Motor6Ds that are altered by adjusting the C0 CFrame Angles. The two gifs below illustrate the proper operation of the arm.
https://gyazo.com/9c5de306292b34ca8ef61555bc182e06
https://gyazo.com/fd57743d4458922c99d7de495b1aac37
INCORRECT OPERATION
It almost seems as though it faces issues with rounding values or some other odd error. It’s not near the origin which leaves me relatively dumbfounded when it begins to angle the wrist on it’s own. As for the “turn inside itself” issue as seen in the second gif, this is most likely due to trying to set the middle angle of the trigonomic function as 0 which it determines is impossible and then freaks out. Trying to figure out a way to resolve both of these issues. One of the bigger issues as well is being unable to determine current CFrame angles of the Motor6Ds as well.
https://gyazo.com/d7f29a7d0af7028dba11ccd8a27075d8
https://gyazo.com/6ccf0996b8be230f191c4630863a576e
If anyone has any suggestions or would like to assist me with the code, please let me know. I wouldn’t necessarily like to release this as open source as it’s rather sensitive and seems to be first of it’s kind but any help would be appreciated. I can share place access if necessary and I will only be sharing it with people who actually seem to know what they’re doing (ie no tire kickers).
Discord: FlightVector#9013