In our project, we need to influence the robot’s movements by applying rotational force to robot’s motorized joints. Applying Torque values to the joints requires calculations that are prone to errors, some of which are dependent on robot’s simulated environment. In addition, the physics engine would take some steps to update the velocity based on the force, which in the case of servos, is irrelevant since they work at supposedly constant speed (not necessarily consistent speed, as seen in previous post by Ricardo) .
However, the design of ODE was made thinking on the simulation of servos (and motors in general). Due to this, beyond the possibility to apply a force to a joint, it is also possible to set the joins parameters with desired speed and maximum applicable torque to achieve that speed. This allows us to create a very simple model that represents a real servo.
As the names suggest, desired speed is a constant that represents the required velocity either positive or negative. The maximum torque is the absolute maximum force that the servo can apply to achieve the desired speed. For instance, with desired speed zero the engine will resist external forces up to maximum torque effectively simulating a PID servo attempting hold position.
To take advantage of this feature EZPhysics Editor was updated to allow for the settings of this parameters by pressing a key, which allows for the rapid prototyping of the scale of forces needed to move the hinges:
We added a new option in the control node of EZPhysics to allow either the application of a force/torque to a joint or the application of a motor with fixed speed. The flag (ForceOrTorque — not such a great choice of words) indicates wether that control node applies a torque or applies a simulated motor.
Leave a Reply