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

How to add a camera and set its intrinsic and extrinsic parameters? #258

Open
ChaiYing1 opened this issue Nov 27, 2024 · 0 comments
Open

Comments

@ChaiYing1
Copy link

I want to add a camera to the slide_block_to_target task, positioned near cam_front (rotating 30 degrees around cam_front with the base as the center). However, after adding the corresponding cam_front2 to all parts of RLBench related to cam_front, I still encounter the following error. How can I add a camera with the same intrinsic parameters but slightly different extrinsic parameters?

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/data_collection/record_demos.py", line 118, in <module>
    env.launch()
  File "/home/anaconda3/envs/lib/python3.11/site-packages/rlbench/environment.py", line 125, in launch
    self._scene = Scene(
                  ^^^^^^
  File "/home/anaconda3/envs/lib/python3.11/site-packages/rlbench/backend/scene.py", line 50, in __init__
    self._cam_front2 = VisionSensor('cam_front2')
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/anaconda3/envs/lib/python3.11/site-packages/pyrep/objects/vision_sensor.py", line 14, in __init__
    super().__init__(name_or_handle)
  File "/home/anaconda3/envs/lib/python3.11/site-packages/pyrep/objects/object.py", line 24, in __init__
    self._handle = sim.simGetObjectHandle(name_or_handle)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/anaconda3/envs/lib/python3.11/site-packages/pyrep/backend/sim.py", line 94, in simGetObjectHandle
    raise RuntimeError('Handle %s does not exist.' % objectName)
RuntimeError: Handle cam_front2 does not exist.
QObject::~QObject: Timers cannot be stopped from another thread
QMutex: destroying locked mutex
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

1 participant