# UR5 Visual servoing(image based, eye in hand)

I am implementing IBVS on a UR5 using ROS. The algorithm works very well in linear X, Y and Z and omega Y. When I try to add a fifth axis(omega X or Omega Z), the robot jerks heavily and goes into protective stop if the velocity is high, or it takes forever to converge if i reduce the velocity. How can I solve this problem?

The jacobian I'm using is generated from Peter Corke's Robotics Toolbox.

• Welcome to Robotics Riddhiman Raut. Can you provide more detail on the algorithm you are implementing, and how it is implemented? As it stands, it is hard for members here to help you. Pictures, diagrams, code snipits, math, robot parameters, etc, are all helpful.
– Ben
Jun 15 '19 at 13:27
• Hello Ben! So the algorithm is the absolute basic visual servoing one, with a proportional error controller. github.com/RiddhimanRaut/Ur5_Visual_Servoing. This is the GitHub link to my codes. There has been a few minor changes made to that code since uploading, but the implementation is as follows. Jun 15 '19 at 14:10
• Object_detect.py returns centroids of 3 colours , vs_ur5 computes the error between desired and current positions of the centroids, gives me the camera velocity using interaction matrix. This camera velocity in turn gives me joint velocities using Jacobian. Jun 15 '19 at 14:22
• If there is anything else I need to provide, please do tell, I really need some help here. Jun 15 '19 at 20:09
• @RiddhimanRaut can you please edit the question and add some of the details from comments above and below. "Absolutely basic" means 3 or 4 Cartesian point features? For the image Jacobian do you have good intrinsics, a good depth estimate? Does the camera velocity screw look sensible before you convert it to joint rates? The gain matrix should have different values for the rotational and translational parts, since they have different units. Can you make the rotational gains lower, or else clip the rotational rates. Jun 22 '19 at 21:53