Real-time cartesian control of a real robot manipulator
Hello everyone,
The question might vague but I am not sure where to start. I would like to control the position of the end-effector of a 6-DoF or 7-DoF robot manipulator in real-time. There are some teleoperation applications, visual servoing, joystick control and probably the most efficient way to send goal pose commands to the end effector is to use MoveIT in ROS but I am not sure if MoveIT is the best tool to use in a real-time application.
In this regard, I've tried UR5 and UR5e robots where I set 6-DOF end-effector goal pose using MoveIT. I used both KDL and IKfast solvers with RRTConnect as motion planner but the feeling was too laggy.
Then I tried to create an IK solver using ikfast module based on a specific robot model (UR5e), used it in my ROS node and send joint commands using Universal_Robots_ROS_Driver. The real-time result was outstanding. I even had to slow down the robot on the controller side because the robot was extremely responsive to my pose inputs.
However, the problem occurred in the motion path. The IK solver finds about 8+ possible solutions for different elbow/wrist configurations of the robot unless it is close to singularities. I have to choose manually the closest solution to the current joint configuration. I take the mean square error and of each solution from the current joints. It works for a small workspace but not efficient.
The problem is more clear in this video. If you see at the end the elbow up configuration jumps to elbow down configuration, which is a problem in my case. In the video, I used IKfast solver sent joint commands.
I know there are lots of robots enthusiasts who send real-time position commands and the robot moves there without an issue. The solution might be straightforward but I really don't know where to start.
Any suggestions, any examples, any comments are very appreciated.
Note: I mean a soft real-time in this scenario. It is enough to feel like real-time would be enough for this step. It doesn't have to be deterministic real-time.
There is a UR cartesian control package in beta testing: https://github.com/UniversalRobots/Universal_Robots_ROS_Driver/tree/beta-testing
Also, I posted a related question a while back: https://answers.ros.org/question/372301/pick-and-place-moving-objects/
Not sure if that helps. Good luck