I want the rotational motors be affected only by my controller, not by the physics of the world. The problem is shown in this video. How to fix this?


1 Answer 1


The problem comes from the fact that the environment is applying some forces and torques on your motor and the motor cannot hold its position because it is not strong enough. To fix this problem, you should simply increase the strength of the motor. For a RotationalMotor, increasing the maxTorque value should resolve the problem.

You should also ensure that you didn't override this value with a lower value using wb_motor_set_available_torque or wb_motor_set_torque. That means that you should not perform torque/force control, but either position control or velocity control (so that you don't limit the motor torque).

For a LinearMotor, the same applies with the force settings of the motor instead of torque. But I believe that in your case, you only have rotational motors.

  • 1
    $\begingroup$ oh that makes sense, thank you very much! I also experimented with turning the dampingConsant high in Hingejoint parameters, is this also a viable solution? somehow it also works $\endgroup$
    – Addy Pete
    Dec 9, 2022 at 9:00
  • $\begingroup$ Yes, increasing the value of dampingConstant will have basically a similar effect. However, it will have a different impact on the dynamics of your simulation. $\endgroup$ Dec 9, 2022 at 9:03
  • $\begingroup$ Hi Oliver, please read the meta answer robotics.meta.stackexchange.com/a/1485/37 and the question associated with it. Your teams has been flagged as a possible voting ring, and we would like to help avoid that in the future. $\endgroup$
    – Mark Booth
    Dec 12, 2022 at 22:15

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.