Framerate / setTimeStep - related Question

Post Reply
robin_rob96
Posts: 3
Joined: Thu Jan 21, 2021 12:40 pm

Framerate / setTimeStep - related Question

Post by robin_rob96 »

Hello,

I'm using pybullet for a robotics simulation and as it seems I didn't understood the frame concept from pybullet. :cry:
So far, im using p.GPU

With

Code: Select all

setRealTimeSimulation(0)
setTimeStep(1/240)
Pybullet is calculating 240 times (stepping 240 times in my loop) per second of simulation. Depending on the hardware, this simulated second could be more or less in real time.
With

Code: Select all

setRealTimeSimulation(1)
setTimeStep(1/240)
the timStep is ignored, the real time is now synced with sim time and I get as much calculations per second as my hardware can handle.

Thats what I thought it would work like.

When I disable the rendering mode with p.DIRECT, It seems like I get ~ 4 times more calculation steps for the same task with

Code: Select all

setRealTimeSimulation(0)
setTimeStep(1/240)
How is this possible? I thought the simulation would be done quicker, because I don't render a GUI but the result should be the same? What am I missing? Thx alot!

P.S. Background:
I want to generate gripping data like TCP forces etc. Therefore, I need to know the stepRate, so I can, lets say, output forces every 10th step
robin_rob96
Posts: 3
Joined: Thu Jan 21, 2021 12:40 pm

Re: Framerate / setTimeStep - related Question

Post by robin_rob96 »

Push :S
Post Reply