GithubHelp home page GithubHelp logo

Comments (5)

jacopo-panerati avatar jacopo-panerati commented on June 19, 2024 1

What Iā€™d say you are doing is to make the control frequency coarser than the physics engine stepping frequency, and yes, that is done with aggregate_physics_steps

E.g. if PyBullet freq is 240Hz, with aggregate_physics_steps set to 5 means controlling the quadrotor at 48Hz

from gym-pybullet-drones.

JacopoPan avatar JacopoPan commented on June 19, 2024

Hi @CoolCoder54323,

argument freq sets self.SIM_FREQ which is the inverse of the timestep PyBullet advances the simulation at each call to p.stepSimulation().

aggregate_phy_steps simply determines how many p.stepSimulation() happen within each call to env.step() (it saves a number of read/writes and some wall-clock, it is also useful if you want more accuracy in the simulation, with a higher PyBullet frequency but a fixed or coarser control step frequency).

from gym-pybullet-drones.

CoolCoder54323 avatar CoolCoder54323 commented on June 19, 2024

So shouldn't the simulation slow down if you set freq to 1

from gym-pybullet-drones.

JacopoPan avatar JacopoPan commented on June 19, 2024

No, setting freq=1 simply means that every call to p.stepSimulation() (one per env.step() iff aggregate_phy_steps==1) will advance the simulation, in the simulation's clock, by 1 second. This can happen faster that 1 second in wall clock (the one of the world you live in).

The idea is to run simulations faster than real-time, to collect more data, you can check PyBullet documentation for using it as a gaming engine, with (best effort) real-time stepping, but this is not the goal in this repo.

In general, freq=1 is not a good idea because it would result in poor physics accuracy for fast dynamics/collisions.

from gym-pybullet-drones.

CoolCoder54323 avatar CoolCoder54323 commented on June 19, 2024

What I was trying to do is make each action of the AI last longer in the simulation. So if I'm understanding this correctly I would do that using aggregate_phy_steps so it updates p.stepSimulation() more than once using the same action.

from gym-pybullet-drones.

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.