I am trying to implement inverse kinematics for a robot arm with 5DOF within Unity. The robot arm is supposed to depict the mechanical, hydraulic driven cylinder arm of a heavy machine such as excavators have. As of now, the forward kinematics control of the arm is done with two joysticks (4DOF) in two modes due to the missing DOF. I would like to control the arm with inverse kinematics by controlling the target/end effector with rate control with the same controller setup i.e. the two joysticks.
System description: In my right handed Cartesian coordinate system, the first joint is supposed to rotate around the vertical y-axis, while the rest of the joints are hinge joints around the z-axis. All joints have their individual work/angle range constraint.
My system requires the following:
- IK within the constrained ranges of my joints.
- Real-time mapping of input from controller to motion.
- Integration of velocities of the joints or the integration of an end effector velocity.
- Even distribution of the angles.
I'm trying to use known computer graphic algorithms such as FABRIK and CCD, but have also tried to approach the problem with simple (gradient descent) and more complex (cobyla) optimization methods.
My problems: The last two requirements of the list are my biggest problem.
As far as I understand, joint velocities or the end effector velocity is usually done in the field of robotics by calculating the relationship between the joint velocities and end effector via the Jacobian. The angular and linear velocities are then combined to show the full manipulator velocity. What I do not understand is: if I use the Jacobian with joint angle constraints with upper and lower bound angle limits and also velocity limits, my problem has to be formulated with these inequality constraints. How can make sure, that my end effector is following the trajectory given through the user in the given? I cannot find any explaination of where this is considered.
The distribution of the angles is suppposed to help the arm always hold a more or less curved form downwards much like a banana would. By this I mean I do not want my arm to have any sharp buckling in the middle as such, as it tends to find solutions for some positions, but rather stay similiar to the image below. Is it possible to extend these computer graphic algorithms to achieve this type of angle distribution without interupting the main calculation?
Thank you to anyone, who can help me with these questions!