SetVelocity() does not set Velocity instantaniously

asked 2020-08-06 03:37:30 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Hello,

i want to set an initial position and velocity on the revolute joint of my robot model. I read this Gazebo tutorial. I implemented a Plugin which listens to Ros topic "/set_vel" and calls the Gazebo fuction SetVelocity().

In my Robot model I set friction to 0. There is no controller "behind" my joint. I also disabled gravity.

When I record joint velocity in rqt_plot i expect the velocity to jump from 0 to the desired velocity and stay there since no other forces are applied.

I publish to the /set_vel topic at 10 Hz. Even though it should be enough to publish the desired velocity once (in my case 0.5 rad/s). Following plot shows the joint velocity image description

I know that the velocity is only set at one timestep of Gazebo. That would explain the peak values. But why doesn't the velocity stay at that peak? It seems as some force acts against the velocity.

I already checked if something changes when I set maxForce of the joint to a higher level. Also Max effort. It doesn't change anything. I didn't expect it to since I thought SetVelocity() doesn't set Force on the joint.

I know that SetVelocity() uses SetVelMax() which uses SetAngularVelocity() only on the child link of my joint and not all the links that come after that. But since the child link is the "last" one and the parent link is my fixed base_link that shouldn't be the problem.

I am using Gazebo 9 and ROS Melodic

Can someone help? Thanks

edit retag flag offensive close merge delete