huangwl18 / VoxPoser

VoxPoser: Composable 3D Value Maps for Robotic Manipulation with Language Models
https://voxposer.github.io/
MIT License
579 stars 79 forks source link

RuntimeError: Handle Panda does not exist. #24

Open Ethan-Chen-plus opened 4 months ago

Ethan-Chen-plus commented 4 months ago
import os
import openai
from arguments import get_config
from interfaces import setup_LMP
from visualizers import ValueMapVisualizer
from envs.rlbench_env import VoxPoserRLBench
from utils import set_lmp_objects
import numpy as np
from rlbench import tasks

config = get_config('rlbench')
# uncomment this if you'd like to change the language model (e.g., for faster speed or lower cost)
# for lmp_name, cfg in config['lmp_config']['lmps'].items():
#     cfg['model'] = 'gpt-3.5-turbo'

# initialize env and voxposer ui
visualizer = ValueMapVisualizer(config['visualizer'])
env = VoxPoserRLBench(visualizer=visualizer)
lmps, lmp_env = setup_LMP(env, config, debug=False)
voxposer_ui = lmps['plan_ui']

result:

Jupyter environment detected. Enabling Open3D WebVisualizer.
[Open3D INFO] WebRTC GUI backend enabled.
[Open3D INFO] WebRTCWindowSystem: HTTP handshake server disabled.

---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
Cell In[2], line 20
     14 # uncomment this if you'd like to change the language model (e.g., for faster speed or lower cost)
     15 # for lmp_name, cfg in config['lmp_config']['lmps'].items():
     16 #     cfg['model'] = 'gpt-3.5-turbo'
     17 
     18 # initialize env and voxposer ui
     19 visualizer = ValueMapVisualizer(config['visualizer'])
---> 20 env = VoxPoserRLBench(visualizer=visualizer)
     21 lmps, lmp_env = setup_LMP(env, config, debug=False)
     22 voxposer_ui = lmps['plan_ui']

File /data1/ckw/00robo/01llm/VoxPoser/src/envs/rlbench_env.py:52, in VoxPoserRLBench.__init__(self, visualizer)
     49 action_mode = CustomMoveArmThenGripper(arm_action_mode=EndEffectorPoseViaPlanning(),
     50                                 gripper_action_mode=Discrete())
     51 self.rlbench_env = Environment(action_mode)
---> 52 self.rlbench_env.launch()
     53 self.task = None
     55 self.workspace_bounds_min = np.array([self.rlbench_env._scene._workspace_minx, self.rlbench_env._scene._workspace_miny, self.rlbench_env._scene._workspace_minz])

File /data1/ckw/micromamba/envs/voxposer-env/lib/python3.9/site-packages/rlbench/environment.py:112, in Environment.launch(self)
    110     arm.set_position(panda_pos)
    111 else:
--> 112     arm, gripper = arm_class(), gripper_class()
    114 self._robot = Robot(arm, gripper)
    115 if self._randomize_every is None:

File /data1/ckw/micromamba/envs/voxposer-env/lib/python3.9/site-packages/pyrep/robots/arms/panda.py:7, in Panda.__init__(self, count)
      6 def __init__(self, count: int = 0):
----> 7     super().__init__(count, 'Panda', 7)

File /data1/ckw/micromamba/envs/voxposer-env/lib/python3.9/site-packages/pyrep/robots/arms/arm.py:25, in Arm.__init__(self, count, name, num_joints, base_name, max_velocity, max_acceleration, max_jerk)
     23 """Count is used for when we have multiple copies of arms"""
     24 joint_names = ['%s_joint%d' % (name, i+1) for i in range(num_joints)]
---> 25 super().__init__(count, name, joint_names, base_name)
     27 # Used for motion planning
     28 self.max_velocity = max_velocity

File /data1/ckw/micromamba/envs/voxposer-env/lib/python3.9/site-packages/pyrep/robots/robot_component.py:19, in RobotComponent.__init__(self, count, name, joint_names, base_name)
     16 def __init__(self, count: int, name: str, joint_names: List[str],
     17              base_name: str = None):
     18     suffix = '' if count == 0 else '#%d' % (count - 1)
