ColinKohler / BulletArm

BulletArm is a benchmark and learning-environment for robotic manipulation.
MIT License
69 stars 18 forks source link

how to get image observation while running headless #6

Closed mlzxy closed 1 year ago

mlzxy commented 1 year ago

Hi, I wonder is it possible to get image observation of the environment while running headless?

Thanks!

ColinKohler commented 1 year ago

By image observation do you mean the rgb/depth images produced by the sensors? If so then yes, the sensors should work fine headless.

mlzxy commented 1 year ago

By image observation do you mean the rgb/depth images produced by the sensors? If so then yes, the sensors should work fine headless.

Thanks for your reply! So if I want another viewpoint, e.g., simulate the screenshot, I could modify the camera parameter of the sensor right?

ColinKohler commented 1 year ago

Yup. The sensing code needs a bit of a cleanup but if you look at bulletarm/pybullet/utils/sensor.py you can see that the sensor takes the sensor position (where the sensor is) along with the target position (where the sensor is pointing at). You may need to fiddle w/the other parameters depending on what your doing but I would start w/just the two positions.

ColinKohler commented 1 year ago

Closing. Feel free to open if there are additional issues.