YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

UR5e Pick-and-Place (LeRobot EnvHub)

A self-contained LeRobot EnvHub environment: a Universal Robots UR5e arm performing a simple pick-and-place task, built on robosuite.

The task is a single-object variant of robosuite's PickPlace: the robot must grasp one object (a can by default) and drop it into the correct bin.

Quick start

Once published to the Hub, load it in one line:

from lerobot.envs import make_env

# trust_remote_code=True is required to execute the hub env.py
envs = make_env("castanetnicolas/UR5e_robosuite_pick_place", n_envs=4, trust_remote_code=True)

suite_name = next(iter(envs))
env = envs[suite_name][0]
obs, info = env.reset(seed=0)
action = env.action_space.sample()
obs, reward, terminated, truncated, info = env.step(action)
env.close()

Requirements

pip install -r requirements.txt

robosuite depends on MuJoCo, which needs a working (headless-capable) OpenGL stack for offscreen rendering. On a server, set e.g. MUJOCO_GL=egl.

API

The package exposes the single EnvHub entry point:

def make_env(n_envs: int = 1, use_async_envs: bool = False, cfg=None) -> gym.vector.VectorEnv
  • n_envs β€” number of parallel rollouts.
  • use_async_envs β€” AsyncVectorEnv (one MuJoCo process per env) vs SyncVectorEnv.
  • cfg β€” optional config object; honored attributes: task, obs_type, observation_width, observation_height, episode_length, fps (β†’ control_freq), and a gym_kwargs dict that overrides the rest.

Tasks

task id object robosuite env
pick_place_can can PickPlaceCan
pick_place_milk milk PickPlaceMilk
pick_place_bread bread PickPlaceBread
pick_place_cereal cereal PickPlaceCereal

Observation & action spaces

Observations are returned in LeRobot format (obs_type="pixels_agent_pos", the default):

  • pixels β€” (H, W, 3) uint8 RGB image from the agentview camera.
  • agent_pos β€” end-effector proprioception: [eef_pos(3), eef_quat(4), gripper_qpos].

Other modes: pixels (image only) and state (flat proprio + object vector via robosuite's GymWrapper).

The action is the robosuite OSC end-effector command: a 6-D pose delta plus a 1-D gripper command, bounded by the controller's action_spec.

Reward & termination

  • Reward β€” dense shaped reward from robosuite (reward_shaping=True).
  • terminated β€” the object is placed in the correct bin (_check_success()).
  • truncated β€” the episode reaches episode_length steps (default 500).

Local testing

python env.py            # runs a short random-action smoke test

Or, following the EnvHub docs:

from lerobot.envs.utils import _load_module_from_path, _call_make_env, _normalize_hub_result

module = _load_module_from_path("./env.py")
result = _call_make_env(module, n_envs=2, use_async_envs=False, cfg=None)
normalized = _normalize_hub_result(result)
env = normalized[next(iter(normalized))][0]
obs, info = env.reset()
env.close()
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support