---> 19     super().__init__(
     20         name + suffix if base_name is None else base_name + suffix)
     21     self._num_joints = len(joint_names)
     23     # Joint handles

File /data1/ckw/micromamba/envs/voxposer-env/lib/python3.9/site-packages/pyrep/objects/object.py:24, in Object.__init__(self, name_or_handle)
     22     self._handle = name_or_handle
     23 else:
---> 24     self._handle = sim.simGetObjectHandle(name_or_handle)
     25 assert_type = self._get_requested_type()
     26 actual = ObjectType(sim.simGetObjectType(self._handle))

File /data1/ckw/micromamba/envs/voxposer-env/lib/python3.9/site-packages/pyrep/backend/sim.py:94, in simGetObjectHandle(objectName)
     92 handle = lib.simGetObjectHandle(objectName.encode('ascii'))
     93 if handle < 0:
---> 94     raise RuntimeError('Handle %s does not exist.' % objectName)
     95 return handle

RuntimeError: Handle Panda does not exist.
psh9002 commented 3 months ago

Did you install with Coppeliasim 4.1.0? I got the same error when I installed with the latest version, but it was fixed when I installed with 4.1.0. It also installs fine on Ubuntu22.04.

EricLee0224 commented 2 months ago

Did you install with Coppeliasim 4.1.0? I got the same error when I installed with the latest version, but it was fixed when I installed with 4.1.0. It also installs fine on Ubuntu22.04.

It's true. I installed with the 4.7.0 version, then reported RuntimeError: Handle Panda does not exist.

WAYKEN-TSE commented 2 months ago

Did you install with Coppeliasim 4.1.0? I got the same error when I installed with the latest version, but it was fixed when I installed with 4.1.0. It also installs fine on Ubuntu22.04.

hi,did u install the Coppeliasim 4.1.0 in Ubuntu22.04?I saw the version 4.1.0 only match the Ubuntu version below. image

SevenFo commented 2 months ago

Did you install with Coppeliasim 4.1.0? I got the same error when I installed with the latest version, but it was fixed when I installed with 4.1.0. It also installs fine on Ubuntu22.04.

hi,did u install the Coppeliasim 4.1.0 in Ubuntu22.04?I saw the version 4.1.0 only match the Ubuntu version below. image

The Ubuntu 20.04 version seems to work fine on Ubuntu 24.04

WAYKEN-TSE commented 2 months ago

Did you install with Coppeliasim 4.1.0? I got the same error when I installed with the latest version, but it was fixed when I installed with 4.1.0. It also installs fine on Ubuntu22.04.

hi,did u install the Coppeliasim 4.1.0 in Ubuntu22.04?I saw the version 4.1.0 only match the Ubuntu version below. image

The Ubuntu 20.04 version seems to work fine on Ubuntu 24.04

Coppeliasim 4.1.0 seems doesn't have the version of ubuntu 22.04,can i install the CoppeliaSim_Edu_V4_1_0_Ubuntu20_04.tar on Ubuntu22.04,right?hope for your help,thanks

SevenFo commented 2 months ago

Did you install with Coppeliasim 4.1.0? I got the same error when I installed with the latest version, but it was fixed when I installed with 4.1.0. It also installs fine on Ubuntu22.04.

hi,did u install the Coppeliasim 4.1.0 in Ubuntu22.04?I saw the version 4.1.0 only match the Ubuntu version below. image

The Ubuntu 20.04 version seems to work fine on Ubuntu 24.04

Coppeliasim 4.1.0 seems doesn't have the version of ubuntu 22.04,can i install the CoppeliaSim_Edu_V4_1_0_Ubuntu20_04.tar on Ubuntu22.04,right?hope for your help,thanks

yeah, extract the CoppeliaSim_Edu_V4_1_0_Ubuntu20_04.tar file and execute coppeliasim.sh on Ubuntu22.04

psh9002 commented 2 months ago

@WAYKEN-TSE Yeah. I also hesitated due to the version description but, I just tried. As a result, It worked well

ZhangHangTao commented 1 month ago

我是unbuntu 22.04+ coppeliasim 4.1.0,本来可以正常运行的,突然报错这个,我很疑惑