Hello there!
(skip until the problem if you just want to see the problem)
currently, I’ve been working on a robot arm side project (like ones used on car manufacturing lines) and have gotten all the mathematics and correlated servos to work! my code currently gets a destination point, and then figures out how to rotate all the servos within the arm to make the hand reach that position. i’m very happy with how the code works and has worked flawlessly at moving to any destination, and stopping when it understands a destination is physically unreachable (too far, too close to shoulder thing attached to the base, etc)
THE PROBLEM
to put my issue simply, the arm will always reach its destination (if physically possible) but the trajectory it takes to get there is the issue.
due to all the servos having the same pre set AngularSpeed, some servos will reach their final angle a lot faster than others (for example, when turning, the base will need to turn possibly up to 180 degrees, while the rest of the servos will only need to move somewhat to compensate for any slight distance the destination has moved away from the arm.)
this creates a jarring movement shown in the clip below (or, if you dont want to look at the clip, you can see screenshots of the clip in the reply section to understand the issue) when all the servos are working at “full speed”, where you can see clearly that the trail at the hand of the “Servo” simulated arm is very unnaturally past halfway through the clip as i move the destination point fast enough to require all servos to move, and meanwhile a quick replica i made of the arm using aligning constraints to achieve the same effect has an extremely straight trajectory (at least while it was working lol)
External MediaTHE SOLUTION i need is a way to calculate certain values to put into each servo’s AngularSpeed, so that servos that are going to move a smaller distance can move slower to compensate for other servos that may be moving much more, and in turn give a straight line or smooth curved trajectory.
for those who may ask why i don’t use this other method, (using align constraints) i think its way more interesting to use existing hinges as actual servos to cause the movement, and also as shown near the end of the clip this illusion of working servos can be break very easily at least in the choppy way i implemented it lol