simpler-env / SimplerEnv

Evaluating and reproducing real-world robot manipulation policies (e.g., RT-1, RT-1-X, Octo) in simulation under common setups (e.g., Google Robot, WidowX+Bridge) (CoRL 2024)
https://simpler-env.github.io/
MIT License
330 stars 44 forks source link

TypeError: array_validator() got an unexpected keyword argument 'labels' #52

Open khw11044 opened 5 days ago

khw11044 commented 5 days ago

I executed the code as below.

import simpler_env
from simpler_env.utils.env.observation_utils import get_image_from_maniskill2_obs_dict
import mediapy
import sapien.core as sapien
import numpy as np

from mbodied.types.motion.control import HandControl
from mbodied.robots import Robot
from mbodied.types.sense.vision import Image

class SimplerENVRobot(Robot):
  def __init__(self):
    self.task_name = "google_robot_pick_coke_can"  # @param ["google_robot_pick_coke_can", "google_robot_move_near", "google_robot_open_drawer", "google_robot_close_drawer", "widowx_spoon_on_towel", "widowx_carrot_on_plate", "widowx_stack_cube", "widowx_put_eggplant_in_basket"]
    self.env = simpler_env.make(self.task_name)
    # Note: we turned off the denoiser as the colab kernel will crash if it's turned on
    # To use the denoiser, please git clone our SIMPLER environments
    # and perform evaluations locally.
    sapien.render_config.rt_use_denoiser = False
    self.obs, self.reset_info = self.env.reset()
    print("Reset info", self.reset_info)

  def do(self, action: HandControl):
    # Map the motion to the robot.
    print("[ROBOT ACTION]:", action)
    obs, reward, done, truncated, info = self.env.step(np.array(action.flatten('list')))
    self.obs = obs

  def capture(self) -> Image:
    # Capture observation from the robot.
    return Image(get_image_from_maniskill2_obs_dict(self.env, self.obs))

robot = SimplerENVRobot()
robot.capture()

The following error occurs.

TypeError: array_validator() got an unexpected keyword argument 'labels'

How can I solve it?

xuanlinli17 commented 5 days ago

We didn't test our integration with mbodied. You can use debuggers in e.g., vscode, and backtrace to find the errors.