Home | Tutorials | Wiki | Issues
Ask Your Question

Behavior of Joint::SetVelocity method

asked 2015-09-01 08:12:37 -0500

bazzisniper gravatar image

updated 2015-09-01 08:14:55 -0500

Hello. I'm using gazebo-5.0. I'm trying to give velocity command to Simple Arm Robot.

I made ModelPlugin for Simple Arm Robot and inside used Joint::SetVelocity(0, 20) method to give velocity command.

And in world update loop, I did print out the result.

  • cnt : world update loop count
  • vel : joint velocity from Joint::GetVelocity method

I think this result is weird.

[Msg]   cnt vel
[Msg]   0   20
[Msg]   1   20
[Msg]   2   20
[Msg]   3   20
[Msg]   4   20
[Msg]   5   20
[Msg]   6   20
[Msg]   7   20
[Msg]   8   20
[Msg]   9   20
[Msg]   10  20
[Msg]   11  20
 ... and so on...

As you can see, the velocity jumped up to desired velocity. What I expected was gradually increasing velocity value from 0 to desired.

And I also tried Joint::SetMaxForce method. According to the documentation, it should limit the force which applied to joint when using Joint::SetVelocity method. But it seems like this method does not have any effect on the robot's behavior.

//Set the max allowed force of an axis(index) when using Joint::SetVelocity.
virtual void SetMaxForce(unsigned int _index, double _force);

What I want to ask is as follows.

  • Anybody can explain why this happens?

    My guess is Joint::SetVelocity does not consider any Dynamics, it's just Kinematics-related method.

  • Is this value is actual joint velocity? or it's just desired velocity?

  • I saw SetMaxForce method has been marked deprecated, is this method has no effect? then what is the alternate of this method?

Thank you.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-09-03 16:47:04 -0500

scpeters gravatar image
edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2015-09-01 08:12:37 -0500

Seen: 506 times

Last updated: Sep 03 '15