StanfordVL / iGibson

A Simulation Environment to train Robots in Large Realistic Interactive Scenes
http://svl.stanford.edu/igibson
MIT License
659 stars 159 forks source link

camera set problem #225

Open Zhaocka opened 2 years ago

Zhaocka commented 2 years ago

Hello, I want to set different camera heights to get different observations, but I haven't found the relevant interface?

Cyclohexene commented 2 years ago

Actually, editing the urdf file in assets_path: data/assets/models as mentioned in global_config.yaml could change the positions of camera joints. But the urdf file says

<!-- =================================================================================== -->
<!-- |    This document was autogenerated by xacro from robots/kobuki_hexagons_kinect.urdf.xacro | -->
<!-- |    EDITING THIS FILE BY HAND IS NOT RECOMMENDED                                 | -->
<!-- =================================================================================== -->
<!--
    - Base      : kobuki
    - Stacks    : hexagons
    - 3d Sensor : kinect
-->

So this is not a good solution.

stalhabukhari commented 2 years ago

@Zhaocka @Cyclohexene interested in knowing if there has been any update to this.

roberto-martinmartin commented 2 years ago

Hi, are you talking about the camera on the agent or the external viewer? The external viewer can be changed with mouse interactions, or programmatically. To change the camera on the agent, you need to change the location of the frame "eyes" (I believe) in the URDF file of the robot you are using. @Cyclohexene do not worry about the warning. That is when used within ROS: the file will be automatically generated. But within iGibson, the file won't change externally, your changes will be permanent.

If someone implements the functionality to define an additional offset in the config file to be added to the camera with respect to the "eyes" frame in the URDF, that would be fantastic! Please, create a PR for it.

Cyclohexene commented 2 years ago

@stalhabukhari @roberto-martinmartin I was acutally tring to add extra cameras on the robot, I have now managed to change my camera settings and added extra cameras by implementing a subclass of ViewerSimple and passing the coordination of my robot to it.

ConnerQiu commented 1 year ago

Hi @Cyclohexene. Great that you have solve this problem! Would you like to share your modification to me? since I have the same need to add different cameras on the robot. You sharing would be great help for me. Thanks!!