Reaction Forces with Different Physics Engines

Typically: "How do I... ", "How can I... " questions
Post Reply
CroCr
Posts: 90
Joined: 29 Dec 2022, 01:47

Reaction Forces with Different Physics Engines

Post by CroCr »

I'm conducting a simple experiment where a sphere hits a wall, and I record the reaction forces. The sphere's weight has been compensated by sim.addForceAndTorque(SphereHandle,{0,0,0.1*9.81}). The sphere moves with a constant velocity.

Code: Select all

function sysCall_actuation()
    -- put your actuation code here
    local position = sim.getObjectPosition(SphereHandle,-1)
   -- dt = 0.05 (Simulation dt) and vx = 0.2 [m/s]
    x = position[1] + dt*vx 
    sim.setObjectPosition(SphereHandle,{x,0,0.125},sim.handle_world)
end
What I have observed is as follows:
  • The reaction force varies significantly between different physics engines.
  • The reaction force changes significantly with varying step sizes.
With Newton engine, I have noticed the most abberant things. A half of the sphere is inside the wall with extremely low reaction forces (i.e. Reaction force is {-0.0, 0.0, -0.0}). Both objects are dynamically enabled.

CoppeliaSim Edu, Version 4.6.0 (rev. 6) (Qt Version 5.15.0, MSVC2019). Windows 10 OS.
Post Reply