I added a cylinder and a rectangular block to the environment, and connected them through a rotation pair. The rectangular block rotates around the center of the cylinder, and the rotation pair is set to speed control mode. By multiplying speed and time in the Lua non threaded script, a certain angle of rotation is achieved. I found that when the rotation speed is small, the rotation angle is relatively accurate, but when the speed is set high, there is a significant deviation in the rotation position, Why is this and how should we solve it?
Cheers
On the issue of the rotation angle of the rotating pair
Re: On the issue of the rotation angle of the rotating pair
Hello,
if you use dynamics, then the associated physics engine will compute relevant values. Additionally, a physics engine usually has difficulties with large angular velocities. You can try several things to improve the accuracy:
if you use dynamics, then the associated physics engine will compute relevant values. Additionally, a physics engine usually has difficulties with large angular velocities. You can try several things to improve the accuracy:
- use a different physics engine
- reduce the dynamics time step (Dynamics dt in the simulation settings dialog)
- adjust the mass and/or inertia of the body that is rotating
- write your own speed controller, but my guess is that you won't do better than the physics engines
- etc.