Skip to content

Conversation

@ShahRutav
Copy link
Contributor

What this does

Sometimes, when there are many possible object options to sample from (e.g., in RoboCasa), environment initialization can take a significant amount of time. This overhead can be reduced by optionally passing episode metadata during initialization, instead of sampling everything at init time.

Examples:

Title Label
Adds a new feature (✨ Feature)

How it was tested

The changes do not break the existing code, as tested using the snippet below

import numpy as np
import robosuite as suite

# create environment instance
env = suite.make(
    env_name="Lift", # try with other tasks like "Stack" and "Door"
    robots="Panda",  # try with other robots like "Sawyer" and "Jaco"
    has_renderer=True,
    has_offscreen_renderer=False,
    use_camera_obs=False,
)

# reset the environment
env.reset()

for i in range(1000):
    action = np.random.randn(*env.action_spec[0].shape) * 0.1
    obs, reward, done, info = env.step(action)  # take action in the environment
    env.render()  # render on display

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant