Unexpected slow motion in cartesian velocity controller

asked 2019-12-13 10:53:08 -0500

thanasis_t gravatar image

updated 2019-12-16 07:10:41 -0500

Hello.

I am trying to build a cartesian end effector velocity controller for a robotic manipulator. The basic idea is that the controller will accept as input the desired velocity of the end effector and by computing inverse kinematics it will produce the necessary joint velocities. Then it will send the corresponding commands to the hardware interface associated with the controller. For the real robot I am using a VelocityJointInterface and everything works fine. However, in Gazebo I am using a PositionJointInterface since Gazebo does not support velocity joint interfaces in the hardware simulation. The problem is that when I load the controller in Gazebo the manipulator is moving very slowly while it should stay still since no velocity input is provided (just like in the real hardware). The input I pass in the interface is computed based on the computed joint velocity and specifically is of the type:

q(t+) = q(t) + qdot(t)*Δt

where q(t) is the current joint position, qdot(t) the computed joint velocity and q(t+) the future joint velocity after time Δt has passed. I have checked both in ROS Kinetic, Gazebo 7 and Ubuntu 16.04 and in ROS Melodic, Gazebo 9 and Ubuntu 18.04 and the results are the same. Does anyone know why this slow motion is occurring? Thanks in advance and let me know if there is any additional info I could provide.

EDIT: Gazebo supports a VelocityJointInterface transmission hardware after all. However, even with that hardware interface the slow motion still occurs. That means that the problem does not lie with the hw interface. Does anyone has any idea where the problem may lie? Thanks in advance.

edit retag flag offensive close merge delete

Comments

However, in Gazebo I am using a PositionJointInterface since Gazebo does not support velocity joint interfaces in the hardware simulation

this is a surprising statement.

What made you draw this conclusion? Afaik, gazebo_ros_control does indeed support exposing a velocity hw interfaces (through the VelocityJointInterface transmission type).

Does that not work for you?

gvdhoorn gravatar image gvdhoorn  ( 2019-12-14 00:49:53 -0500 )edit

Also: please change the title of your question. "cartesian velocity controller" does not give any indication of what it is that you are actually asking about (which appears to be "why is this slow motion occurring".

gvdhoorn gravatar image gvdhoorn  ( 2019-12-14 00:50:59 -0500 )edit

When I was loading the controller in Gazebo with a VelocityJointInterface transmission type, i get the following error "Could not find resource 'shoulder_pan_joint' in 'hardware_interface::VelocityJointInterface' ". However, when I am loading the same controller in the real hardware with the same joint names, everything works smoothly. Hence, I assumed that maybe this problem arises from the hardware interface Gazebo provides. Is it something that I have misunderstood?

thanasis_t gravatar image thanasis_t  ( 2019-12-16 04:45:32 -0500 )edit

Furthermore, here it states that a VelocityJointInterface is not fully implemented.

thanasis_t gravatar image thanasis_t  ( 2019-12-16 05:15:38 -0500 )edit

I would suggest to at least try it, as these lines suggest otherwise.

gvdhoorn gravatar image gvdhoorn  ( 2019-12-16 05:20:54 -0500 )edit

Yes, you are right. Gazebo does indeed support exposing a velocity hardware interface. My bad. However, the slow motion of the robotic manipulator still occurs. Should I edit the question since the hw interface seems to not the problem?

thanasis_t gravatar image thanasis_t  ( 2019-12-16 06:45:43 -0500 )edit

Should I edit the question since the hw interface seems to not the problem?

Yes.

gvdhoorn gravatar image gvdhoorn  ( 2019-12-16 06:58:58 -0500 )edit

Ok, thank you for your kind help.

thanasis_t gravatar image thanasis_t  ( 2019-12-16 07:10:28 -0500 )edit