# inverse kinematics osciliations..

I am the moment having some issues with an Jacobian going towards a singularity (i think)as some of its values becomes close to zero, and my robot oscillates, and therefore thought that some form of optimization of the linear least square solution is needed.

I have heard about the interior point method, but I am not sure on how i can apply it here.

My equation is as this..

J(q)dq = du

How would i have to implement the optimization, and would be needed?

• You have a problem: your robot oscillates. You have a suspected root cause: Jacobian singularity due to near-zero values. My issue with your question is that you are looking for help with optimizing based on a root cause that you seem unsure about. I would prefer if you could provide more data about your problem so we can all getter a clearer idea of what is going on, and we can then confirm or refute your idea and go from there.
– Chuck
Commented Dec 18, 2015 at 2:40
• For instance, oscillations may be an expected occurrence that could be eliminated with compliance control; see this video for example. With no description of the oscillations it's hard to give meaningful feedback.
– Chuck
Commented Dec 18, 2015 at 2:40
• Welcome to robotics fouritn, as Chuck says, it's better not to presuppose a solution, so it would probably be a good idea to include more details of what what you would like to achieve, what you have tried, what you expected to see and what you actually saw. A description of you system would also be useful. If you edit your question to make it more clear, then hopefully someone will be able to answer it. Commented Dec 18, 2015 at 12:01

As your Jacobian matrix approaches a singularity, one or more of your joints will be required to reach an excessive velocity in order for the end effector to remain on the path. This is a problem when you want the end effector to continue with a non-zero speed along its path. Otherwise, the singularity could cause the end effector to dwell while the nullspace motion of the robot eventually resulted in it being able to continue along the path, and you wouldn't have to implement any optimal control algorithms.

When the configuration becomes close enough to a singularity, any control approach will either cause the end effector to reduce below the desire speed, or else will cause the end effector to deviate from its desired path. If you think of the desired trajectory as a set of differential motions (or speeds), you can see that the two problems above are really the same thing: the end effector is unable to continue with nonzero speed along a desired path.

Systems have been controlled which attempt to optimize the motion in the neighborhood of singularities. Often they will use a gradient technique to minimize the error from the desired trajectory (the path/speed combination). The interior point method is one of these approaches.

You would need to set up your objective function (or constraint) to be optimized to be related to the error between the desired trajectory and the achievable trajectory. I have seen pretty simple optimization functions such as minimize the sum of the square of the joint velocities, all the way through very complex optimizations that trade off between speed and positional deviations.

I think the answers to this question will help you get started: With a 6-axis robot, given end-effector position and range of orientations, how to find optimal joint values

• In my case i do know the velocity constraint of my system.. , and every time i compute a dq that is above allowed velocity i set it to that value. My way of "dirty hacking" the situation was to set the constraint below the velocity limit, such that when dq becomes vel_limit/2 => i set it to dq = vel_limit/2.. Commented Dec 17, 2015 at 22:51
• That is an interesting approach, but by slowing down some joints, and allowing the other joints to keep their computed speeds, you will see deviations from the path. You are trading off positional accuracy in order to keep the velocity as high as you are comfortable letting it go. If you would reduce all joint speeds by the same ratio, you'd stay closer to your path but the end effector speed would suffer. Hence the need to define an optimization function so you can trade these off in a more deterministic way, instead of the arbitrary speed reduction of the excessive joint speeds only. Commented Dec 17, 2015 at 23:00
• well.. yeah in theory.. you are right.. but i haven't noticed that it deviates the path that much.. I am testing it with the same path, and haven't noticed any severe deviating.. but it would of course be desirable to give the joints the most optimal state rather dirty hack it.. Commented Dec 17, 2015 at 23:17
• Are the oscillations you mentioned in your original question deviations from the path, or perhaps caused by you instantaneously changing the velocity of a joint? If the trajectory deviations are not important then maybe an optimized inverse kinematics algorithm would be less critical to performance than focusing on the tuning of each joint. I guess I'm a little confused between your question and the last comment... Commented Dec 17, 2015 at 23:44
• I'd folliow the advice @Chuck gave. It does not sound like a kinematics issue given the limited information we have. Commented Dec 18, 2015 at 3:48