Git Product home page Git Product logo

Comments (4)

StoneT2000 avatar StoneT2000 commented on August 23, 2024 1

PhysX internals are a bit out of my scope of understanding, @fbxiang might understand it better but tbh PhysX is not super well documented.

https://nvidia-omniverse.github.io/PhysX/physx/5.3.1/docs/Simulation.html is the docs about the whole substepping thing, could not find more details on dt.

from maniskill.

fbxiang avatar fbxiang commented on August 23, 2024 1

PhysX is known to do less solver iterations with smaller dt. And smaller time steps in general makes a lot of simulation problems easier to solve.

from maniskill.

StoneT2000 avatar StoneT2000 commented on August 23, 2024

Thank you for the kind comment!

So in ManiSkill, there are two temporal levels of simulation. There is the underlying higher frequency physics simulation powered by physx, and then there is the lower frequency control simulation where each step of control is one applied action (target positions/velocities are applied to active joints).

In ManiSkill, we take one control step and apply the given actions and then take sim_freq / control_freq physics steps.

High sim frequency affects the dt configuration, saying how much time passes when taking a physics step. If sim freq is higher, then less time is taken between physics steps and I imagine this means less solving is needed.

As a result you can observe the following if you add --save-video to your two commands (and lower number of envs to something storeable in a video)

Top video is sim, control freq of 500, 100, bottom video is 100, 20 (ratios are kept the same)

sim_control_500_100.mp4
sim_control_100_20.mp4

Each frame of the video is a single control step, comprised of 100 / 20 = 500 / 100 = constant 5 physics steps. Hence with higher sim freq it looks smoother/slower per control step since less time is passing, lower sim freq more time passes between control steps (and solver is less accurate)

from maniskill.

btaba avatar btaba commented on August 23, 2024

Awesome, thanks for the insight!

So it sounds like as the physics step time (dt) is increased, PhysX takes a longer amount of wall time to do a single physics step (potentially due to the constraint solver iterations being dynamic and dependent on dt?). That's quite interesting, any further insight on the PhysX side would be appreciated.

Closing the issue for now, thanks again!

from maniskill.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.