Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
khw11044 opened this issue Nov 19, 2024 · 1 comment

Comments

@khw11044
Copy link

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
Copy link
Collaborator

xuanlinli17 commented Nov 19, 2024

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

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

No branches or pull requests

2 participants