Repository navigation
Add Camera Benchmark Tool and Allow Correct Unprojection of distance_to_camera depth image - #976
Conversation
jsmith-bdai
left a comment
There was a problem hiding this comment.
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! |
jsmith-bdai
left a comment
There was a problem hiding this comment.
New changes LGTM, thanks again!
Co-authored-by: James Smith <[email protected]> Signed-off-by: glvov-bdai <[email protected]>
Co-authored-by: James Smith <[email protected]> Signed-off-by: glvov-bdai <[email protected]>
Dhoeller19
left a comment
There was a problem hiding this comment.
This is cool stuff, thanks @glvov-bdai!
No activity in a week, need to merge functionality for upstream manager based cartpole PR
|
|
| --------- | ||
|
|
||
|
|
||
| 0.24.14 (2024-09-20) |
There was a problem hiding this comment.
FYI: You need to update BOTH extension.toml and CHANGELOG.rst
| @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.
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  ## 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 <[email protected]> Signed-off-by: glvov-bdai <[email protected]> Co-authored-by: garylvov <[email protected]> Co-authored-by: garylvov <[email protected]> Co-authored-by: James Smith <[email protected]>
| 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.
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.
Since it is a math util, any mention of replicator does not make sense.
| iter_old_quat_rotate_inverse(q_rand, v_rand), | ||
| ) | ||
|
|
||
| def test_depth_perspective_conversion(self): |
There was a problem hiding this comment.
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.
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  ## 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 <[email protected]> Signed-off-by: glvov-bdai <[email protected]> Co-authored-by: garylvov <[email protected]> Co-authored-by: garylvov <[email protected]> Co-authored-by: James Smith <[email protected]>
…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  ## 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 <[email protected]> Signed-off-by: glvov-bdai <[email protected]> Co-authored-by: garylvov <[email protected]> Co-authored-by: garylvov <[email protected]> Co-authored-by: James Smith <[email protected]>
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_camerareplicator,as the
unproject_depthmethod assumes that data originates fromdistance_to_image_planereplicator and as such could previously result in distortion when previously used with thedistance_to_camerareplicator.pyproject.toml
Type of change
Screenshots
Checklist
pre-commitchecks with./isaaclab.sh --formatconfig/extension.tomlfileCONTRIBUTORS.mdor my name already exists there