Unverified Commit 5a3ade2b authored by Yujian Zhang's avatar Yujian Zhang Committed by GitHub

Corrects fisheye camera projection types in spawner configuration (#1361)

# Description

This MR fixes the support of fish-eye projection type. Actually, I don't
find the proper fisheye type on [Replicator
camera](https://docs.omniverse.nvidia.com/py/replicator/1.9.8/source/extensions/omni.replicator.core/docs/API.html#omni.replicator.core.create.camera)
website (maybe it's out of style).

![Screenshot from 2024-10-31
23-15-24](https://github.com/user-attachments/assets/7f826389-fb9e-474b-a54c-ae3c78e92d8b)

I only check the `cameraProjectionType` in `Raw USD Properties` in
Isaacsim GUI.

![Screenshot from 2024-10-31
23-29-10](https://github.com/user-attachments/assets/f8a39ded-0cb8-4ff4-9235-d3b2e00a92fc)

Fixes #1331

## Type of change

- Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- This change requires a documentation update

## Screenshots

| Before | After |
| ------ | ----- |
| ![Screenshot from 2024-11-02
11-25-57](https://github.com/user-attachments/assets/deb44333-f58e-476d-b167-dd084719adf2)|
![Screenshot from 2024-11-02
11-26-03](https://github.com/user-attachments/assets/a2d6caca-fd1d-4a6d-bc06-b6dff027af98)|

## Checklist

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [x] I have updated the changelog and the corresponding version in the
extension's `config/extension.toml` file
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there

---------
Signed-off-by: 's avatarMayank Mittal <12863862+Mayankm96@users.noreply.github.com>
Signed-off-by: 's avatarKelly Guo <kellyg@nvidia.com>
Co-authored-by: 's avatarMayank Mittal <12863862+Mayankm96@users.noreply.github.com>
Co-authored-by: 's avatarKelly Guo <kellyg@nvidia.com>
parent a8d2bcad
[package]
# Note: Semantic Versioning is used: https://semver.org/
version = "0.27.20"
version = "0.27.21"
# Description
title = "Isaac Lab framework for Robot Learning"
......
Changelog
---------
0.27.21 (2024-12-06)
~~~~~~~~~~~~~~~~~~~
Fixed
^^^^^
* Corrected the projection types of fisheye camera in :class:`omni.isaac.lab.sim.spawners.sensors.sensors_cfg.FisheyeCameraCfg`.
Earlier, the projection names used snakecase instead of camelcase.
0.27.20 (2024-12-06)
~~~~~~~~~~~~~~~~~~~~
......
......@@ -184,17 +184,21 @@ class FisheyeCameraCfg(PinholeCameraCfg):
func: Callable = sensors.spawn_camera
projection_type: Literal[
"fisheye_orthographic", "fisheye_equidistant", "fisheye_equisolid", "fisheye_polynomial", "fisheye_spherical"
] = "fisheye_polynomial"
r"""Type of projection to use for the camera. Defaults to "fisheye_polynomial".
"fisheyePolynomial",
"fisheyeSpherical",
"fisheyeKannalaBrandtK3",
"fisheyeRadTanThinPrism",
"omniDirectionalStereo",
] = "fisheyePolynomial"
r"""Type of projection to use for the camera. Defaults to "fisheyePolynomial".
Available options:
- ``"fisheye_orthographic"``: Fisheye camera model using orthographic correction.
- ``"fisheye_equidistant"``: Fisheye camera model using equidistant correction.
- ``"fisheye_equisolid"``: Fisheye camera model using equisolid correction.
- ``"fisheye_polynomial"``: Fisheye camera model with :math:`360^{\circ}` spherical projection.
- ``"fisheye_spherical"``: Fisheye camera model with :math:`360^{\circ}` full-frame projection.
- ``"fisheyePolynomial"``: Fisheye camera model with :math:`360^{\circ}` spherical projection.
- ``"fisheyeSpherical"``: Fisheye camera model with :math:`360^{\circ}` full-frame projection.
- ``"fisheyeKannalaBrandtK3"``: Fisheye camera model using the Kannala-Brandt K3 distortion model.
- ``"fisheyeRadTanThinPrism"``: Fisheye camera model that combines radial and tangential distortions.
- ``"omniDirectionalStereo"``: Fisheye camera model supporting :math:`360^{\circ}` stereoscopic imaging.
"""
fisheye_nominal_width: float = 1936.0
......
......@@ -69,7 +69,7 @@ class TestSpawningSensors(unittest.TestCase):
def test_spawn_fisheye_camera(self):
"""Test spawning a fisheye camera."""
cfg = sim_utils.FisheyeCameraCfg(
projection_type="fisheye_equidistant",
projection_type="fisheyePolynomial",
focal_length=5.0,
f_stop=10.0,
clipping_range=(0.1, 1000.0),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment