-
Notifications
You must be signed in to change notification settings - Fork 518
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
Adds possibility to initialize cameras with their intrinsic matrix #617
base: main
Are you sure you want to change the base?
Conversation
@Mayankm96 I remember there were issues when the horizontal and vertical apertures differed for the USD camera case. Do you know if that has been resolved by now? Just from looking at the resulting image, I couldn't see something wrong, but otherwise, I will check again. |
source/extensions/omni.isaac.lab/omni/isaac/lab/sensors/ray_caster/patterns/patterns_cfg.py
Outdated
Show resolved
Hide resolved
source/extensions/omni.isaac.lab_assets/omni/isaac/lab_assets/stereolabs.py
Outdated
Show resolved
Hide resolved
source/extensions/omni.isaac.lab_assets/omni/isaac/lab_assets/stereolabs.py
Show resolved
Hide resolved
source/extensions/omni.isaac.lab/omni/isaac/lab/sensors/camera/camera.py
Outdated
Show resolved
Hide resolved
vert_aperture = sensor_prim.GetVerticalApertureAttr().Get() | ||
horiz_aperture_offset = sensor_prim.GetHorizontalApertureOffsetAttr().Get() | ||
vert_aperture_offset = sensor_prim.GetVerticalApertureOffsetAttr().Get() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do these now work properly from rendering PoV? I don't know if this issue is resolved from Omniverse side. Also vertical and horizontal aperture should be same for "square" pixels?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if they work properly. Will implement a test to see if the results between between raycaster and USD camera are the same if I set them
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
apparently it is not resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
offesets are not resolved
source/extensions/omni.isaac.lab/omni/isaac/lab/sensors/ray_caster/patterns/patterns_cfg.py
Outdated
Show resolved
Hide resolved
source/extensions/omni.isaac.lab/omni/isaac/lab/sensors/ray_caster/patterns/patterns_cfg.py
Outdated
Show resolved
Hide resolved
source/extensions/omni.isaac.lab/omni/isaac/lab/sim/spawners/sensors/sensors_cfg.py
Show resolved
Hide resolved
source/extensions/omni.isaac.lab/omni/isaac/lab/sim/spawners/sensors/sensors_cfg.py
Outdated
Show resolved
Hide resolved
source/extensions/omni.isaac.lab_assets/omni/isaac/lab_assets/stereolabs.py
Outdated
Show resolved
Hide resolved
source/extensions/omni.isaac.lab_assets/omni/isaac/lab_assets/stereolabs.py
Show resolved
Hide resolved
source/extensions/omni.isaac.lab_assets/omni/isaac/lab_assets/stereolabs.py
Outdated
Show resolved
Hide resolved
source/extensions/omni.isaac.lab_assets/omni/isaac/lab_assets/stereolabs.py
Show resolved
Hide resolved
Co-authored-by: Mayank Mittal <[email protected]> Signed-off-by: Pascal Roth <[email protected]>
…sim/IsaacLab into feature/cam-init-intrinsic-matrix
I enabled that we can set the vertical aperture, mainly because if we change the horizontal aperture in the USD camera case, the vertical one would always stay at the default value of 15. Weirdly, the offsets seem to make a difference for both cameras but at a very different scale. I added a test to the raycaster camera that initializes both cameras with the same intrinsic matrix. If the offsets are enabled the values changes as follows: offsets equal to 0
offsets unequal 0
@Dhoeller19 and @Mayankm96, do you know how the offsets are handled internally for the USD camera? IMO we handle them correctly for the raycaster case, so that I added warnings now in the USD camera that these values are basically ignored |
Description
This PR adds the possibility of initializing cameras (both Raycaster Cameras and USD Cameras) with the intrinsic matrix instead of using the aperture parameters. The intrinsic matrix is defined in the pattern config and the pinhole cameras spawn config, respectively.
Moreover, it fixes the bug that the vertical aperture is not adjusted for the USD camera case (it will always stay at the default value, even if the horizontal aperture is set). The default is squared pixels; however, it also allows the setting of other values.
Fixes https://github.com/isaac-orbit/IsaacLab/issues/226
Type of change
Checklist
pre-commit
checks with./isaaclab.sh --format
config/extension.toml
fileCONTRIBUTORS.md
or my name already exists there