-
Notifications
You must be signed in to change notification settings - Fork 932
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
Add Camera Benchmark Tool and Allow Correct Unprojection of distance_to_camera depth image #976
Add Camera Benchmark Tool and Allow Correct Unprojection of distance_to_camera depth image #976
Conversation
…ature/tiled_camera_examples
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.
LGTM with a few minor comments. Thanks for adding this useful tool 🎉
@Mayankm96 @pascal-roth can you guys take another look, I think Gary has addressed most of the changes and this tool is quite useful so it would be good to get it merged to the repo! |
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.
New changes LGTM, thanks again!
Co-authored-by: James Smith <142246516+jsmith-bdai@users.noreply.github.com> Signed-off-by: glvov-bdai <glvov@theaiinstitute.com>
Co-authored-by: James Smith <142246516+jsmith-bdai@users.noreply.github.com> Signed-off-by: glvov-bdai <glvov@theaiinstitute.com>
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.
This is cool stuff, thanks @glvov-bdai!
No activity in a week, need to merge functionality for upstream manager based cartpole PR
|
@@ -2,6 +2,18 @@ Changelog | |||
--------- | |||
|
|||
|
|||
0.24.14 (2024-09-20) |
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.
FYI: You need to update BOTH extension.toml and CHANGELOG.rst
@@ -988,7 +988,12 @@ def transform_points( | |||
|
|||
@torch.jit.script | |||
def unproject_depth(depth: torch.Tensor, intrinsics: torch.Tensor) -> torch.Tensor: | |||
r"""Unproject depth image into a pointcloud. | |||
r"""Unproject depth image into a pointcloud. This method assumes that depth |
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.
Please follow google doc-style. The first line here is a one-line sumary. Everything else moves to a new para.
# Description Adds manager based cartpole vision example environments. Also uses the`convert_perspective_depth_to_orthogonal_depth ` functionality introduced in #976 , contains a duplicate copy of the method and test for completeness of the PR. Will be synced with main to remove this duplicate copy once #976 is merged into main, or #976 will be synced with main if this PR is merged first ## Type of change - New feature (non-breaking change which adds functionality) - This change requires a documentation update ## Screenshots ![image](https://github.com/user-attachments/assets/4cce3923-b199-4469-b8d0-9d8d8abb3456) ## 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 - [x] 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 ## Testing Training converged in both RGB and Depth at similar rates to the direct environments --------- Signed-off-by: garylvov <67614381+garylvov@users.noreply.github.com> Signed-off-by: glvov-bdai <glvov@theaiinstitute.com> Co-authored-by: garylvov <gary.lvov@gmail.com> Co-authored-by: garylvov <67614381+garylvov@users.noreply.github.com> Co-authored-by: James Smith <142246516+jsmith-bdai@users.noreply.github.com>
def convert_perspective_depth_to_orthogonal_depth( | ||
perspective_depth: torch.Tensor, intrinsics: torch.Tensor | ||
) -> torch.Tensor: | ||
r"""Provided depth image(s) where depth is provided as the distance to the principal |
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.
r"""
is only used when you have math equations. In all other cases, please resort to double ticks.
The function assumes that the width and height are both greater than 1. | ||
Args: | ||
perspective_depth: The depth measurement obtained with the distance_to_camera replicator. |
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.
Since it is a math util, any mention of replicator does not make sense.
@@ -376,6 +376,24 @@ def iter_old_quat_rotate_inverse(q: torch.Tensor, v: torch.Tensor) -> torch.Tens | |||
iter_old_quat_rotate_inverse(q_rand, v_rand), | |||
) | |||
|
|||
def test_depth_perspective_conversion(self): |
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.
Please always add a docstring for a test so the description also is visible when you run the test.
# | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
|
||
""" |
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.
Recommend moving this benchmarking to the benchmark folder instead of tutorials.
…to_camera depth image (isaac-sim#976)
) # Description Adds manager based cartpole vision example environments. Also uses the`convert_perspective_depth_to_orthogonal_depth ` functionality introduced in isaac-sim#976 , contains a duplicate copy of the method and test for completeness of the PR. Will be synced with main to remove this duplicate copy once isaac-sim#976 is merged into main, or isaac-sim#976 will be synced with main if this PR is merged first ## Type of change - New feature (non-breaking change which adds functionality) - This change requires a documentation update ## Screenshots ![image](https://github.com/user-attachments/assets/4cce3923-b199-4469-b8d0-9d8d8abb3456) ## 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 - [x] 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 ## Testing Training converged in both RGB and Depth at similar rates to the direct environments --------- Signed-off-by: garylvov <67614381+garylvov@users.noreply.github.com> Signed-off-by: glvov-bdai <glvov@theaiinstitute.com> Co-authored-by: garylvov <gary.lvov@gmail.com> Co-authored-by: garylvov <67614381+garylvov@users.noreply.github.com> Co-authored-by: James Smith <142246516+jsmith-bdai@users.noreply.github.com>
Description
This change allows a user to easily test different camera settings/configurations to see what works best for them.
This also includes a fix to be able to correctly unproject point clouds from the
distance_to_camera
replicator,as the
unproject_depth
method assumes that data originates fromdistance_to_image_plane
replicator and as such could previously result in distortion when previously used with thedistance_to_camera
replicator.pyproject.toml
Type of change
Screenshots
Checklist
pre-commit
checks with./isaaclab.sh --format
config/extension.toml
fileCONTRIBUTORS.md
or my name already exists there