0
$\begingroup$

Rosanswers logo

Hello all,

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

The problem is that this tutorial uses the following function 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 ?


Originally posted by SpiderRico on ROS Answers with karma: 35 on 2014-01-16

Post score: 0


Original comments

Comment by Adolfo Rodriguez T on 2014-01-16:
This question is quite Gazebo-specific. You might get better feedback if you ask it on answers.gazebo.com

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

The velocity controls will not respond unless the max force limit is large. Edit your sdf to increase the limit or programatically use setMaxForce() to increase the force to a large value. Gazebo will work within these limits to try and instantaneously accelerate your joint to those speeds, so you need no force limits on your joints if you are working on velocities.


Originally posted by PeterMilani with karma: 1493 on 2014-01-19

This answer was ACCEPTED on the original site

Post score: 3


Original comments

Comment by SpiderRico on 2014-01-20:
Thank you. I actually asked the same question in gazebosim and got the same answer. Forgot about this one :)

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.