stepjam / RLBench

A large-scale benchmark and learning environment.
https://sites.google.com/corp/view/rlbench
Other
1.17k stars 235 forks source link

Handle cam_over_shoulder_left_mask does not exist. #165

Closed nicecui closed 2 years ago

nicecui commented 2 years ago

python 3.6

reproduce:

  1. use RLBench to open CoppeliaSim
python3 task_builder.py
  1. make a small change in CoppeliaSim such as adding a sphere, then close CoppeliaSim.
Ubuntu:~/Documents/RLBench/tools$ git status
On branch master
Your branch is up to date with 'origin/master'.

Changes not staged for commit:
    modified:   ../rlbench/task_design.ttt

no changes added to commit (use "git add" and/or "git commit -a")
  1. reopen CoppeliaSim, get the error 'Handle cam_over_shoulder_left_mask does not exist'.
Ubuntu:~/Documents/RLBench/tools$ python3 task_builder.py 
Traceback (most recent call last):
  File "task_builder.py", line 289, in <module>
    scene = Scene(pr, robot, obs_config)
  File "/home/Documents/RLBench/tools/../rlbench/backend/scene.py", line 51, in __init__
    'cam_over_shoulder_left_mask')
  File "/home/miniconda3/envs/panda/lib/python3.6/site-packages/pyrep/objects/vision_sensor.py", line 14, in __init__
    super().__init__(name_or_handle)
  File "/home/miniconda3/envs/panda/lib/python3.6/site-packages/pyrep/objects/object.py", line 24, in __init__
    self._handle = sim.simGetObjectHandle(name_or_handle)
  File "/home/miniconda3/envs/panda/lib/python3.6/site-packages/pyrep/backend/sim.py", line 94, in simGetObjectHandle
    raise RuntimeError('Handle %s does not exist.' % objectName)
RuntimeError: Handle cam_over_shoulder_left_mask does not exist.
QObject::~QObject: Timers cannot be stopped from another thread
QMutex: destroying locked mutex
stepjam commented 2 years ago

You probably edited the scene (and saved) when using task building.

If you are using task_builder, you should never save the scene in CoppeliaSim, and only save using the saving function within the task_builder. If you plan to change the scene, then please open it up in CoppeliaSim (not through task_builder) and then save it that way.

To fix your problem, revert task_design.ttt, and follow advice above :)