Gazebo | Ignition | Community
Ask Your Question
0

Setting joint velocity from a plugin

asked 2014-01-16 07:07:07 -0600

SpiderRico gravatar image

Hello all,

I'm trying to simulating an obstacle avoiding robot in gazebo. I've been following this tutorial.

The problem is that this tutorial uses in order to move the robot.

SetForce(0, torque);

The problem with that is it eventually makes robot to spin.

So i looked in API ref and found

SetVelocity(0, vel);

Code compiles just fine however, this doesn't seem to have any effect on model. So how can I set velocity of wheels from a plugin ?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-01-16 17:44:19 -0600

nkoenig gravatar image

You also need to call SetMaxForce(0, max_allowed_force)

The max_allowed_force is the maximum force Gazebo will apply in order to achieve the desired velocity.

edit flag offensive delete link more

Comments

Ty mate ! However, I still wonder about why SetVelocity is not working though.

SpiderRico gravatar imageSpiderRico ( 2014-01-17 11:33:42 -0600 )edit

Question Tools

Stats

Asked: 2014-01-16 07:07:07 -0600

Seen: 1,268 times

Last updated: Jan 16 '14