Skip to content

Improve simulation speed factor #72

Description

@hello-robot-shehab

Currently, the simulation runs with the default 2ms timestep, implicitfast integrator, and elliptic friction cone.

I ran the following snippet to find that in the default open world scene with the table, cube and cylinder, there are 14 contact points. On an Metal series Mac, the Sim runs 0.482x as fast as realtime headless with 1 camera rendering. This profiling is not linear - e.g. increasing the timestep to 4ms does not yield 2x the speed.

        print(f"number of contacts: {data.ncon}")
        for i in range(data.ncon):
            contact = data.contact[i]
            print(f"Geoms: {contact.geom1}, {contact.geom2}. Distance: {contact.dist}")

Image

Image

There is a discussion that mentions that the Mujoco humanoid example runs at 5ms, but the humanoid environment runs at the default 2ms.
I propose to increase the timestep to at least 10ms, which will enable a higher sim-wall time ratio. This will also need to be coordinated with #65 to ensure the joints are moving at the velocities that they are capable of.

  <option timestep="0.010" integrator="implicitfast" impratio="20" cone="elliptic">
    <flag multiccd="enable"/>
  </option>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions