I use self.gtm.create_camera_sensor(env_handle, self.cam_props) to create a camera sensor but it returns -1, so I can’t set the camera pos and get the image. I have checked the env_handle and it’s normal. I am wondering what could be the potential reason because it seems I just add the sensor as the example shows…
When I try to attact camera to body, it shows could not find camera with handle -1 in environment 0
Ah that works. I set the graphics_device to be -1 when training because it’s headless. Thank you so much!
But I want to use the camera data during training while not rendering the environment as it will make the training quite slow. Would this be possible?
As for the configuration, it is possible to configure the cameras (by setting the graphics_device) without creating/enabling the viewer.
For a reference, you can check the isaacgymenvs/tasks/base/vec_task.py file…
The configuration of the graphics_device
The creation of the viewer
And, the rendering
As you can identify, the graphics_device is set to -1 only if you don’t want to use camera sensors and want to run in headless mode… While the viewer is only created and used if the headless flag is set to False
So I can train without viewer by setting graphics_device_id not to be -1 while run in headless mode, but anyway I need to render if I want to use camera sensors. I see. Thank you so much for your kind reply!