diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000..a89cd42
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,14 @@
+# Isaac ROS Contribution Rules
+
+Any contribution that you make to this repository will
+be under the Apache 2 License, as dictated by that
+[license](http://www.apache.org/licenses/LICENSE-2.0.html):
+
+> **5. Submission of Contributions.** Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
+
+Contributors must sign-off each commit by adding a `Signed-off-by: ...`
+line to commit messages to certify that they have the right to submit
+the code they are contributing to the project according to the
+[Developer Certificate of Origin (DCO)](https://developercertificate.org/).
+
+[//]: # (202201002)
diff --git a/LICENSE b/LICENSE
index 88bc900..7a4a3ea 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,66 +1,202 @@
-NVIDIA ISAAC ROS SOFTWARE LICENSE
-This license is a legal agreement between you and NVIDIA Corporation ("NVIDIA") and governs the use of the NVIDIA Isaac ROS software and materials provided hereunder (“SOFTWARE”).
-
-This license can be accepted only by an adult of legal age of majority in the country in which the SOFTWARE is used.
-
-If you are entering into this license on behalf of a company or other legal entity, you represent that you have the legal authority to bind the entity to this license, in which case “you” will mean the entity you represent.
-
-If you don’t have the required age or authority to accept this license, or if you don’t accept all the terms and conditions of this license, do not download, install or use the SOFTWARE.
-
-You agree to use the SOFTWARE only for purposes that are permitted by (a) this license, and (b) any applicable law, regulation or generally accepted practices or guidelines in the relevant jurisdictions.
-
-1. LICENSE. Subject to the terms of this license, NVIDIA hereby grants you a non-exclusive, non-transferable license, without the right to sublicense (except as expressly provided in this license) to:
-a. Install and use the SOFTWARE,
-b. Modify and create derivative works of sample or reference source code delivered in the SOFTWARE, and
-c. Distribute any part of the SOFTWARE (i) as incorporated into a software application that has material additional functionality beyond the included portions of the SOFTWARE, or (ii) unmodified in binary format, in each case subject to the distribution requirements indicated in this license.
-
-2. DISTRIBUTION REQUIREMENTS. These are the distribution requirements for you to exercise the distribution grant above:
- a. The following notice shall be included in modifications and derivative works of source code distributed: “This software contains source code provided by NVIDIA Corporation.”
- b. You agree to distribute the SOFTWARE subject to the terms at least as protective as the terms of this license, including (without limitation) terms relating to the license grant, license restrictions and protection of NVIDIA’s intellectual property rights. Additionally, you agree that you will protect the privacy, security and legal rights of your application users.
- c. You agree to notify NVIDIA in writing of any known or suspected distribution or use of the SOFTWARE not in compliance with the requirements of this license, and to enforce the terms of your agreements with respect to the distributed portions of the SOFTWARE.
-3. AUTHORIZED USERS. You may allow employees and contractors of your entity or of your subsidiary(ies) to access and use the SOFTWARE from your secure network to perform work on your behalf. If you are an academic institution you may allow users enrolled or employed by the academic institution to access and use the SOFTWARE from your secure network. You are responsible for the compliance with the terms of this license by your authorized users.
-
-4. LIMITATIONS. Your license to use the SOFTWARE is restricted as follows:
- a. The SOFTWARE is licensed for you to develop applications only for their use in systems with NVIDIA GPUs.
- b. You may not reverse engineer, decompile or disassemble, or remove copyright or other proprietary notices from any portion of the SOFTWARE or copies of the SOFTWARE.
- c. Except as expressly stated above in this license, you may not sell, rent, sublicense, transfer, distribute, modify, or create derivative works of any portion of the SOFTWARE.
- d. Unless you have an agreement with NVIDIA for this purpose, you may not indicate that an application created with the SOFTWARE is sponsored or endorsed by NVIDIA.
- e. You may not bypass, disable, or circumvent any technical limitation, encryption, security, digital rights management or authentication mechanism in the SOFTWARE.
- f. You may not use the SOFTWARE in any manner that would cause it to become subject to an open source software license. As examples, licenses that require as a condition of use, modification, and/or distribution that the SOFTWARE be: (i) disclosed or distributed in source code form; (ii) licensed for the purpose of making derivative works; or (iii) redistributable at no charge.
- g. You acknowledge that the SOFTWARE as delivered is not tested or certified by NVIDIA for use in connection with the design, construction, maintenance, and/or operation of any system where the use or failure of such system could result in a situation that threatens the safety of human life or results in catastrophic damages (each, a "Critical Application"). Examples of Critical Applications include use in avionics, navigation, autonomous vehicle applications, ai solutions for automotive products, military, medical, life support or other life critical applications. NVIDIA shall not be liable to you or any third party, in whole or in part, for any claims or damages arising from such uses. You are solely responsible for ensuring that any product or service developed with the SOFTWARE as a whole includes sufficient features to comply with all applicable legal and regulatory standards and requirements.
- h. You agree to defend, indemnify and hold harmless NVIDIA and its affiliates, and their respective employees, contractors, agents, officers and directors, from and against any and all claims, damages, obligations, losses, liabilities, costs or debt, fines, restitutions and expenses (including but not limited to attorney’s fees and costs incident to establishing the right of indemnification) arising out of or related to your use of goods and/or services that include or utilize the SOFTWARE, or for use of the SOFTWARE outside of the scope of this license or not in compliance with its terms.
-
-5. UPDATES. NVIDIA may, at its option, make available patches, workarounds or other updates to this SOFTWARE. Unless the updates are provided with their separate governing terms, they are deemed part of the SOFTWARE licensed to you as provided in this license.
-
-6. PRE-RELEASE VERSIONS. SOFTWARE versions identified as alpha, beta, preview, early access or otherwise as pre-release may not be fully functional, may contain errors or design flaws, and may have reduced or different security, privacy, availability, and reliability standards relative to commercial versions of NVIDIA software and materials. You may use a pre-release SOFTWARE version at your own risk, understanding that these versions are not intended for use in production or business-critical systems.
-
-7. COMPONENTS UNDER OTHER LICENSES. The SOFTWARE may include NVIDIA or third-party components with separate legal notices or terms as may be described in proprietary notices accompanying the SOFTWARE, such as components governed by open source software licenses. If and to the extent there is a conflict between the terms in this license and the license terms associated with a component, the license terms associated with the component controls only to the extent necessary to resolve the conflict.
-
-8. OWNERSHIP.
-
-8.1 NVIDIA reserves all rights, title and interest in and to the SOFTWARE not expressly granted to you under this license. NVIDIA and its suppliers hold all rights, title and interest in and to the SOFTWARE, including their respective intellectual property rights. The SOFTWARE is copyrighted and protected by the laws of the United States and other countries, and international treaty provisions.
-
-8.2 Subject to the rights of NVIDIA and its suppliers in the SOFTWARE, you hold all rights, title and interest in and to your applications and your derivative works of the sample or reference source code delivered in the SOFTWARE including their respective intellectual property rights. With respect to source code samples or reference source code licensed to you, NVIDIA and its affiliates are free to continue independently developing source code samples and you covenant not to sue NVIDIA, its affiliates or their licensees with respect to later versions of NVIDIA released source code.
-
-9. FEEDBACK. You may, but are not obligated to, provide to NVIDIA Feedback. “Feedback” means suggestions, fixes, modifications, feature requests or other feedback regarding the SOFTWARE. Feedback, even if designated as confidential by you, shall not create any confidentiality obligation for NVIDIA. NVIDIA and its designees have a perpetual, non-exclusive, worldwide, irrevocable license to use, reproduce, publicly display, modify, create derivative works of, license, sublicense, and otherwise distribute and exploit Feedback as NVIDIA sees fit without payment and without obligation or restriction of any kind on account of intellectual property rights or otherwise.
-
-10. NO WARRANTIES. THE SOFTWARE IS PROVIDED AS-IS. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW NVIDIA AND ITS AFFILIATES EXPRESSLY DISCLAIM ALL WARRANTIES OF ANY KIND OR NATURE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT, OR FITNESS FOR A PARTICULAR PURPOSE. NVIDIA DOES NOT WARRANT THAT THE SOFTWARE WILL MEET YOUR REQUIREMENTS OR THAT THE OPERATION THEREOF WILL BE UNINTERRUPTED OR ERROR-FREE, OR THAT ALL ERRORS WILL BE CORRECTED.
-
-11. LIMITATIONS OF LIABILITY. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW NVIDIA AND ITS AFFILIATES SHALL NOT BE LIABLE FOR ANY SPECIAL, INCIDENTAL, PUNITIVE OR CONSEQUENTIAL DAMAGES, OR FOR ANY LOST PROFITS, PROJECT DELAYS, LOSS OF USE, LOSS OF DATA OR LOSS OF GOODWILL, OR THE COSTS OF PROCURING SUBSTITUTE PRODUCTS, ARISING OUT OF OR IN CONNECTION WITH THIS LICENSE OR THE USE OR PERFORMANCE OF THE SOFTWARE, WHETHER SUCH LIABILITY ARISES FROM ANY CLAIM BASED UPON BREACH OF CONTRACT, BREACH OF WARRANTY, TORT (INCLUDING NEGLIGENCE), PRODUCT LIABILITY OR ANY OTHER CAUSE OF ACTION OR THEORY OF LIABILITY, EVEN IF NVIDIA HAS PREVIOUSLY BEEN ADVISED OF, OR COULD REASONABLY HAVE FORESEEN, THE POSSIBILITY OF SUCH DAMAGES. IN NO EVENT WILL NVIDIA’S AND ITS AFFILIATES TOTAL CUMULATIVE LIABILITY UNDER OR ARISING OUT OF THIS LICENSE EXCEED US$10.00. THE NATURE OF THE LIABILITY OR THE NUMBER OF CLAIMS OR SUITS SHALL NOT ENLARGE OR EXTEND THIS LIMIT.
-
-12. TERMINATION. Your rights under this license will terminate automatically without notice from NVIDIA if you fail to comply with any term and condition of this license or if you commence or participate in any legal proceeding against NVIDIA with respect to the SOFTWARE. NVIDIA may terminate this license with advance written notice to you, if NVIDIA decides to no longer provide the SOFTWARE in a country or, in NVIDIA’s sole discretion, the continued use of it is no longer commercially viable. Upon any termination of this license, you agree to promptly discontinue use of the SOFTWARE and destroy all copies in your possession or control. Your prior distributions in accordance with this license are not affected by the termination of this license. All provisions of this license will survive termination, except for the license granted to you.
-
-13. APPLICABLE LAW. This license will be governed in all respects by the laws of the United States and of the State of Delaware, without regard to the conflicts of laws principles. The United Nations Convention on Contracts for the International Sale of Goods is specifically disclaimed. You agree to all terms of this license in the English language. The state or federal courts residing in Santa Clara County, California shall have exclusive jurisdiction over any dispute or claim arising out of this license. Notwithstanding this, you agree that NVIDIA shall still be allowed to apply for injunctive remedies or urgent legal relief in any jurisdiction.
-
-14. NO ASSIGNMENT. This license and your rights and obligations thereunder may not be assigned by you by any means or operation of law without NVIDIA’s permission. Any attempted assignment not approved by NVIDIA in writing shall be void and of no effect. NVIDIA may assign, delegate or transfer this license and its rights and obligations, and if to a non-affiliate you will be notified.
-
-15. EXPORT. The SOFTWARE is subject to United States export laws and regulations. You agree to comply with all applicable U.S. and international export laws, including the Export Administration Regulations (EAR) administered by the U.S. Department of Commerce and economic sanctions administered by the U.S. Department of Treasury’s Office of Foreign Assets Control (OFAC). These laws include restrictions on destinations, end-users and end-use. By accepting this license, you confirm that you are not currently residing in a country or region currently embargoed by the U.S. and that you are not otherwise prohibited from receiving the SOFTWARE.
-
-16. GOVERNMENT USE. The SOFTWARE is, and shall be treated as being, “Commercial Items” as that term is defined at 48 CFR § 2.101, consisting of “commercial computer software” and “commercial computer software documentation”, respectively, as such terms are used in, respectively, 48 CFR § 12.212 and 48 CFR §§ 227.7202 & 252.227-7014(a)(1). Use, duplication or disclosure by the U.S. Government or a U.S. Government subcontractor is subject to the restrictions in this license pursuant to 48 CFR § 12.212 or 48 CFR § 227.7202. In no event shall the US Government user acquire rights in the SOFTWARE beyond those specified in 48 C.F.R. 52.227-19(b)(1)-(2).
-
-17. NOTICES. Please direct your legal notices or other correspondence to NVIDIA Corporation, 2788 San Tomas Expressway, Santa Clara, California 95051, United States of America, Attention: Legal Department.
-
-18. ENTIRE AGREEMENT. This license is the final, complete and exclusive agreement between the parties relating to the subject matter of this license and supersedes all prior or contemporaneous understandings and agreements relating to this subject matter, whether oral or written. If any court of competent jurisdiction determines that any provision of this license is illegal, invalid or unenforceable, the remaining provisions will remain in full force and effect. Any amendment or waiver under this license shall be in writing and signed by representatives of both parties.
-
-(v. November 17, 2021)
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
\ No newline at end of file
diff --git a/README.md b/README.md
index 984a82e..7689632 100644
--- a/README.md
+++ b/README.md
@@ -3,22 +3,31 @@
## Overview
-This repository provides NVIDIA hardware-accelerated packages for proximity segmentation. The `isaac_ros_bi3d` package uses an optimized [Bi3D](https://arxiv.org/abs/2005.07274) model to perform stereo-depth estimation via binary classification, which is used for proximity segmentation. Proximity segmentation predicts freespace from the ground plane, eliminating the need to perform ground plane removal from the segmentation image. Proximity segmentation can be used to determine whether an obstacle is within a proximity field and to avoid collisions with obstacles during navigation.
+
+This repository provides NVIDIA hardware-accelerated packages for proximity segmentation. The `isaac_ros_bi3d` package uses an optimized [Bi3D](https://arxiv.org/abs/2005.07274) model to perform stereo-depth estimation via binary classification, which is used for proximity segmentation. Proximity segmentation can be used to determine whether an obstacle is within a proximity field and to avoid collisions with obstacles during navigation.
+
+Proximity segmentation predicts freespace from the ground plane, eliminating the need to perform ground plane removal from the segmentation image. The `isaac_ros_bi3d_freespace` package leverages this functionality to produce an occupancy grid that indicates freespace in the neighborhood of the robot. This camera-based solution offers a number of appealing advantages over traditional 360 lidar occupancy scanning, including better detection of low-profile obstacles.
Compared to other stereo disparity functions, proximity segmentation is unique in that it provides a prediction of whether an obstacle is within a proximity field, instead of continuous depth, while simultaneously predicting freespace from the ground plane, which other functions typically do not provide. Proximity segmentation is diverse relative to other stereo disparity functions in Isaac ROS, as it is a different algorithm that runs on NVIDIA DLA (deep learning accelerator), which is separate and independent from the GPU. For more information on disparity, refer to [this page](https://en.wikipedia.org/wiki/Binocular_disparity).
### Isaac ROS NITROS Acceleration
-This package is powered by [NVIDIA Isaac Transport for ROS (NITROS)](https://developer.nvidia.com/blog/improve-perception-performance-for-ros-2-applications-with-nvidia-isaac-transport-for-ros/), which leverages type adaptation and negotiation to optimize message formats and dramatically accelerate communication between participating nodes.
+This package is powered by [NVIDIA Isaac Transport for ROS (NITROS)](https://developer.nvidia.com/blog/improve-perception-performance-for-ros-2-applications-with-nvidia-isaac-transport-for-ros/), which leverages type adaptation and negotiation to optimize message formats and dramatically accelerate communication between participating nodes.
## Performance
+
The following are the benchmark performance results of the prepared pipelines in this package, by supported platform:
-| Pipeline | AGX Orin | AGX Xavier | x86_64 w/ RTX 3060 Ti |
-| ----------------------- | -------- | ---------- | --------------------- |
-| Bi3D Stereo Node (576p) | 62 fps | 33 fps | -- |
+| Pipeline | AGX Orin | Orin Nano | x86_64 w/ RTX 3060 Ti |
+| ----------------------------- | ------------------- | ---------------- | --------------------- |
+| Bi3D Stereo Node (576p) (DLA) | 62 fps
46ms | N/A | N/A |
+| Bi3D Stereo Node (576p) (GPU) | 81 fps
61ms | 25 fps
65ms | 145 fps
386ms |
+| Freespace Segmentation | 1145 fps
1.3ms | 725 fps
2ms | 1490 fps
0.3ms |
+
+These data have been collected per the methodology described [here](https://github.com/NVIDIA-ISAAC-ROS/.github/blob/main/profile/performance-summary.md#methodology).
+
+## Table of Contents
-## Table of Contents
- [Isaac ROS Proximity Segmentation](#isaac-ros-proximity-segmentation)
- [Overview](#overview)
- [Isaac ROS NITROS Acceleration](#isaac-ros-nitros-acceleration)
@@ -35,8 +44,8 @@ The following are the benchmark performance results of the prepared pipelines in
- [Model Preparation](#model-preparation)
- [Download Pre-trained Models (.onnx) from NGC](#download-pre-trained-models-onnx-from-ngc)
- [Convert the Pre-trained Models (.onnx) to TensorRT Engine Plans](#convert-the-pre-trained-models-onnx-to-tensorrt-engine-plans)
- - [Generating Engine Plans for Jetson:](#generating-engine-plans-for-jetson)
- - [Generating Engine Plans for x86_64:](#generating-engine-plans-for-x86_64)
+ - [Generating Engine Plans for Jetson](#generating-engine-plans-for-jetson)
+ - [Generating Engine Plans for x86_64](#generating-engine-plans-for-x86_64)
- [Package Reference](#package-reference)
- [`isaac_ros_bi3d`](#isaac_ros_bi3d)
- [Bi3D Overview](#bi3d-overview)
@@ -45,37 +54,43 @@ The following are the benchmark performance results of the prepared pipelines in
- [ROS Parameters](#ros-parameters)
- [ROS Topics Subscribed](#ros-topics-subscribed)
- [ROS Topics Published](#ros-topics-published)
+ - [`isaac_ros_bi3d_freespace`](#isaac_ros_bi3d_freespace)
+ - [Usage](#usage-1)
+ - [ROS Parameters](#ros-parameters-1)
+ - [ROS Topics Subscribed](#ros-topics-subscribed-1)
+ - [ROS Topics Published](#ros-topics-published-1)
- [Troubleshooting](#troubleshooting)
- [Isaac ROS Troubleshooting](#isaac-ros-troubleshooting)
- [DNN and Triton Troubleshooting](#dnn-and-triton-troubleshooting)
- [Updates](#updates)
## Latest Update
-Update 2022-08-31: Update to use latest model and to be compatible with JetPack 5.0.2
+Update 2022-10-19: Add Freespace Segmentation functionality to produce occupancy grids from Bi3D's output
## Supported Platforms
+
This package is designed and tested to be compatible with ROS2 Humble running on [Jetson](https://developer.nvidia.com/embedded-computing) or an x86_64 system with an NVIDIA GPU.
> **Note**: Versions of ROS2 earlier than Humble are **not** supported. This package depends on specific ROS2 implementation features that were only introduced beginning with the Humble release.
-
-
-| Platform | Hardware | Software | Notes |
-| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| Jetson | [Jetson Orin](https://www.nvidia.com/en-us/autonomous-machines/embedded-systems/jetson-orin/)
[Jetson Xavier](https://www.nvidia.com/en-us/autonomous-machines/embedded-systems/jetson-agx-xavier/) | [JetPack 5.0.2](https://developer.nvidia.com/embedded/jetpack) | For best performance, ensure that [power settings](https://docs.nvidia.com/jetson/archives/r34.1/DeveloperGuide/text/SD/PlatformPowerAndPerformance.html) are configured appropriately. |
-| x86_64 | NVIDIA GPU | [Ubuntu 20.04+](https://releases.ubuntu.com/20.04/)
[CUDA 11.6.1+](https://developer.nvidia.com/cuda-downloads) |
-
+| Platform | Hardware | Software | Notes |
+| -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| Jetson | [Jetson Orin](https://www.nvidia.com/en-us/autonomous-machines/embedded-systems/jetson-orin/)
[Jetson Xavier](https://www.nvidia.com/en-us/autonomous-machines/embedded-systems/jetson-agx-xavier/) | [JetPack 5.0.2](https://developer.nvidia.com/embedded/jetpack) | For best performance, ensure that the [power settings](https://docs.nvidia.com/jetson/archives/r34.1/DeveloperGuide/text/SD/PlatformPowerAndPerformance.html) are configured appropriately. |
+| x86_64 | NVIDIA GPU | [Ubuntu 20.04+](https://releases.ubuntu.com/20.04/)
[CUDA 11.6.1+](https://developer.nvidia.com/cuda-downloads) |
### Docker
+
To simplify development, we strongly recommend leveraging the Isaac ROS Dev Docker images by following [these steps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_common/blob/main/docs/dev-env-setup.md). This will streamline your development environment setup with the correct versions of dependencies on both Jetson and x86_64 platforms.
-> **Note:** All Isaac ROS Quickstarts, tutorials, and examples have been designed with the Isaac ROS Docker images as a prerequisite.
+> **Note:** All Isaac ROS quick start guides, tutorials, and examples have been designed with the Isaac ROS Docker images as a prerequisite.
## Quickstart
+
1. Set up your development environment by following the instructions [here](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_common/blob/main/docs/dev-env-setup.md).
-
-2. Clone this repository and its dependencies under `~/workspaces/isaac_ros-dev/src`.
+
+2. Clone this repository and its dependencies under `~/workspaces/isaac_ros-dev/src`.
+
```bash
cd ~/workspaces/isaac_ros-dev/src &&
git clone https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_common &&
@@ -84,29 +99,33 @@ To simplify development, we strongly recommend leveraging the Isaac ROS Dev Dock
git clone https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_proximity_segmentation
```
-3. Pull down a ROS Bag of sample data:
+3. Pull down a rosbag of sample data:
+
```bash
cd ~/workspaces/isaac_ros-dev/src/isaac_ros_proximity_segmentation &&
git lfs pull -X "" -I "resources/rosbags/bi3dnode_rosbag"
```
-4. Launch the Docker container using the `run_dev.sh` script:
+4. Launch the Docker container using the `run_dev.sh` script:
+
```bash
cd ~/workspaces/isaac_ros-dev/src/isaac_ros_common &&
./scripts/run_dev.sh
```
5. Download model files for Bi3D (refer to the [Model Preparation](#model-preparation) section for more information):
+
```bash
mkdir -p /tmp/models/bi3d &&
cd /tmp/models/bi3d &&
- wget 'https://api.ngc.nvidia.com/v2/models/nvidia/isaac/bi3d_proximity_segmentation/versions/1.0.0/files/featnet.onnx' &&
- wget 'https://api.ngc.nvidia.com/v2/models/nvidia/isaac/bi3d_proximity_segmentation/versions/1.0.0/files/segnet.onnx'
+ wget 'https://api.ngc.nvidia.com/v2/models/nvidia/isaac/bi3d_proximity_segmentation/versions/2.0.0/files/featnet.onnx' &&
+ wget 'https://api.ngc.nvidia.com/v2/models/nvidia/isaac/bi3d_proximity_segmentation/versions/2.0.0/files/segnet.onnx'
```
-
-6. Convert the `.onnx` model files to TensorRT engine plan files (refer to the [Model Preparation](#model-preparation) section for more information):
-
+
+6. Convert the `.onnx` model files to TensorRT engine plan files (refer to the [Model Preparation](#model-preparation) section for more information):
+
If using Jetson (Generate engine plans with DLA support enabled):
+
```bash
/usr/src/tensorrt/bin/trtexec --saveEngine=/tmp/models/bi3d/bi3dnet_featnet.plan \
--onnx=/tmp/models/bi3d/featnet.onnx \
@@ -117,6 +136,7 @@ To simplify development, we strongly recommend leveraging the Isaac ROS Dev Dock
```
If using x86_64:
+
```bash
/usr/src/tensorrt/bin/trtexec --saveEngine=/tmp/models/bi3d/bi3dnet_featnet.plan \
--onnx=/tmp/models/bi3d/featnet.onnx --int8 &&
@@ -124,93 +144,136 @@ To simplify development, we strongly recommend leveraging the Isaac ROS Dev Dock
--onnx=/tmp/models/bi3d/segnet.onnx --int8
```
- > **Note:** The engine plans generated using the x86_64 commands will work with Jetson, however, performance will be reduced.
+ > **Note:** The engine plans generated using the x86_64 commands will also work on Jetson, but performance will be reduced.
+
+7. Build and source the workspace:
-7. Build and source the workspace:
```bash
cd /workspaces/isaac_ros-dev &&
colcon build --symlink-install &&
source install/setup.bash
```
-8. (Optional) Run tests to verify complete and correct installation:
+8. (Optional) Run tests to verify complete and correct installation:
+
```bash
colcon test --executor sequential
```
-
-9. Run the launch file to spin up a demo of this package:
+
+9. Run the launch file to spin up a demo of this package:
+
```bash
- ros2 launch isaac_ros_bi3d isaac_ros_bi3d.launch.py featnet_engine_file_path:=/tmp/models/bi3d/bi3dnet_featnet.plan \
+ ros2 launch isaac_ros_bi3d_freespace isaac_ros_bi3d_freespace.launch.py featnet_engine_file_path:=/tmp/models/bi3d/bi3dnet_featnet.plan \
segnet_engine_file_path:=/tmp/models/bi3d/bi3dnet_segnet.plan \
max_disparity_values:=10
```
-10. Visualize and validate the output of the package:
- ```bash
- ros2 run isaac_ros_bi3d isaac_ros_bi3d_visualizer.py \
- --rosbag_path /workspaces/isaac_ros-dev/src/isaac_ros_proximity_segmentation/resources/rosbags/bi3dnode_rosbag/ \
- --max_disparity_value 50
- ```
-
-
+10. Open a **second** terminal inside the Docker container:
+
+ ```bash
+ cd ~/workspaces/isaac_ros-dev/src/isaac_ros_common && \
+ ./scripts/run_dev.sh
+ ```
+
+11. Play the rosbag file to simulate image streams from the cameras:
+
+ ```bash
+ ros2 bag play --loop src/isaac_ros_proximity_segmentation/resources/rosbags/bi3dnode_rosbag
+ ```
+
+12. Open a **third** terminal inside the Docker container:
+
+ ```bash
+ cd ~/workspaces/isaac_ros-dev/src/isaac_ros_common && \
+ ./scripts/run_dev.sh
+ ```
+
+13. Visualize the occupancy grid in RViz.
+
+ Start RViz:
+
+ ```bash
+ rviz2
+ ```
+
+ In the left pane, change **Fixed Frame** to `base_link`.
+
+ In the left pane, click the **Add** button, then select **By topic** followed by **Map** to add the occupancy grid.
+
+
## Next Steps
+
### Try More Examples
+
To continue your exploration, check out the following suggested examples:
-- [Zone detection for an autonomous mobile robot (AMR)](./docs/bi3d-example.md)
+| Example | Dependencies |
+| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
+| [Zone detection for an autonomous mobile robot (AMR)](./docs/bi3d-example.md) | -- |
+| [Tutorial with RealSense, Bi3D, and Freespace Segmentation](./docs/tutorial-bi3d-freespace-realsense.md) | [`realsense-ros`](https://github.com/NVIDIA-ISAAC-ROS/.github/blob/main/profile/realsense-setup.md) |
+| [Tutorial for Bi3D with Isaac Sim](./docs/tutorial-bi3d-isaac-sim.md) | -- |
+| [Tutorial for Freespace Segmentation with Isaac Sim](./docs/tutorial-bi3d-freespace-isaac-sim.md) | -- |
### Use Different Models
+
Click [here](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_dnn_inference/blob/main/docs/model-preparation.md) for more information about how to use NGC models.
### Customize your Dev Environment
-To customize your development environment, reference [this guide](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_common/blob/main/docs/modify-dockerfile.md).
+To customize your development environment, reference [this guide](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_common/blob/main/docs/modify-dockerfile.md).
## Model Preparation
+
### Download Pre-trained Models (.onnx) from NGC
-The following steps show how to download pretrained Bi3D DNN inference models.
+
+The following steps show how to download pretrained Bi3D DNN inference models.
1. The following model files must be downloaded to perform Bi3D inference. From **File Browser** on the **Bi3D** [page](https://catalog.ngc.nvidia.com/orgs/nvidia/teams/isaac/models/bi3d_proximity_segmentation), select the following `.onnx` model files in the **FILE** list and copy the `wget` command by clicking **...** in the **ACTIONS** column:
- `featnet.onnx`
- `segnet.onnx`
2. Run each of the copied commands in a terminal to download the ONNX model file, as shown in the example below:
+
```bash
- wget 'https://api.ngc.nvidia.com/v2/models/nvidia/isaac/bi3d_proximity_segmentation/versions/1.0.0/files/featnet.onnx' &&
- wget 'https://api.ngc.nvidia.com/v2/models/nvidia/isaac/bi3d_proximity_segmentation/versions/1.0.0/files/segnet.onnx'
+ wget 'https://api.ngc.nvidia.com/v2/models/nvidia/isaac/bi3d_proximity_segmentation/versions/2.0.0/files/featnet.onnx' &&
+ wget 'https://api.ngc.nvidia.com/v2/models/nvidia/isaac/bi3d_proximity_segmentation/versions/2.0.0/files/segnet.onnx'
```
-- Bi3D Featnet is a network that extracts features from stereo images.
+- Bi3D Featnet is a network that extracts features from stereo images.
-- Bi3D Segnet is an encoder-decoder segmentation network that generates a binary segmentation confidence map.
+- Bi3D Segnet is an encoder-decoder segmentation network that generates a binary segmentation confidence map.
### Convert the Pre-trained Models (.onnx) to TensorRT Engine Plans
-`trtexec` is used to convert pre-trained models (`.onnx`) to the TensorRT engine plan and is included in the Isaac ROS docker container under `/usr/src/tensorrt/bin/trtexec`.
+
+`trtexec` is used to convert pre-trained models (`.onnx`) to the TensorRT engine plan and is included in the Isaac ROS docker container under `/usr/src/tensorrt/bin/trtexec`.
> **Tip:** Use `/usr/src/tensorrt/bin/trtexec -h` for more information on using the tool.
-#### Generating Engine Plans for Jetson:
+#### Generating Engine Plans for Jetson
```bash
/usr/src/tensorrt/bin/trtexec --onnx= --saveEngine= --useDLACore= --int8
```
-
-#### Generating Engine Plans for x86_64:
+
+#### Generating Engine Plans for x86_64
```bash
/usr/src/tensorrt/bin/trtexec --onnx= --saveEngine= --int8
```
## Package Reference
+
### `isaac_ros_bi3d`
#### Bi3D Overview
-Bi3D predicts if an obstacle is within a given proximity field via a series of binary classifications; the binary classification per pixel determines if the pixel is in front of or behind the proximity field. As such, Bi3D is differentiated from other stereo disparity functions which output continuous [disparity](https://en.wikipedia.org/wiki/Binocular_disparity). Bi3D allows you to increase the diversity of functions used for obstacle detection and improve hardware diversity because Isaac ROS Proximity Segmentation is optimized to run on NVIDIA DLA hardware, which is separate from the GPU. In the form presented here, Bi3D is intended to provide proximity detections, and is not a replacement for the continuous depth estimation provided by Isaac ROS DNN Stereo Disparity.
+
+Bi3D predicts if an obstacle is within a given proximity field via a series of binary classifications; the binary classification per pixel determines if the pixel is in front of or behind the proximity field. As such, Bi3D is differentiated from other stereo disparity functions which output continuous [disparity](https://en.wikipedia.org/wiki/Binocular_disparity). Bi3D allows you to increase the diversity of functions used for obstacle detection and improve hardware diversity because Isaac ROS Proximity Segmentation is optimized to run on NVIDIA DLA hardware, which is separate from the GPU. In the form presented here, Bi3D is intended to provide proximity detections, and is not a replacement for the continuous depth estimation provided by Isaac ROS DNN Stereo Disparity.
> **Note:** This DNN is optimized for and evaluated with RGB global shutter camera images, and accuracy may vary on monochrome images.
#### Usage
+
```bash
ros2 launch isaac_ros_bi3d isaac_ros_bi3d.launch.py featnet_engine_file_path:= \
segnet_engine_file_path:=
-The prediction of freespace eliminates the need for ground plane removal in the output image as a post-processing step, which is often applied to other stereo disparity functions. The output of `isaas_ros_bi3d` can be used to check if any pixels within the image breach a given proximity field by checking the values of all pixels. If a pixel value (disparity value) is larger than the disparity plane defining the proximity field, then it has breached that field. If a pixel does not breach any of the provided disparty planes, it is assigned a value of 0.
+The prediction of freespace eliminates the need for ground plane removal in the output image as a post-processing step, which is often applied to other stereo disparity functions. The output of `isaas_ros_bi3d` can be used to check if any pixels within the image breach a given proximity field by checking the values of all pixels. If a pixel value (disparity value) is larger than the disparity plane defining the proximity field, then it has breached that field. If a pixel does not breach any of the provided disparty planes, it is assigned a value of 0.
+
+#### ROS Parameters
+
+| ROS Parameter | Type | Default | Description |
+| -------------------------- | ---------------------- | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `featnet_engine_file_path` | `std::string` | `'path_to_featnet_engine'` | The path to the Bi3D Featnet engine plan |
+| `segnet_engine_file_path` | `std::string` | `'path_to_segnet_engine'` | The path to the Bi3D Segnet engine plan |
+| `max_disparity_values` | `int64_t` | `64` | The maximum number of disparity values used for Bi3D inference. Isaac ROS Proximity Segmentation supports up to a theoretical maximum of 64 disparity values during inference. However, the maximum length of disparities that a user may run in practice is dependent on the user's hardware and availability of memory. |
+| `disparity_values` | `std::vector` | `{10, 20, 30, 40, 50, 60}` | The specific threshold disparity values used for Bi3D inference. The number of disparity values must not exceed the value set in the `max_disparity_values` ROS parameter. |
+
+#### ROS Topics Subscribed
+
+| ROS Topic | Interface | Description |
+| ------------------ | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `left_image_bi3d` | [sensor_msgs/Image](https://github.com/ros2/common_interfaces/blob/humble/sensor_msgs/msg/Image.msg) | 1. The message must be a ROS `sensor_msgs/Image` of size **W=960, H=576** with `rgb8` image encoding.
2. There should only be a single publisher node publishing to `left_image_bi3d`. Timing behaviour with multiple publishers is not guaranteed by Bi3DNode and inference may not be performed on correct image pairs. Bi3D will process input pairs on a first available basis. Use a separate instance of Bi3DNode for each unique scene (publisher) that you wish to process. |
+| `right_image_bi3d` | [sensor_msgs/Image](https://github.com/ros2/common_interfaces/blob/humble/sensor_msgs/msg/Image.msg) | 1. The message must be a ROS `sensor_msgs/Image` of size **W=960, H=576** with `rgb8` image encoding.
2. There should only be a single publisher node publishing to `right_image_bi3d`. Timing behaviour with multiple publishers is not guaranteed by Bi3DNode and inference may not be performed on correct image pairs. Bi3D will process inputs pairs on a first available basis. Use a separate instance of Bi3DNode for each unique scene (publisher) that you wish to process. | |
+> Note: The images on input topics (`left_image_bi3d` and `right_image_bi3d`) should be a color image in `rgb8` format.
+
+#### ROS Topics Published
+
+| ROS Topic | Interface | Description |
+| --------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| `bi3d_node/bi3d_output` | [stereo_msgs/DisparityImage](https://github.com/ros2/common_interfaces/blob/humble/stereo_msgs/msg/DisparityImage.msg) | The proximity segmentation of Bi3D given as a disparity image. For pixels not deemed freespace, their value is set to the closest (largest) disparity plane that is breached. A pixel value is set to 0 if it doesn't breach any disparity plane or if it is freespace.
Output Resolution: 960x576 (WxH) |
+| `bi3d_node/bi3d_disparity_values` | [isaac_ros_bi3d_interfaces/Bi3DInferenceParametersArray](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_common/blob/main/isaac_ros_bi3d_interfaces/msg/Bi3DInferenceParametersArray.msg) | The disparity values used for Bi3D inference. The timestamp is matched to the timestamp in the correpsonding output image from `bi3d_node/bi3d_output` |
+
+### `isaac_ros_bi3d_freespace`
+
+#### Usage
+
+```bash
+ros2 launch isaac_ros_bi3d_freespace isaac_ros_freespace_segmentation.launch.py base_link_frame:=<"name of base link"> camera_frame:=<"name of camera frame"> s_x:=<"pixel pitch in x dimension"> s_y:=<"pixel pitch in y dimension"> f:=<"focal length"> grid_width:=<"desired grid width"> grid_height:=<"desired grid height"> grid_resolution:=<"desired grid resolution">
+```
#### ROS Parameters
-| ROS Parameter | Type | Default | Description |
-| -------------------------- | --------- | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `featnet_engine_file_path` | `string` | `'path_to_featnet_engine'` | The path to the Bi3D Featnet engine plan |
-| `segnet_engine_file_path` | `string` | `'path_to_segnet_engine'` | The path to the Bi3D Segnet engine plan |
-| `max_disparity_values` | `integer` | `64` | The maximum number of disparity values used for Bi3D inference. Isaac ROS Proximity Segmentation supports up to a theoretical maximum of 64 disparity values during inference. However, the maximum length of disparities that a user may run in practice is dependent on the user's hardware and availability of memory. |
+| ROS Parameter | Type | Default | Description |
+| ----------------- | ------------- | ----------- | ------------------------------------------------------------------------------- |
+| `base_link_frame` | `std::string` | `base_link` | The name of the `tf2` frame attached to the robot base |
+| `camera_frame` | `std::string` | `camera` | The name of the `tf2` frame attached to the camera |
+| `s_x` | `double` | `1e5` | The pitch of pixels on the image sensor in the X dimension, in pixels per meter |
+| `s_y` | `double` | `1e5` | The pitch of pixels on the image sensor in the Y dimension, in pixels per meter |
+| `f` | `double` | `1e-2` | The focal length of the camera, in meters |
+| `grid_width` | `int` | `100` | The width of the output occupancy grid, in number of cells |
+| `grid_height` | `int` | `100` | The height of the output occupancy grid, in number of cells |
+| `grid_resolution` | `double` | `0.01` | The resolution of the output occupancy grid, in meters per cell |
#### ROS Topics Subscribed
-| ROS Topic | Interface | Description |
-| ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `left_image_bi3d` | [sensor_msgs/Image](https://github.com/ros2/common_interfaces/blob/humble/sensor_msgs/msg/Image.msg) | 1. The message must be a ROS `sensor_msgs/Image` of size **W=960, H=576** with `rgb8` image encoding.
2. There should only be a single publisher node publishing to `left_image_bi3d`. Timing behaviour with multiple publishers is not guaranteed by Bi3DNode and inference may not be performed on correct image pairs. Bi3D will process input pairs on a first available basis. Use a separate instance of Bi3DNode for each unique scene (publisher) that you wish to process. |
-| `right_image_bi3d` | [sensor_msgs/Image](https://github.com/ros2/common_interfaces/blob/humble/sensor_msgs/msg/Image.msg) | 1. The message must be a ROS `sensor_msgs/Image` of size **W=960, H=576** with `rgb8` image encoding.
2. There should only be a single publisher node publishing to `right_image_bi3d`. Timing behaviour with multiple publishers is not guaranteed by Bi3DNode and inference may not be performed on correct image pairs. Bi3D will process inputs pairs on a first available basis. Use a separate instance of Bi3DNode for each unique scene (publisher) that you wish to process. |
-| `bi3d_disparity_values` | [isaac_ros_bi3d_interfaces/Bi3DInferenceParametersArray](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_common/blob/main/isaac_ros_bi3d_interfaces/msg/Bi3DInferenceParametersArray.msg) | The message containing the disparity values used for Bi3D inference. The disparity values may be dynamic and change between subsequent messages. The number of disparity values must not exceed the value set in the `max_disparity_values` ROS parameter. |
+
+| ROS Topic | Interface | Description |
+| -------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
+| `freespace_segmentation/mask_in` | [stereo_msgs/DisparityImage](https://github.com/ros2/common_interfaces/blob/humble/stereo_msgs/msg/DisparityImage.msg) | The input disparity image, with pixels corresponding to ground labelled as 0 |
+
+> **Limitation:** For all input images, both the height and width must be an even number of pixels.
#### ROS Topics Published
-| ROS Topic | Interface | Description |
-| --------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| `bi3d_node/bi3d_output` | [stereo_msgs/DisparityImage](https://github.com/ros2/common_interfaces/blob/humble/stereo_msgs/msg/DisparityImage.msg) | The proximity segmentation of Bi3D given as a disparity image. For pixels not deemed freespace, their value is set to the closest (largest) disparity plane that is breached. A pixel value is set to 0 if it doesn't breach any disparity plane or if it is freespace.
Output Resolution: 960x576 (WxH) |
-| `bi3d_node/bi3d_disparity_values` | [isaac_ros_bi3d_interfaces/Bi3DInferenceParametersArray](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_common/blob/main/isaac_ros_bi3d_interfaces/msg/Bi3DInferenceParametersArray.msg) | The disparity values used for Bi3D inference. The timestamp is matched to the timestamp in the correpsonding output image from `bi3d_node/bi3d_output` |
+
+| ROS Topic | Interface | Description |
+| --------------------------------------- | -------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------- |
+| `freespace_segmentation/occupancy_grid` | [nav_msgs/OccupancyGrid](https://github.com/ros2/common_interfaces/blob/humble/nav_msgs/msg/OccupancyGrid.msg) | The output occupancy grid, with cells marked as 0 if free |
## Troubleshooting
+
### Isaac ROS Troubleshooting
-For solutions to problems with Isaac ROS, please check [here](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_common/blob/main/docs/troubleshooting.md).
+
+Check [here](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_common/blob/main/docs/troubleshooting.md) for solutions to problems with Isaac ROS.
### DNN and Triton Troubleshooting
-For solutions to problems with using DNN models and Triton, please check [here](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_dnn_inference/blob/main/docs/troubleshooting.md).
+Check [here](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_dnn_inference/blob/main/docs/troubleshooting.md) for solutions to problems with using DNN models and Triton.
## Updates
-| Date | Changes |
-| ---------- | ------------------------------------------------------------------ |
-| 2022-08-31 | Update to use latest model and to be compatible with JetPack 5.0.2 |
-| 2022-06-30 | Initial release |
+
+| Date | Changes |
+| ---------- | -------------------------------------------------------------------------------------- |
+| 2022-10-19 | Add Freespace Segmentation functionality to produce occupancy grids from Bi3D's output |
+| 2022-08-31 | Update to use latest model and to be compatible with JetPack 5.0.2 |
+| 2022-06-30 | Initial release |
diff --git a/docs/bi3d-example.md b/docs/bi3d-example.md
index 9c05d4b..8e6081a 100644
--- a/docs/bi3d-example.md
+++ b/docs/bi3d-example.md
@@ -1,6 +1,6 @@
# Example Usage of Isaac ROS Proximity Segmentation
-This is an example use case of Isaac ROS Proximity Segmentation, which includes monitoring the forward zones of an autonomous mobile robot (AMR) using a HAWK stereo camera. Consider three zones in front of the robot (Zones 1-3), corresponding to different alerts and actions the robot must take if an object breaches the zone. Zone 3 generates a warning, Zone 2 sends a signal for the robot to slow, and Zone 1 results in the robot stopping immediately.
+This is an example use case of Isaac ROS Proximity Segmentation, which includes monitoring the forward zones of an autonomous mobile robot (AMR) using a HAWK stereo camera. Consider three zones in front of the robot (Zones 1-3), corresponding to different alerts and actions the robot must take if an object breaches the zone. Zone 3 generates a warning, Zone 2 sends a signal for the robot to slow, and Zone 1 results in the robot stopping immediately.
diff --git a/docs/tutorial-bi3d-freespace-isaac-sim.md b/docs/tutorial-bi3d-freespace-isaac-sim.md
new file mode 100644
index 0000000..fb3cf5c
--- /dev/null
+++ b/docs/tutorial-bi3d-freespace-isaac-sim.md
@@ -0,0 +1,46 @@
+# Tutorial for Freespace Segmentation with Isaac Sim
+
+
+## Overview
+This tutorial demonstrates how to use a [Isaac Sim](https://developer.nvidia.com/isaac-sim) and [isaac_ros_bi3d_freespace](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_proximity_segmentation) to create a local occupancy grid.
+
+## Tutorial Walkthrough
+1. Complete steps 1-7 listed in the [Quickstart section](../README.md#quickstart) of the main README.
+2. Install and launch Isaac Sim following the steps in the [Isaac ROS Isaac Sim Setup Guide](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_common/blob/main/docs/isaac-sim-sil-setup.md)
+3. Open the Isaac ROS Common USD scene (using the **Content** window) located at:
+
+ `omniverse://localhost/NVIDIA/Assets/Isaac/2022.1/Isaac/Samples/ROS2/Scenario/carter_warehouse_apriltags_worker.usd`.
+
+ And wait for it to load completely.
+ > **Note:** To use a different server, replace `localhost` with ``
+4. Go to the **Stage** tab and select `/World/Carter_ROS/ROS_Cameras/ros2_create_camera_right_info`. In the **Property** tab, change the **Compute Node -> Inputs -> stereoOffset -> X** value from `0` to `-175.92`.
+
+5. Enable the right camera for a stereo image pair. Go to the **Stage** tab and select `/World/Carter_ROS/ROS_Cameras/enable_camera_right`, then tick the **Condition** checkbox.
+
+6. Project the `base_link` frame to the ground floor so that we can anchor our occupancy grid. Go to the **Stage** tab and select `/World/Carter_ROS/chassis_link/base_link`. In the **Property** tab, change the **Transform -> Translate -> Z** value from `0` to `-0.24`.
+
+
+7. Disable the clock reset when simulation is stopped. Go to the **Stage** tab and select `/World/Clock/isaac_read_simulation_time`, then untick the **Reset On Stop** checkbox.
+
+8. Press **Play** to start publishing data from the Isaac Sim application.
+
+9. Open a second terminal and attach to the container:
+ ```bash
+ cd ~/workspaces/isaac_ros-dev/src/isaac_ros_common && \
+ ./scripts/run_dev.sh
+ ```
+10. In the second terminal, start the `isaac_ros_bi3d` node using the launch files:
+ ```bash
+ ros2 launch isaac_ros_bi3d_freespace isaac_ros_bi3d_freespace_isaac_sim.launch.py \
+ featnet_engine_file_path:=/tmp/models/bi3d/bi3dnet_featnet.plan \
+ segnet_engine_file_path:=/tmp/models/bi3d/bi3dnet_segnet.plan \
+ max_disparity_values:=32
+ ```
+ You should see a RViz window, as shown below:
+
+
+11. Optionally, you can run the visualizer script to visualize the disparity image.
+ ```bash
+ ros2 run isaac_ros_bi3d isaac_ros_bi3d_visualizer.py --disparity_topic bi3d_mask
+ ```
+
diff --git a/docs/tutorial-bi3d-freespace-realsense.md b/docs/tutorial-bi3d-freespace-realsense.md
new file mode 100644
index 0000000..e7473b0
--- /dev/null
+++ b/docs/tutorial-bi3d-freespace-realsense.md
@@ -0,0 +1,77 @@
+# Tutorial for Freespace Segmentation using a RealSense Camera
+
+
+
+## Overview
+
+This tutorial demonstrates how to use a [RealSense](https://www.intel.com/content/www/us/en/architecture-and-technology/realsense-overview.html) camera and [isaac_ros_bi3d_freespace](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_proximity_segmentation) to create a local occupancy grid.
+
+> Note: This tutorial has been tested with a RealSense D455/D435 connected to an x86 PC with an NVIDIA graphics card, as well as a Jetson Xavier AGX.
+
+## Tutorial Walkthrough
+
+1. Complete the [RealSense setup tutorial](https://github.com/NVIDIA-ISAAC-ROS/.github/blob/main/profile/realsense-setup.md).
+2. Complete steps 1-7 described in the [Quickstart Guide](../README.md#quickstart).
+3. Open a new terminal and launch the Docker container using the `run_dev.sh` script:
+
+ ```bash
+ cd ~/workspaces/isaac_ros-dev/src/isaac_ros_common && \
+ ./scripts/run_dev.sh
+ ```
+
+4. Build and source the workspace:
+
+ ```bash
+ cd /workspaces/isaac_ros-dev && \
+ colcon build --symlink-install && \
+ source install/setup.bash
+ ```
+
+5. Please set your camera as shown in the image below, which is on a tripod ~10cm tall and parallel to the ground. Or you can change the static transform in launch file [here](../isaac_ros_bi3d_freespace/launch/isaac_ros_bi3d_freespace_realsense.launch.py#L144-157), according to the placement of your camera with respect to a occupancy grid origin frame.
+
+
+
+6. Run the launch file, which launches the example:
+
+ ```bash
+ ros2 launch isaac_ros_bi3d_freespace isaac_ros_bi3d_freespace_realsense.launch.py featnet_engine_file_path:=/tmp/models/bi3d/bi3dnet_featnet.plan \
+ segnet_engine_file_path:=/tmp/models/bi3d/bi3dnet_segnet.plan \
+ max_disparity_values:=16
+ ```
+
+7. Open a second terminal and attach to the container:
+
+ ```bash
+ cd ~/workspaces/isaac_ros-dev/src/isaac_ros_common && \
+ ./scripts/run_dev.sh
+ ```
+
+8. Optionally, you can run the visualizer script to visualize the disparity image.
+
+ ```bash
+ ros2 run isaac_ros_bi3d isaac_ros_bi3d_visualizer.py --disparity_topic bi3d_mask
+ ```
+
+
+
+
+ > Note: For more information on how to interpret the output, refer to the [interpreting the output section](../README.md#interpreting-the-output) of the main readme.
+
+9. Open a third terminal and attach to the container:
+
+ ```bash
+ cd ~/workspaces/isaac_ros-dev/src/isaac_ros_common && \
+ ./scripts/run_dev.sh
+ ```
+
+10. Visualize the occupancy grid in RViz.
+
+ Start RViz:
+
+ ```bash
+ rviz2
+ ```
+
+ In the left pane, change the **Fixed Frame** to `base_link`.
+
+ In the left pane, click the **Add** button, then select **By topic** followed by **Map** to add the occupancy grid. You should see an ouput similar to the one shown at the top of this page.
diff --git a/docs/tutorial-bi3d-isaac-sim.md b/docs/tutorial-bi3d-isaac-sim.md
new file mode 100644
index 0000000..d00b79d
--- /dev/null
+++ b/docs/tutorial-bi3d-isaac-sim.md
@@ -0,0 +1,50 @@
+# Tutorial for Bi3D with Isaac Sim
+
+
+
+## Overview
+
+This tutorial walks through setting up a pipeline to [segment stereo image pairs](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_proximity_segmentation) generated by Isaac Sim by depth disparity levels. For more details on the output please refer to the [interpreting the output](../README.md#interpreting-the-output) section of the [main readme](../README.md).
+
+## Tutorial Walkthrough
+
+1. Complete steps 1-7 listed in the [Quickstart section](../README.md#quickstart) of the main README.
+2. Install and launch Isaac Sim following the steps in the [Isaac ROS Isaac Sim Setup Guide](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_common/blob/main/docs/isaac-sim-sil-setup.md)
+3. Open the Isaac ROS Common USD scene (using the **Content** window) located at:
+
+ `omniverse://localhost/NVIDIA/Assets/Isaac/2022.1/Isaac/Samples/ROS2/Scenario/carter_warehouse_apriltags_worker.usd`.
+
+ And wait for it to load completely.
+ > **Note:** To use a different server, replace `localhost` with ``
+4. Go to the **Stage** tab and select `/World/Carter_ROS/ROS_Cameras/ros2_create_camera_right_info`. In the **Property** tab, change the **Compute Node -> Inputs -> stereoOffset -> X** value from `0` to `-175.92`.
+
+
+5. Enable the right camera for a stereo image pair. Go to the **Stage** tab and select `/World/Carter_ROS/ROS_Cameras/enable_camera_right`, then tick the **Condition** checkbox.
+
+6. Press **Play** to start publishing data from the Isaac Sim application.
+
+7. Open a second terminal and attach to the container:
+
+ ```bash
+ cd ~/workspaces/isaac_ros-dev/src/isaac_ros_common && \
+ ./scripts/run_dev.sh
+ ```
+
+8. In the second terminal, start the `isaac_ros_bi3d` node using the launch files:
+
+ ```bash
+ ros2 launch isaac_ros_bi3d isaac_ros_bi3d_isaac_sim.launch.py \
+ featnet_engine_file_path:=/tmp/models/bi3d/bi3dnet_featnet.plan \
+ segnet_engine_file_path:=/tmp/models/bi3d/bi3dnet_segnet.plan \
+ max_disparity_values:=32
+ ```
+
+ You should see a RViz window, as shown at the top of this page.
+
+9. Optionally, you can run the visualizer script to visualize the disparity image.
+
+ ```bash
+ ros2 run isaac_ros_bi3d isaac_ros_bi3d_visualizer.py
+ ```
+
+
diff --git a/isaac_ros_bi3d/CMakeLists.txt b/isaac_ros_bi3d/CMakeLists.txt
index fee4445..867ca65 100644
--- a/isaac_ros_bi3d/CMakeLists.txt
+++ b/isaac_ros_bi3d/CMakeLists.txt
@@ -1,10 +1,19 @@
-# Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
+# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES
+# Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
-# NVIDIA CORPORATION and its licensors retain all intellectual property
-# and proprietary rights in and to this software, related documentation
-# and any modifications thereto. Any use, reproduction, disclosure or
-# distribution of this software and related documentation without an express
-# license agreement from NVIDIA CORPORATION is strictly prohibited.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
cmake_minimum_required(VERSION 3.8)
project(isaac_ros_bi3d)
@@ -31,38 +40,11 @@ message(STATUS "Architecture: ${ARCHITECTURE}")
find_package(ament_cmake_auto REQUIRED)
ament_auto_find_build_dependencies()
-# CVCore Bi3D extension library
-add_library(cvcore_bi3d SHARED IMPORTED)
-
-if(${ARCHITECTURE} STREQUAL "x86_64")
- set_property(
- TARGET cvcore_bi3d PROPERTY IMPORTED_LOCATION
- ${CMAKE_CURRENT_SOURCE_DIR}/cvcore/cvcore_bi3d/lib/x86_64/libgxf_cvcore_bi3d.so)
-elseif(${ARCHITECTURE} STREQUAL "aarch64")
- set_property(
- TARGET cvcore_bi3d PROPERTY IMPORTED_LOCATION
- ${CMAKE_CURRENT_SOURCE_DIR}/cvcore/cvcore_bi3d/lib/jetpack50/libgxf_cvcore_bi3d.so)
-endif()
-
-# Isaac ROS Bi3D postprocess extension library
-add_library(bi3d_postprocess SHARED IMPORTED)
-
-if(${ARCHITECTURE} STREQUAL "x86_64")
- set_property(
- TARGET bi3d_postprocess PROPERTY IMPORTED_LOCATION
- ${CMAKE_CURRENT_SOURCE_DIR}/cvcore/cvcore_bi3d/lib/x86_64/libgxf_bi3d_postprocessor.so)
-elseif(${ARCHITECTURE} STREQUAL "aarch64")
- set_property(
- TARGET bi3d_postprocess PROPERTY IMPORTED_LOCATION
- ${CMAKE_CURRENT_SOURCE_DIR}/cvcore/cvcore_bi3d/lib/jetpack50/libgxf_bi3d_postprocessor.so)
-endif()
-
# bi3d_node
ament_auto_add_library(bi3d_node SHARED src/bi3d_node.cpp)
target_compile_definitions(bi3d_node
PRIVATE "COMPOSITION_BUILDING_DLL"
)
-target_link_libraries(bi3d_node cvcore_bi3d bi3d_postprocess)
rclcpp_components_register_nodes(bi3d_node "nvidia::isaac_ros::bi3d::Bi3DNode")
set(node_plugins "${node_plugins}nvidia::isaac_ros::bi3d::Bi3DNode;$\n")
@@ -72,13 +54,6 @@ install(
DESTINATION share/${PROJECT_NAME}
)
-# Install extensions directory
-if(${ARCHITECTURE} STREQUAL "x86_64")
- install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/cvcore/cvcore_bi3d/lib/x86_64/ DESTINATION share/${PROJECT_NAME}/cvcore_bi3d)
-elseif(${ARCHITECTURE} STREQUAL "aarch64")
- install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/cvcore/cvcore_bi3d/lib/jetpack50/ DESTINATION share/${PROJECT_NAME}/cvcore_bi3d)
-endif()
-
set_target_properties(bi3d_node PROPERTIES BUILD_WITH_INSTALL_RPATH TRUE)
install(TARGETS bi3d_node
ARCHIVE DESTINATION lib
@@ -88,10 +63,6 @@ install(TARGETS bi3d_node
if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
-
- # Ignore copyright notices since we use custom NVIDIA Isaac ROS Software License
- set(ament_cmake_copyright_FOUND TRUE)
-
ament_lint_auto_find_test_dependencies()
find_package(launch_testing_ament_cmake REQUIRED)
@@ -103,4 +74,4 @@ install(PROGRAMS
DESTINATION lib/${PROJECT_NAME}
)
-ament_auto_package(INSTALL_TO_SHARE launch)
+ament_auto_package(INSTALL_TO_SHARE launch config)
diff --git a/isaac_ros_bi3d/config/bi3d_node.yaml b/isaac_ros_bi3d/config/bi3d_node.yaml
index 1d38b1d..c0576e9 100644
--- a/isaac_ros_bi3d/config/bi3d_node.yaml
+++ b/isaac_ros_bi3d/config/bi3d_node.yaml
@@ -1,12 +1,20 @@
%YAML 1.2
-# Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
+# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES
+# Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
-# NVIDIA CORPORATION and its licensors retain all intellectual property
-# and proprietary rights in and to this software, related documentation
-# and any modifications thereto. Any use, reproduction, disclosure or
-# distribution of this software and related documentation without an express
-# license agreement from NVIDIA CORPORATION is strictly prohibited.
-##################################################
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
---
name: sync
components:
@@ -252,7 +260,7 @@ components:
engine_type: "DLA_CORE_0"
apply_sigmoid: false
apply_thresholding: true
- threshold: 0.5
+ threshold: 0.0
threshold_value_low: 0.0
threshold_value_high: 1.0
max_disparity_levels: 64
@@ -348,7 +356,7 @@ components:
engine_type: "DLA_CORE_1"
apply_sigmoid: false
apply_thresholding: true
- threshold: 0.5
+ threshold: 0.0
threshold_value_low: 0.0
threshold_value_high: 1.0
max_disparity_levels: 64
@@ -434,39 +442,6 @@ components:
disparity_tensor_name: "disparity"
disparity_values_tensor_name: "bi3d_inference_disparities"
---
-name: bi3d_output_message_splitter
-components:
-- name: data_receiver
- type: nvidia::gxf::DoubleBufferReceiver
- parameters:
- capacity: 12
- policy: 0
-- type: nvidia::gxf::MessageAvailableSchedulingTerm
- parameters:
- receiver: data_receiver
- min_size: 1
-- name: disparity_image_transmitter
- type: nvidia::gxf::DoubleBufferTransmitter
- parameters:
- capacity: 12
-- type: nvidia::gxf::DownstreamReceptiveSchedulingTerm
- parameters:
- transmitter: disparity_image_transmitter
- min_size: 1
-- name: disparity_values_transmitter
- type: nvidia::gxf::DoubleBufferTransmitter
- parameters:
- capacity: 12
-- type: nvidia::gxf::DownstreamReceptiveSchedulingTerm
- parameters:
- transmitter: disparity_values_transmitter
- min_size: 1
-- type: nvidia::isaac_ros::Bi3DMessageSplitter
- parameters:
- receiver: data_receiver
- disparity_image_transmitter: disparity_image_transmitter
- disparity_values_transmitter: disparity_values_transmitter
----
name: bi3d_output_vault
components:
- name: input
@@ -485,24 +460,6 @@ components:
max_waiting_count: 1
drop_waiting: false
---
-name: disparity_values_output_vault
-components:
-- name: input
- type: nvidia::gxf::DoubleBufferReceiver
- parameters:
- capacity: 1
- policy: 0
-- type: nvidia::gxf::MessageAvailableSchedulingTerm
- parameters:
- receiver: input
- min_size: 1
-- name: vault
- type: nvidia::gxf::Vault
- parameters:
- source: input
- max_waiting_count: 1
- drop_waiting: false
----
components:
- name: connection
type: nvidia::gxf::Connection
@@ -599,22 +556,8 @@ components:
type: nvidia::gxf::Connection
parameters:
source: bi3d_postprocess/data_transmitter
- target: bi3d_output_message_splitter/data_receiver
----
-components:
-- name: connection
- type: nvidia::gxf::Connection
- parameters:
- source: bi3d_output_message_splitter/disparity_image_transmitter
target: bi3d_output_vault/input
---
-components:
-- name: connection
- type: nvidia::gxf::Connection
- parameters:
- source: bi3d_output_message_splitter/disparity_values_transmitter
- target: disparity_values_output_vault/input
----
name: scheduler
components:
- name: clock
diff --git a/isaac_ros_bi3d/config/isaac_ros_bi3d_isaac_sim.rviz b/isaac_ros_bi3d/config/isaac_ros_bi3d_isaac_sim.rviz
new file mode 100644
index 0000000..c1757de
--- /dev/null
+++ b/isaac_ros_bi3d/config/isaac_ros_bi3d_isaac_sim.rviz
@@ -0,0 +1,169 @@
+Panels:
+ - Class: rviz_common/Displays
+ Help Height: 78
+ Name: Displays
+ Property Tree Widget:
+ Expanded:
+ - /Global Options1
+ - /Status1
+ - /Grid1
+ - /PointCloud21
+ Splitter Ratio: 0.5
+ Tree Height: 677
+ - Class: rviz_common/Selection
+ Name: Selection
+ - Class: rviz_common/Tool Properties
+ Expanded:
+ - /2D Goal Pose1
+ - /Publish Point1
+ Name: Tool Properties
+ Splitter Ratio: 0.5886790156364441
+ - Class: rviz_common/Views
+ Expanded:
+ - /Current View1
+ Name: Views
+ Splitter Ratio: 0.5
+ - Class: rviz_common/Time
+ Experimental: false
+ Name: Time
+ SyncMode: 0
+ SyncSource: PointCloud2
+Visualization Manager:
+ Class: ""
+ Displays:
+ - Alpha: 0.5
+ Cell Size: 1
+ Class: rviz_default_plugins/Grid
+ Color: 160; 160; 164
+ Enabled: true
+ Line Style:
+ Line Width: 0.029999999329447746
+ Value: Lines
+ Name: Grid
+ Normal Cell Count: 0
+ Offset:
+ X: 0
+ Y: 0
+ Z: 0
+ Plane: XY
+ Plane Cell Count: 50
+ Reference Frame:
+ Value: true
+ - Alpha: 1
+ Autocompute Intensity Bounds: true
+ Autocompute Value Bounds:
+ Max Value: 10
+ Min Value: -10
+ Value: true
+ Axis: Z
+ Channel Name: rgb
+ Class: rviz_default_plugins/PointCloud2
+ Color: 255; 255; 255
+ Color Transformer: RGB8
+ Decay Time: 0
+ Enabled: true
+ Invert Rainbow: true
+ Max Color: 255; 255; 255
+ Max Intensity: 2.267406853441457e-38
+ Min Color: 0; 0; 0
+ Min Intensity: 0
+ Name: PointCloud2
+ Position Transformer: XYZ
+ Selectable: true
+ Size (Pixels): 3
+ Size (m): 0.009999999776482582
+ Style: Flat Squares
+ Topic:
+ Depth: 5
+ Durability Policy: Volatile
+ Filter size: 10
+ History Policy: Keep Last
+ Reliability Policy: Reliable
+ Value: /points2
+ Use Fixed Frame: true
+ Use rainbow: true
+ Value: true
+ Enabled: true
+ Global Options:
+ Background Color: 48; 48; 48
+ Fixed Frame: chassis_link
+ Frame Rate: 30
+ Name: root
+ Tools:
+ - Class: rviz_default_plugins/Interact
+ Hide Inactive Objects: true
+ - Class: rviz_default_plugins/MoveCamera
+ - Class: rviz_default_plugins/Select
+ - Class: rviz_default_plugins/FocusCamera
+ - Class: rviz_default_plugins/Measure
+ Line color: 128; 128; 0
+ - Class: rviz_default_plugins/SetInitialPose
+ Covariance x: 0.25
+ Covariance y: 0.25
+ Covariance yaw: 0.06853891909122467
+ Topic:
+ Depth: 5
+ Durability Policy: Volatile
+ History Policy: Keep Last
+ Reliability Policy: Reliable
+ Value: /initialpose
+ - Class: rviz_default_plugins/SetGoal
+ Topic:
+ Depth: 5
+ Durability Policy: Volatile
+ History Policy: Keep Last
+ Reliability Policy: Reliable
+ Value: /goal_pose
+ - Class: rviz_default_plugins/PublishPoint
+ Single click: true
+ Topic:
+ Depth: 5
+ Durability Policy: Volatile
+ History Policy: Keep Last
+ Reliability Policy: Reliable
+ Value: /clicked_point
+ Transformation:
+ Current:
+ Class: rviz_default_plugins/TF
+ Value: true
+ Views:
+ Current:
+ Class: rviz_default_plugins/Orbit
+ Distance: 13.4544095993042
+ Enable Stereo Rendering:
+ Stereo Eye Separation: 0.05999999865889549
+ Stereo Focal Distance: 1
+ Swap Stereo Eyes: false
+ Value: false
+ Focal Point:
+ X: 9.445137023925781
+ Y: -4.496232509613037
+ Z: 1.0925716161727905
+ Focal Shape Fixed Size: true
+ Focal Shape Size: 0.05000000074505806
+ Invert Z Axis: false
+ Name: Current View
+ Near Clip Distance: 0.009999999776482582
+ Pitch: 0.44039812684059143
+ Target Frame:
+ Value: Orbit (rviz)
+ Yaw: 3.9754106998443604
+ Saved: ~
+Window Geometry:
+ Displays:
+ collapsed: false
+ Height: 968
+ Hide Left Dock: false
+ Hide Right Dock: false
+ QMainWindow State: 000000ff00000000fd0000000400000000000001560000032efc0200000008fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005c00fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000003b0000032e000000c700fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261000000010000010f0000032efc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073010000003b0000032e000000a000fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e100000197000000030000057c0000003efc0100000002fb0000000800540069006d006501000000000000057c0000024400fffffffb0000000800540069006d006501000000000000045000000000000000000000030b0000032e00000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
+ Selection:
+ collapsed: false
+ Time:
+ collapsed: false
+ Tool Properties:
+ collapsed: false
+ Views:
+ collapsed: false
+ Width: 1404
+ X: 1061
+ Y: 232
diff --git a/isaac_ros_bi3d/config/realsense.yaml b/isaac_ros_bi3d/config/realsense.yaml
new file mode 100644
index 0000000..28ded79
--- /dev/null
+++ b/isaac_ros_bi3d/config/realsense.yaml
@@ -0,0 +1,50 @@
+%YAML 1.2
+# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES
+# Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+---
+device_type: ''
+serial_no: ''
+usb_port_id: ''
+
+rgb_camera:
+ profile: '640x480x15'
+color_qos: "SENSOR_DATA"
+
+depth_module:
+ profile: '640x480x60'
+ emitter_enabled: 0
+ emitter_on_off: false
+depth_qos: "SENSOR_DATA"
+depth_info_qos: "SYSTEM_DEFAULT"
+
+infra_qos: "SENSOR_DATA"
+
+enable_accel: false
+enable_color: false
+enable_depth: false
+enable_gyro: false
+enable_infra1: true
+enable_infra2: true
+
+pointcloud:
+ enable: false
+
+pointcloud_texture_index: 0
+pointcloud_texture_stream: RS2_STREAM_ANY
+
+enable_sync: false
+align_depth: false
diff --git a/isaac_ros_bi3d/cvcore/cvcore_bi3d/lib/jetpack50/libgxf_bi3d_postprocessor.so b/isaac_ros_bi3d/cvcore/cvcore_bi3d/lib/jetpack50/libgxf_bi3d_postprocessor.so
deleted file mode 100755
index cfbc443..0000000
--- a/isaac_ros_bi3d/cvcore/cvcore_bi3d/lib/jetpack50/libgxf_bi3d_postprocessor.so
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:c1c0238952b11a230afd491b9dfef8882522ab2623e490fa2cb57a66a643b849
-size 220688
diff --git a/isaac_ros_bi3d/cvcore/cvcore_bi3d/lib/jetpack50/libgxf_cvcore_bi3d.so b/isaac_ros_bi3d/cvcore/cvcore_bi3d/lib/jetpack50/libgxf_cvcore_bi3d.so
deleted file mode 100755
index 1bdf6c4..0000000
--- a/isaac_ros_bi3d/cvcore/cvcore_bi3d/lib/jetpack50/libgxf_cvcore_bi3d.so
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:066f2da3f369df89e1a4954a549de96d2bce9ef5649cd34ed06e773582c2dd56
-size 2150416
diff --git a/isaac_ros_bi3d/cvcore/cvcore_bi3d/lib/jetpack50/libnvcv_bi3d.so b/isaac_ros_bi3d/cvcore/cvcore_bi3d/lib/jetpack50/libnvcv_bi3d.so
deleted file mode 100755
index d6146af..0000000
--- a/isaac_ros_bi3d/cvcore/cvcore_bi3d/lib/jetpack50/libnvcv_bi3d.so
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:5297adbace477f1f3c84aa8a10108770c6ef4e88f31bd542c610b5985cb016e3
-size 83568
diff --git a/isaac_ros_bi3d/cvcore/cvcore_bi3d/lib/jetpack50/libnvcv_core.so b/isaac_ros_bi3d/cvcore/cvcore_bi3d/lib/jetpack50/libnvcv_core.so
deleted file mode 100755
index 517db51..0000000
--- a/isaac_ros_bi3d/cvcore/cvcore_bi3d/lib/jetpack50/libnvcv_core.so
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:aefbb7610d7dafcad34a5ea582b9fcb5a5ce34a87980b8734dad55ecd6cd021e
-size 182712
diff --git a/isaac_ros_bi3d/cvcore/cvcore_bi3d/lib/jetpack50/libnvcv_inferencer.so b/isaac_ros_bi3d/cvcore/cvcore_bi3d/lib/jetpack50/libnvcv_inferencer.so
deleted file mode 100755
index 777d011..0000000
--- a/isaac_ros_bi3d/cvcore/cvcore_bi3d/lib/jetpack50/libnvcv_inferencer.so
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:a48ce0cc3986bc286697b34bdd51e77f53ec77a7466380704f400327be614751
-size 61488
diff --git a/isaac_ros_bi3d/cvcore/cvcore_bi3d/lib/jetpack50/libnvcv_tensorops.so b/isaac_ros_bi3d/cvcore/cvcore_bi3d/lib/jetpack50/libnvcv_tensorops.so
deleted file mode 100755
index e86c2bb..0000000
--- a/isaac_ros_bi3d/cvcore/cvcore_bi3d/lib/jetpack50/libnvcv_tensorops.so
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:a94e2f10048dfefdfec3c084b42fb42c17e7c6eaa7dd5078d5904fa6c1511888
-size 295992
diff --git a/isaac_ros_bi3d/cvcore/cvcore_bi3d/lib/jetpack50/libnvcv_trtbackend.so b/isaac_ros_bi3d/cvcore/cvcore_bi3d/lib/jetpack50/libnvcv_trtbackend.so
deleted file mode 100755
index 00c50a7..0000000
--- a/isaac_ros_bi3d/cvcore/cvcore_bi3d/lib/jetpack50/libnvcv_trtbackend.so
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:289bef727caa168a3f52d3d6a278307c2b874fb0b00d6526962905063e25fe84
-size 47264
diff --git a/isaac_ros_bi3d/cvcore/cvcore_bi3d/lib/x86_64/libgxf_bi3d_postprocessor.so b/isaac_ros_bi3d/cvcore/cvcore_bi3d/lib/x86_64/libgxf_bi3d_postprocessor.so
deleted file mode 100755
index 7fb27cf..0000000
--- a/isaac_ros_bi3d/cvcore/cvcore_bi3d/lib/x86_64/libgxf_bi3d_postprocessor.so
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:c035c6b4e4f90c3883d3fb897828d3a13a64db71b61b10d5e08b0864c50796a2
-size 234576
diff --git a/isaac_ros_bi3d/cvcore/cvcore_bi3d/lib/x86_64/libgxf_cvcore_bi3d.so b/isaac_ros_bi3d/cvcore/cvcore_bi3d/lib/x86_64/libgxf_cvcore_bi3d.so
deleted file mode 100755
index 723edf3..0000000
--- a/isaac_ros_bi3d/cvcore/cvcore_bi3d/lib/x86_64/libgxf_cvcore_bi3d.so
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:da4da8b56d785e4d18ebfb7535186263a21d340a8716aca8681c7f4d1e914af4
-size 2297368
diff --git a/isaac_ros_bi3d/cvcore/cvcore_bi3d/lib/x86_64/libnvcv_bi3d.so b/isaac_ros_bi3d/cvcore/cvcore_bi3d/lib/x86_64/libnvcv_bi3d.so
deleted file mode 100755
index 52d6b37..0000000
--- a/isaac_ros_bi3d/cvcore/cvcore_bi3d/lib/x86_64/libnvcv_bi3d.so
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:52996cc018c517cdbf3be1acbb84d889c1f67b1a0f3234744e062d8eb96119db
-size 94824
diff --git a/isaac_ros_bi3d/cvcore/cvcore_bi3d/lib/x86_64/libnvcv_core.so b/isaac_ros_bi3d/cvcore/cvcore_bi3d/lib/x86_64/libnvcv_core.so
deleted file mode 100755
index d9140e7..0000000
--- a/isaac_ros_bi3d/cvcore/cvcore_bi3d/lib/x86_64/libnvcv_core.so
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:5eb944fde46c64608e22330d729ea78cfce7744b49aa1f7e00d5cc26d54c8689
-size 198208
diff --git a/isaac_ros_bi3d/cvcore/cvcore_bi3d/lib/x86_64/libnvcv_inferencer.so b/isaac_ros_bi3d/cvcore/cvcore_bi3d/lib/x86_64/libnvcv_inferencer.so
deleted file mode 100755
index a2148b0..0000000
--- a/isaac_ros_bi3d/cvcore/cvcore_bi3d/lib/x86_64/libnvcv_inferencer.so
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:5ecfb7720bea6d07a4bbba9d2fcc6c0e642850fcc26e013e0d5a43bd206cb291
-size 67976
diff --git a/isaac_ros_bi3d/cvcore/cvcore_bi3d/lib/x86_64/libnvcv_tensorops.so b/isaac_ros_bi3d/cvcore/cvcore_bi3d/lib/x86_64/libnvcv_tensorops.so
deleted file mode 100755
index cb5cf1c..0000000
--- a/isaac_ros_bi3d/cvcore/cvcore_bi3d/lib/x86_64/libnvcv_tensorops.so
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:d3ab1d035950c7592564efcf5e8669da48c24e9f00ce929bc121d87ed35a7df9
-size 313776
diff --git a/isaac_ros_bi3d/cvcore/cvcore_bi3d/lib/x86_64/libnvcv_trtbackend.so b/isaac_ros_bi3d/cvcore/cvcore_bi3d/lib/x86_64/libnvcv_trtbackend.so
deleted file mode 100755
index c03c1c3..0000000
--- a/isaac_ros_bi3d/cvcore/cvcore_bi3d/lib/x86_64/libnvcv_trtbackend.so
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:52f200683d97749900df6fea3860d9a5a013d326c0aee9883ad13d8ac2099607
-size 50568
diff --git a/isaac_ros_bi3d/include/isaac_ros_bi3d/bi3d_node.hpp b/isaac_ros_bi3d/include/isaac_ros_bi3d/bi3d_node.hpp
index 5d0e33f..5bfae9e 100644
--- a/isaac_ros_bi3d/include/isaac_ros_bi3d/bi3d_node.hpp
+++ b/isaac_ros_bi3d/include/isaac_ros_bi3d/bi3d_node.hpp
@@ -1,21 +1,28 @@
-/**
- * Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
- *
- * NVIDIA CORPORATION and its licensors retain all intellectual property
- * and proprietary rights in and to this software, related documentation
- * and any modifications thereto. Any use, reproduction, disclosure or
- * distribution of this software and related documentation without an express
- * license agreement from NVIDIA CORPORATION is strictly prohibited.
- */
+// SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES
+// Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+// SPDX-License-Identifier: Apache-2.0
+
#ifndef ISAAC_ROS_BI3D__BI3D_NODE_HPP_
#define ISAAC_ROS_BI3D__BI3D_NODE_HPP_
#include
-#include
-#include
#include
#include "rclcpp/rclcpp.hpp"
+#include "rclcpp/rclcpp/parameter_event_handler.hpp"
#include "isaac_ros_nitros/nitros_node.hpp"
namespace nvidia
@@ -41,7 +48,8 @@ class Bi3DNode : public nitros::NitrosNode
void postLoadGraphCallback() override;
// Callback for setting correct VideoBuffer name
- void Bi3DVideoBufferNameCallback(const gxf_context_t, nitros::NitrosTypeBase &, std::string name);
+ void Bi3DVideoBufferNameCallback(
+ const gxf_context_t, nitros::NitrosTypeBase &, std::string name, bool pub_disp_values);
private:
// Bi3D model input paramters
@@ -55,6 +63,10 @@ class Bi3DNode : public nitros::NitrosNode
// Bi3D extra parameters
int64_t max_disparity_values_;
+ std::vector disparity_values_;
+
+ // Dynamic parameter callbacks and handles
+ OnSetParametersCallbackHandle::SharedPtr on_set_param_cb_handle_{nullptr};
};
} // namespace bi3d
diff --git a/isaac_ros_bi3d/launch/isaac_ros_bi3d.launch.py b/isaac_ros_bi3d/launch/isaac_ros_bi3d.launch.py
index 2d06857..a2d9cdd 100644
--- a/isaac_ros_bi3d/launch/isaac_ros_bi3d.launch.py
+++ b/isaac_ros_bi3d/launch/isaac_ros_bi3d.launch.py
@@ -1,10 +1,19 @@
-# Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
+# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES
+# Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
-# NVIDIA CORPORATION and its licensors retain all intellectual property
-# and proprietary rights in and to this software, related documentation
-# and any modifications thereto. Any use, reproduction, disclosure or
-# distribution of this software and related documentation without an express
-# license agreement from NVIDIA CORPORATION is strictly prohibited.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
import launch
from launch.actions import DeclareLaunchArgument
diff --git a/isaac_ros_bi3d/launch/isaac_ros_bi3d_isaac_sim.launch.py b/isaac_ros_bi3d/launch/isaac_ros_bi3d_isaac_sim.launch.py
new file mode 100644
index 0000000..c166fa5
--- /dev/null
+++ b/isaac_ros_bi3d/launch/isaac_ros_bi3d_isaac_sim.launch.py
@@ -0,0 +1,92 @@
+# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES
+# Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+
+import os
+
+from ament_index_python.packages import get_package_share_directory
+import launch
+from launch.actions import DeclareLaunchArgument
+from launch.substitutions import LaunchConfiguration
+from launch_ros.actions import ComposableNodeContainer, Node
+from launch_ros.descriptions import ComposableNode
+
+
+def generate_launch_description():
+ launch_args = [
+ DeclareLaunchArgument(
+ 'featnet_engine_file_path',
+ default_value='',
+ description='The absolute path to the Bi3D Featnet TensorRT engine plan'),
+ DeclareLaunchArgument(
+ 'segnet_engine_file_path',
+ default_value='',
+ description='The absolute path to the Bi3D Segnet TensorRT engine plan'),
+ DeclareLaunchArgument(
+ 'max_disparity_values',
+ default_value='64',
+ description='The maximum number of disparity values given for Bi3D inference'),
+ ]
+
+ # Bi3DNode parameters
+ featnet_engine_file_path = LaunchConfiguration('featnet_engine_file_path')
+ segnet_engine_file_path = LaunchConfiguration('segnet_engine_file_path')
+ max_disparity_values = LaunchConfiguration('max_disparity_values')
+
+ bi3d_node = ComposableNode(
+ name='bi3d_node',
+ package='isaac_ros_bi3d',
+ plugin='nvidia::isaac_ros::bi3d::Bi3DNode',
+ parameters=[{
+ 'featnet_engine_file_path': featnet_engine_file_path,
+ 'segnet_engine_file_path': segnet_engine_file_path,
+ 'max_disparity_values': max_disparity_values,
+ 'disparity_values': [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 30, 40, 50, 60]}],
+ remappings=[('left_image_bi3d', 'rgb_left'),
+ ('right_image_bi3d', 'rgb_right')])
+
+ pointcloud_node = ComposableNode(
+ package='isaac_ros_stereo_image_proc',
+ plugin='nvidia::isaac_ros::stereo_image_proc::PointCloudNode',
+ parameters=[{
+ 'use_color': True,
+ 'unit_scaling': 1.0
+ }],
+ remappings=[('left/image_rect_color', 'rgb_left'),
+ ('left/camera_info', 'camera_info_left'),
+ ('right/camera_info', 'camera_info_right'),
+ ('disparity', 'bi3d_node/bi3d_output')])
+
+ container = ComposableNodeContainer(
+ name='bi3d_container',
+ namespace='bi3d',
+ package='rclcpp_components',
+ executable='component_container_mt',
+ composable_node_descriptions=[bi3d_node, pointcloud_node],
+ output='screen'
+ )
+
+ rviz_config_path = os.path.join(get_package_share_directory(
+ 'isaac_ros_bi3d'), 'config', 'isaac_ros_bi3d_isaac_sim.rviz')
+
+ rviz_node = Node(
+ package='rviz2',
+ executable='rviz2',
+ arguments=['-d', rviz_config_path],
+ output='screen')
+
+ final_launch_description = launch_args + [container, rviz_node]
+ return (launch.LaunchDescription(final_launch_description))
diff --git a/isaac_ros_bi3d/launch/isaac_ros_bi3d_realsense.launch.py b/isaac_ros_bi3d/launch/isaac_ros_bi3d_realsense.launch.py
new file mode 100644
index 0000000..6489de9
--- /dev/null
+++ b/isaac_ros_bi3d/launch/isaac_ros_bi3d_realsense.launch.py
@@ -0,0 +1,131 @@
+# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES
+# Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+
+import os
+
+from ament_index_python.packages import get_package_share_directory
+
+import launch
+from launch.actions import DeclareLaunchArgument
+from launch.substitutions import LaunchConfiguration
+from launch_ros.actions import ComposableNodeContainer
+from launch_ros.descriptions import ComposableNode
+
+
+def generate_launch_description():
+ launch_args = [
+ DeclareLaunchArgument(
+ 'featnet_engine_file_path',
+ default_value='',
+ description='The absolute path to the Bi3D Featnet TensorRT engine plan'),
+ DeclareLaunchArgument(
+ 'segnet_engine_file_path',
+ default_value='',
+ description='The absolute path to the Bi3D Segnet TensorRT engine plan'),
+ DeclareLaunchArgument(
+ 'max_disparity_values',
+ default_value='64',
+ description='The maximum number of disparity values given for Bi3D inference'),
+ ]
+
+ # Bi3DNode parameters
+ featnet_engine_file_path = LaunchConfiguration('featnet_engine_file_path')
+ segnet_engine_file_path = LaunchConfiguration('segnet_engine_file_path')
+ max_disparity_values = LaunchConfiguration('max_disparity_values')
+
+ bi3d_node = ComposableNode(
+ name='bi3d_node',
+ package='isaac_ros_bi3d',
+ plugin='nvidia::isaac_ros::bi3d::Bi3DNode',
+ parameters=[{
+ 'featnet_engine_file_path': featnet_engine_file_path,
+ 'segnet_engine_file_path': segnet_engine_file_path,
+ 'max_disparity_values': max_disparity_values}],
+ remappings=[
+ ('left_image_bi3d', 'infra1/image_rect_raw'),
+ ('right_image_bi3d', 'infra2/image_rect_raw')])
+
+ image_format_converter_node_left = ComposableNode(
+ package='isaac_ros_image_proc',
+ plugin='nvidia::isaac_ros::image_proc::ImageFormatConverterNode',
+ name='image_format_node_left',
+ parameters=[{
+ 'encoding_desired': 'rgb8',
+ }],
+ remappings=[
+ ('image_raw', 'infra1/image_rect_raw_mono'),
+ ('image', 'infra1/image_rect_raw')]
+ )
+
+ image_format_converter_node_right = ComposableNode(
+ package='isaac_ros_image_proc',
+ plugin='nvidia::isaac_ros::image_proc::ImageFormatConverterNode',
+ name='image_format_node_right',
+ parameters=[{
+ 'encoding_desired': 'rgb8',
+ }],
+ remappings=[
+ ('image_raw', 'infra2/image_rect_raw_mono'),
+ ('image', 'infra2/image_rect_raw')]
+ )
+
+ pointcloud_node = ComposableNode(
+ package='isaac_ros_stereo_image_proc',
+ plugin='nvidia::isaac_ros::stereo_image_proc::PointCloudNode',
+ parameters=[{
+ 'use_color': True,
+ 'unit_scaling': 1.0
+ }],
+ remappings=[('left/image_rect_color', 'infra1/image_rect_raw'),
+ ('left/camera_info', 'infra1/camera_info'),
+ ('right/camera_info', 'infra2/camera_info')]
+ )
+
+ # RealSense
+ realsense_config_file_path = os.path.join(
+ get_package_share_directory('isaac_ros_bi3d'),
+ 'config', 'realsense.yaml'
+ )
+
+ realsense_node = ComposableNode(
+ package='realsense2_camera',
+ plugin='realsense2_camera::RealSenseNodeFactory',
+ parameters=[realsense_config_file_path],
+ remappings=[
+ ('infra1/image_rect_raw', 'infra1/image_rect_raw_mono'),
+ ('infra2/image_rect_raw', 'infra2/image_rect_raw_mono')
+ ]
+ )
+
+ container = ComposableNodeContainer(
+ name='bi3d_container',
+ namespace='bi3d',
+ package='rclcpp_components',
+ executable='component_container_mt',
+ composable_node_descriptions=[bi3d_node,
+ image_format_converter_node_left,
+ image_format_converter_node_right,
+ pointcloud_node,
+ realsense_node],
+ output='screen',
+ remappings=[
+ ('left_image_bi3d', 'infra1/image_rect_raw'),
+ ('right_image_bi3d', 'infra2/image_rect_raw')]
+ )
+
+ final_launch_description = launch_args + [container]
+ return (launch.LaunchDescription(final_launch_description))
diff --git a/isaac_ros_bi3d/package.xml b/isaac_ros_bi3d/package.xml
index be45f4c..2a5ea86 100644
--- a/isaac_ros_bi3d/package.xml
+++ b/isaac_ros_bi3d/package.xml
@@ -1,23 +1,31 @@
isaac_ros_bi3d
- 0.11.0
+ 0.20.0
Bi3D inference network for ROS
Hemal Shah
- NVIDIA Isaac ROS Software License
+ Apache-2.0
https://developer.nvidia.com/isaac-ros-gems/
Peter Du
@@ -26,10 +34,9 @@ license agreement from NVIDIA CORPORATION is strictly prohibited.
rclcpp
rclcpp_components
isaac_ros_nitros
- isaac_ros_nitros_bi3d_inference_param_array_type
- isaac_ros_nitros_disparity_image_type
isaac_ros_nitros_image_type
- isaac_ros_stereo_image_proc
+ isaac_ros_nitros_disparity_image_type
+ isaac_ros_nitros_bi3d_inference_param_array_type
ament_lint_auto
ament_lint_common
diff --git a/isaac_ros_bi3d/scripts/isaac_ros_bi3d_visualizer.py b/isaac_ros_bi3d/scripts/isaac_ros_bi3d_visualizer.py
index d9c8791..61f656c 100755
--- a/isaac_ros_bi3d/scripts/isaac_ros_bi3d_visualizer.py
+++ b/isaac_ros_bi3d/scripts/isaac_ros_bi3d_visualizer.py
@@ -1,11 +1,21 @@
#!/usr/bin/env python3
-# Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
+
+# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES
+# Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
#
-# NVIDIA CORPORATION and its licensors retain all intellectual property
-# and proprietary rights in and to this software, related documentation
-# and any modifications thereto. Any use, reproduction, disclosure or
-# distribution of this software and related documentation without an express
-# license agreement from NVIDIA CORPORATION is strictly prohibited.
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
# This script plays a rosbag with prerecorded images and sends them to the Bi3DNode for inference,
# then either saves the output prediction to spcified location as an image, or displays
@@ -25,10 +35,14 @@ def get_args():
parser = argparse.ArgumentParser(description='Bi3D Node Visualizer')
parser.add_argument('--save_image', action='store_true', help='Save output or display it',
default=False)
+ parser.add_argument('--enable_rosbag', action='store_true', help='Save output or display it',
+ default=False)
parser.add_argument('--max_disparity_value', type=int,
help='Maximium disparity value given to Bi3D Node', default=18)
parser.add_argument('--result_path', default='/workspaces/isaac_ros-dev/src/bi3d_output.png',
help='Absolute path to save your result.')
+ parser.add_argument('--disparity_topic', default='bi3d_node/bi3d_output',
+ help='Topic name for disparity output.')
parser.add_argument('--rosbag_path',
default='/workspaces/isaac_ros-dev/src/'
'isaac_ros_proximity_segmentation/resources/'
@@ -46,8 +60,9 @@ def __init__(self, args):
self.encoding = 'rgb8'
self._bridge = cv_bridge.CvBridge()
self._bi3d_sub = self.create_subscription(
- DisparityImage, 'bi3d_node/bi3d_output', self.bi3d_callback, 10)
- subprocess.Popen('ros2 bag play --loop ' + self.args.rosbag_path, shell=True)
+ DisparityImage, self.args.disparity_topic, self.bi3d_callback, 10)
+ if self.args.enable_rosbag:
+ subprocess.Popen('ros2 bag play --loop ' + self.args.rosbag_path, shell=True)
self.image_scale = 255.0
def bi3d_callback(self, data):
diff --git a/isaac_ros_bi3d/src/bi3d_node.cpp b/isaac_ros_bi3d/src/bi3d_node.cpp
index 77665ee..a516ccf 100644
--- a/isaac_ros_bi3d/src/bi3d_node.cpp
+++ b/isaac_ros_bi3d/src/bi3d_node.cpp
@@ -1,29 +1,37 @@
-/**
- * Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
- *
- * NVIDIA CORPORATION and its licensors retain all intellectual property
- * and proprietary rights in and to this software, related documentation
- * and any modifications thereto. Any use, reproduction, disclosure or
- * distribution of this software and related documentation without an express
- * license agreement from NVIDIA CORPORATION is strictly prohibited.
- */
-
+// SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES
+// Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+// SPDX-License-Identifier: Apache-2.0
#include "isaac_ros_bi3d/bi3d_node.hpp"
#include
+#include
#include
#include
#include
#include
-#include \
- "isaac_ros_nitros_bi3d_inference_param_array_type/nitros_bi3d_inference_param_array.hpp"
+#include "isaac_ros_bi3d_interfaces/msg/bi3_d_inference_parameters_array.hpp"
+#include "isaac_ros_nitros_bi3d_inference_param_array_type/nitros_bi3d_inference_param_array.hpp"
#include "isaac_ros_nitros_disparity_image_type/nitros_disparity_image.hpp"
#include "isaac_ros_nitros_image_type/nitros_image.hpp"
#include "rclcpp/rclcpp.hpp"
#include "rclcpp_components/register_node_macro.hpp"
+#include "rcl_interfaces/msg/set_parameters_result.hpp"
namespace nvidia
{
@@ -34,25 +42,19 @@ namespace bi3d
using nvidia::gxf::optimizer::GraphIOGroupSupportedDataTypesInfoList;
-constexpr char INPUT_LEFT_IMAGE_COMPONENT_KEY[] = "sync/data_receiver_left";
constexpr char INPUT_IMAGE_DEFAULT_TENSOR_FORMAT[] = "nitros_image_rgb8";
-constexpr char INPUT_LEFT_IMAGE_TOPIC_NAME[] = "left_image_bi3d";
+constexpr char INPUT_LEFT_IMAGE_COMPONENT_KEY[] = "sync/data_receiver_left";
+constexpr char INPUT_LEFT_IMAGE_TOPIC_NAME[] = "left_image_bi3d";
constexpr char INPUT_RIGHT_IMAGE_COMPONENT_KEY[] = "sync/data_receiver_right";
constexpr char INPUT_RIGHT_IMAGE_TOPIC_NAME[] = "right_image_bi3d";
constexpr char INPUT_DISPARITY_COMPONENT_KEY[] = "disparity_roundrobin/data_receiver";
-constexpr char INPUT_DISPARITY_DEFAULT_TENSOR_FORMAT[] = "nitros_bi3d_inference_param_array";
-constexpr char INPUT_DISPARITY_TOPIC_NAME[] = "bi3d_disparity_values";
constexpr char OUTPUT_BI3D_KEY[] = "bi3d_output_vault/vault";
constexpr char OUTPUT_BI3D_DEFAULT_TENSOR_FORMAT[] = "nitros_disparity_image_32FC1";
constexpr char OUTPUT_BI3D_TOPIC_NAME[] = "bi3d_node/bi3d_output";
-constexpr char OUTPUT_DISPARITY_KEY[] = "disparity_values_output_vault/vault";
-constexpr char OUTPUT_DISPARITY_DEFAULT_TENSOR_FORMAT[] = "nitros_bi3d_inference_param_array";
-constexpr char OUTPUT_DISPARITY_TOPIC_NAME[] = "bi3d_node/bi3d_disparity_values";
-
constexpr char APP_YAML_FILENAME[] = "config/bi3d_node.yaml";
constexpr char PACKAGE_NAME[] = "isaac_ros_bi3d";
@@ -62,9 +64,9 @@ const std::vector> EXTENSIONS = {
{"isaac_ros_nitros", "gxf/std/libgxf_std.so"},
{"isaac_ros_nitros", "gxf/cuda/libgxf_cuda.so"},
{"isaac_ros_nitros", "gxf/multimedia/libgxf_multimedia.so"},
- {"isaac_ros_stereo_image_proc", "lib/libgxf_synchronization.so"},
- {"isaac_ros_bi3d", "cvcore_bi3d/libgxf_cvcore_bi3d.so"},
- {"isaac_ros_bi3d", "cvcore_bi3d/libgxf_bi3d_postprocessor.so"}
+ {"isaac_ros_nitros", "gxf/libgxf_synchronization.so"},
+ {"isaac_ros_nitros", "gxf/bi3d/libgxf_cvcore_bi3d.so"},
+ {"isaac_ros_nitros", "gxf/bi3d/libgxf_bi3d_postprocessor.so"}
};
const std::vector PRESET_EXTENSION_SPEC_NAMES = {
"isaac_ros_bi3d",
@@ -92,10 +94,7 @@ const nitros::NitrosPublisherSubscriberConfigMap CONFIG_MAP = {
},
{INPUT_DISPARITY_COMPONENT_KEY,
{
- .type = nitros::NitrosPublisherSubscriberType::NEGOTIATED,
- .qos = rclcpp::QoS(10),
- .compatible_data_format = INPUT_DISPARITY_DEFAULT_TENSOR_FORMAT,
- .topic_name = INPUT_DISPARITY_TOPIC_NAME,
+ .type = nitros::NitrosPublisherSubscriberType::NOOP
}
},
{OUTPUT_BI3D_KEY,
@@ -106,22 +105,13 @@ const nitros::NitrosPublisherSubscriberConfigMap CONFIG_MAP = {
.topic_name = OUTPUT_BI3D_TOPIC_NAME,
.frame_id_source_key = INPUT_LEFT_IMAGE_COMPONENT_KEY,
}
- },
- {OUTPUT_DISPARITY_KEY,
- {
- .type = nitros::NitrosPublisherSubscriberType::NEGOTIATED,
- .qos = rclcpp::QoS(10),
- .compatible_data_format = OUTPUT_DISPARITY_DEFAULT_TENSOR_FORMAT,
- .topic_name = OUTPUT_DISPARITY_TOPIC_NAME,
- .frame_id_source_key = INPUT_DISPARITY_COMPONENT_KEY,
- }
- },
+ }
};
#pragma GCC diagnostic pop
void Bi3DNode::Bi3DVideoBufferNameCallback(
const gxf_context_t context,
- nitros::NitrosTypeBase & msg, std::string name)
+ nitros::NitrosTypeBase & msg, std::string name, bool pub_disp_values)
{
gxf_tid_t video_buffer_tid;
auto result_tid = GxfComponentTypeId(
@@ -146,6 +136,32 @@ void Bi3DNode::Bi3DVideoBufferNameCallback(
// Set VideoBuffer name
GxfParameterSetStr(
context, video_buffer_cid, kInternalNameParameterKey, name.c_str());
+
+ if (pub_disp_values) {
+ using bi3d_ros_type = isaac_ros_bi3d_interfaces::msg::Bi3DInferenceParametersArray;
+ using bi3d_nitros_type = nitros::NitrosBi3DInferenceParamArray;
+
+ auto disp_values_ros_msg = std::make_unique();
+ get_parameter("disparity_values", disparity_values_);
+ disp_values_ros_msg->disparity_values = std::vector(
+ disparity_values_.begin(), disparity_values_.end());
+
+ bi3d_nitros_type disp_values_nitros_msg = bi3d_nitros_type();
+ rclcpp::TypeAdapter::convert_to_custom(
+ *disp_values_ros_msg, disp_values_nitros_msg);
+
+ auto disparity_sub = findNitrosSubscriber(
+ {"nvidia::gxf::DoubleBufferReceiver", "data_receiver", "disparity_roundrobin"});
+
+ if (disparity_sub == nullptr) {
+ std::string error_msg =
+ "[Bi3DNode] Could not find receiver of the disparity values";
+ RCLCPP_ERROR(get_logger(), error_msg.c_str());
+ throw std::runtime_error(error_msg.c_str());
+ }
+
+ disparity_sub->pushEntity(disp_values_nitros_msg.handle);
+ }
}
Bi3DNode::Bi3DNode(const rclcpp::NodeOptions & options)
@@ -180,7 +196,9 @@ Bi3DNode::Bi3DNode(const rclcpp::NodeOptions & options)
{"278"})),
// Bi3D extra parameters
- max_disparity_values_(declare_parameter("max_disparity_values", 64))
+ max_disparity_values_(declare_parameter("max_disparity_values", 64)),
+ disparity_values_(declare_parameter>(
+ "disparity_values", {10, 20, 30, 40, 50, 60}))
{
RCLCPP_DEBUG(get_logger(), "[Bi3DNode] Initializing Bi3DNode");
@@ -189,20 +207,77 @@ Bi3DNode::Bi3DNode(const rclcpp::NodeOptions & options)
} else if (segnet_engine_file_path_.empty()) {
throw std::invalid_argument("[Bi3DNode] Empty segnet_engine_file_path");
}
+
+ if (disparity_values_.size() > static_cast(max_disparity_values_)) {
+ throw std::invalid_argument(
+ "[Bi3DNode] Invalid disparity values: "
+ "the number of disparity values (" +
+ std::to_string(disparity_values_.size()) + ") cannot exceed the maximum "
+ "(max_disparity_values = " + std::to_string(max_disparity_values_) + ")");
+ }
+
// Add callback functions for setting input VideoBuffer to correct name
config_map_[INPUT_LEFT_IMAGE_COMPONENT_KEY].callback =
std::bind(
&Bi3DNode::Bi3DVideoBufferNameCallback, this,
- std::placeholders::_1, std::placeholders::_2, "left_image");
+ std::placeholders::_1, std::placeholders::_2, "left_image", true);
config_map_[INPUT_RIGHT_IMAGE_COMPONENT_KEY].callback =
std::bind(
&Bi3DNode::Bi3DVideoBufferNameCallback, this,
- std::placeholders::_1, std::placeholders::_2, "right_image");
+ std::placeholders::_1, std::placeholders::_2, "right_image", false);
registerSupportedType();
registerSupportedType();
registerSupportedType();
+ // This callback will get triggered when there is an attempt to change the parameter
+ auto param_change_callback =
+ [this](std::vector parameters, int64_t max_disparity_values)
+ {
+ auto result = rcl_interfaces::msg::SetParametersResult();
+ result.successful = true;
+ for (auto parameter : parameters) {
+ const rclcpp::ParameterType parameter_type = parameter.get_type();
+ const std::string param_name = parameter.get_name();
+
+ if (rclcpp::ParameterType::PARAMETER_INTEGER_ARRAY == parameter_type &&
+ param_name == "disparity_values")
+ {
+ if (parameter.as_integer_array().size() > static_cast(max_disparity_values)) {
+ RCLCPP_ERROR(
+ this->get_logger(),
+ "[Bi3DNode] Failed to set parameter %s at runtime: "
+ "the number of disparity values (%s) exceeds the configured maximum (%ld)",
+ parameter.get_name().c_str(),
+ parameter.value_to_string().c_str(),
+ max_disparity_values
+ );
+ result.reason = "The number of disparity values exceeds the configured maximum";
+ result.successful = false;
+ } else {
+ RCLCPP_INFO(
+ this->get_logger(),
+ "[Bi3DNode] Parameter '%s' has changed and is now: %s",
+ parameter.get_name().c_str(),
+ parameter.value_to_string().c_str()
+ );
+ result.successful &= true;
+ }
+ } else {
+ RCLCPP_WARN(
+ this->get_logger(),
+ "[Bi3DNode] Changing value for %s parameter is not allowed during runtime",
+ parameter.get_name().c_str()
+ );
+ result.reason = "Changing value for this parameter is not allowed";
+ result.successful = false;
+ }
+ }
+ return result;
+ };
+ on_set_param_cb_handle_ = this->add_on_set_parameters_callback(
+ std::bind(param_change_callback, std::placeholders::_1, max_disparity_values_));
+
startNitrosNode();
}
@@ -238,6 +313,12 @@ void Bi3DNode::postLoadGraphCallback()
getNitrosContext().setParameter1DStrVector(
"bi3d_dla1", "nvidia::cvcore::Bi3D", "segnet_output_layers_name", segnet_output_layers_name_);
+ // Set max allowed number of disparity values
+ getNitrosContext().setParameterUInt64(
+ "bi3d_dla0", "nvidia::cvcore::Bi3D", "max_disparity_values", max_disparity_values_);
+ getNitrosContext().setParameterUInt64(
+ "bi3d_dla1", "nvidia::cvcore::Bi3D", "max_disparity_values", max_disparity_values_);
+
// Set Bi3D block memory size depending on maximum number of output disparities
getNitrosContext().setParameterUInt64(
"bi3d_dla0", "nvidia::gxf::BlockMemoryPool", "block_size",
diff --git a/isaac_ros_bi3d/test/isaac_ros_bi3d_test.py b/isaac_ros_bi3d/test/isaac_ros_bi3d_test.py
index edba713..7d83a40 100644
--- a/isaac_ros_bi3d/test/isaac_ros_bi3d_test.py
+++ b/isaac_ros_bi3d/test/isaac_ros_bi3d_test.py
@@ -1,16 +1,24 @@
-# Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
+# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES
+# Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
-# NVIDIA CORPORATION and its licensors retain all intellectual property
-# and proprietary rights in and to this software, related documentation
-# and any modifications thereto. Any use, reproduction, disclosure or
-# distribution of this software and related documentation without an express
-# license agreement from NVIDIA CORPORATION is strictly prohibited.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
import os
import subprocess
import time
-from isaac_ros_bi3d_interfaces.msg import Bi3DInferenceParametersArray
from isaac_ros_test import IsaacROSBaseTest
from launch_ros.actions import ComposableNodeContainer
@@ -75,7 +83,8 @@ def generate_test_description():
'segnet_engine_file_path': segnet_engine_file_path,
'featnet_output_layers_name': ['97'],
'segnet_output_layers_name': ['294'],
- 'max_disparity_values': 1}]
+ 'max_disparity_values': 1,
+ 'disparity_values': [18]}]
)
container = ComposableNodeContainer(
@@ -109,11 +118,6 @@ def _create_image(self, name):
image.header.frame_id = name
return image
- def _create_disparity_value_array(self):
- disp_vals = Bi3DInferenceParametersArray()
- disp_vals.disparity_values = [18]
- return disp_vals
-
def test_image_bi3d(self):
end_time = time.time() + self.TIMEOUT
while time.time() < end_time:
@@ -129,8 +133,8 @@ def test_image_bi3d(self):
received_messages = {}
- self.generate_namespace_lookup(['left_image_bi3d', 'right_image_bi3d',
- 'bi3d_disparity_values', 'bi3d_node/bi3d_output'])
+ self.generate_namespace_lookup(
+ ['left_image_bi3d', 'right_image_bi3d', 'bi3d_node/bi3d_output'])
subs = self.create_logging_subscribers(
[('bi3d_node/bi3d_output', DisparityImage)], received_messages)
@@ -141,15 +145,10 @@ def test_image_bi3d(self):
image_right_pub = self.node.create_publisher(
Image, self.namespaces['right_image_bi3d'], self.DEFAULT_QOS
)
- disparity_values_pub = self.node.create_publisher(
- Bi3DInferenceParametersArray, self.namespaces['bi3d_disparity_values'],
- self.DEFAULT_QOS
- )
try:
left_image = self._create_image('left_image')
right_image = self._create_image('right_image')
- disparity_values = self._create_disparity_value_array()
end_time = time.time() + self.TIMEOUT
done = False
@@ -157,7 +156,6 @@ def test_image_bi3d(self):
while time.time() < end_time:
image_left_pub.publish(left_image)
image_right_pub.publish(right_image)
- disparity_values_pub.publish(disparity_values)
rclpy.spin_once(self.node, timeout_sec=0.1)
diff --git a/isaac_ros_bi3d_freespace/CMakeLists.txt b/isaac_ros_bi3d_freespace/CMakeLists.txt
new file mode 100644
index 0000000..7d632ba
--- /dev/null
+++ b/isaac_ros_bi3d_freespace/CMakeLists.txt
@@ -0,0 +1,76 @@
+# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES
+# Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+
+cmake_minimum_required(VERSION 3.8)
+project(isaac_ros_bi3d_freespace)
+
+# Default to C++17
+if(NOT CMAKE_CXX_STANDARD)
+ set(CMAKE_CXX_STANDARD 17)
+endif()
+
+if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ add_compile_options(-Wall -Wextra -Wpedantic)
+endif()
+
+# Default to Release build
+if(NOT CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL "")
+ set(CMAKE_BUILD_TYPE "Release" CACHE STRING "" FORCE)
+endif()
+
+message(STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
+
+execute_process(COMMAND uname -m COMMAND tr -d '\n' OUTPUT_VARIABLE ARCHITECTURE)
+message(STATUS "Architecture: ${ARCHITECTURE}")
+
+find_package(ament_cmake_auto REQUIRED)
+ament_auto_find_build_dependencies()
+
+# freespace_segmentation_node
+ament_auto_add_library(freespace_segmentation_node SHARED src/freespace_segmentation_node.cpp)
+target_compile_definitions(freespace_segmentation_node
+ PRIVATE "COMPOSITION_BUILDING_DLL"
+)
+rclcpp_components_register_nodes(freespace_segmentation_node
+ "nvidia::isaac_ros::bi3d_freespace::FreespaceSegmentationNode")
+set(node_plugins "${node_plugins}nvidia::isaac_ros::bi3d_freespace::FreespaceSegmentationNode;$\n")
+
+# Install config directory
+install(
+ DIRECTORY config
+ DESTINATION share/${PROJECT_NAME}
+)
+
+install(TARGETS freespace_segmentation_node
+ ARCHIVE DESTINATION lib
+ LIBRARY DESTINATION lib
+ RUNTIME DESTINATION bin
+)
+
+if(BUILD_TESTING)
+ find_package(ament_lint_auto REQUIRED)
+
+ # Ignore copyright notices since we use custom NVIDIA Isaac ROS Software License
+ set(ament_cmake_copyright_FOUND TRUE)
+
+ ament_lint_auto_find_test_dependencies()
+
+ find_package(launch_testing_ament_cmake REQUIRED)
+ add_launch_test(test/isaac_ros_freespace_segmentation_pol.py TIMEOUT "1000")
+endif()
+
+ament_auto_package(INSTALL_TO_SHARE launch)
diff --git a/isaac_ros_bi3d_freespace/config/freespace_segmentation_node.yaml b/isaac_ros_bi3d_freespace/config/freespace_segmentation_node.yaml
new file mode 100644
index 0000000..ed49e53
--- /dev/null
+++ b/isaac_ros_bi3d_freespace/config/freespace_segmentation_node.yaml
@@ -0,0 +1,84 @@
+%YAML 1.2
+# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES
+# Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+---
+name: freespace_segmentation
+components:
+- name: mask_in
+ type: nvidia::gxf::DoubleBufferReceiver
+ parameters:
+ capacity: 12
+ policy: 0
+- name: occupancy_grid_out
+ type: nvidia::gxf::DoubleBufferTransmitter
+ parameters:
+ capacity: 12
+ policy: 0
+- name: allocator
+ type: nvidia::gxf::UnboundedAllocator
+- name: occupancy_grid_projector
+ type: nvidia::isaac_ros::freespace_segmentation::OccupancyGridProjector
+ parameters:
+ mask_receiver: mask_in
+ output_transmitter: occupancy_grid_out
+ allocator: allocator
+ projection_transform: []
+ intrinsics: []
+ grid_height: 10
+ grid_width: 10
+ grid_resolution: 0.01
+- type: nvidia::gxf::MessageAvailableSchedulingTerm
+ parameters:
+ receiver: mask_in
+ min_size: 1
+- type: nvidia::gxf::DownstreamReceptiveSchedulingTerm
+ parameters:
+ transmitter: occupancy_grid_out
+ min_size: 1
+---
+name: vault
+components:
+- name: signal
+ type: nvidia::gxf::DoubleBufferReceiver
+ parameters:
+ capacity: 1
+ policy: 0
+- type: nvidia::gxf::MessageAvailableSchedulingTerm
+ parameters:
+ receiver: signal
+ min_size: 1
+- name: vault
+ type: nvidia::gxf::Vault
+ parameters:
+ source: signal
+ max_waiting_count: 1
+ drop_waiting: false
+---
+components:
+- name: edge0
+ type: nvidia::gxf::Connection
+ parameters:
+ source: freespace_segmentation/occupancy_grid_out
+ target: vault/signal
+---
+components:
+- type: nvidia::gxf::GreedyScheduler
+ parameters:
+ clock: clock
+ stop_on_deadlock: false
+- name: clock
+ type: nvidia::gxf::RealtimeClock
diff --git a/isaac_ros_bi3d_freespace/config/isaac_ros_bi3d_freespace_isaac_sim.rviz b/isaac_ros_bi3d_freespace/config/isaac_ros_bi3d_freespace_isaac_sim.rviz
new file mode 100644
index 0000000..893c355
--- /dev/null
+++ b/isaac_ros_bi3d_freespace/config/isaac_ros_bi3d_freespace_isaac_sim.rviz
@@ -0,0 +1,212 @@
+Panels:
+ - Class: rviz_common/Displays
+ Help Height: 78
+ Name: Displays
+ Property Tree Widget:
+ Expanded:
+ - /Global Options1
+ - /Status1
+ - /Grid1
+ Splitter Ratio: 0.5
+ Tree Height: 1042
+ - Class: rviz_common/Selection
+ Name: Selection
+ - Class: rviz_common/Tool Properties
+ Expanded:
+ - /2D Goal Pose1
+ - /Publish Point1
+ Name: Tool Properties
+ Splitter Ratio: 0.5886790156364441
+ - Class: rviz_common/Views
+ Expanded:
+ - /Current View1
+ Name: Views
+ Splitter Ratio: 0.5
+ - Class: rviz_common/Time
+ Experimental: false
+ Name: Time
+ SyncMode: 0
+ SyncSource: ""
+Visualization Manager:
+ Class: ""
+ Displays:
+ - Alpha: 0.5
+ Cell Size: 1
+ Class: rviz_default_plugins/Grid
+ Color: 160; 160; 164
+ Enabled: true
+ Line Style:
+ Line Width: 0.029999999329447746
+ Value: Lines
+ Name: Grid
+ Normal Cell Count: 0
+ Offset:
+ X: 0
+ Y: 0
+ Z: 0
+ Plane: XY
+ Plane Cell Count: 200
+ Reference Frame:
+ Value: true
+ - Class: rviz_default_plugins/TF
+ Enabled: true
+ Frame Timeout: 15
+ Frames:
+ All Enabled: true
+ base_link:
+ Value: true
+ carter_camera_stereo_left:
+ Value: true
+ carter_camera_stereo_right:
+ Value: true
+ carter_lidar:
+ Value: true
+ chassis_link:
+ Value: true
+ com_offset:
+ Value: true
+ imu:
+ Value: true
+ left_wheel_link:
+ Value: true
+ odom:
+ Value: true
+ rear_pivot_link:
+ Value: true
+ rear_wheel_link:
+ Value: true
+ right_wheel_link:
+ Value: true
+ Marker Scale: 1
+ Name: TF
+ Show Arrows: true
+ Show Axes: true
+ Show Names: false
+ Tree:
+ odom:
+ base_link:
+ chassis_link:
+ carter_camera_stereo_left:
+ {}
+ carter_camera_stereo_right:
+ {}
+ carter_lidar:
+ {}
+ com_offset:
+ {}
+ imu:
+ {}
+ left_wheel_link:
+ {}
+ rear_pivot_link:
+ rear_wheel_link:
+ {}
+ right_wheel_link:
+ {}
+ Update Interval: 0
+ Value: true
+ - Alpha: 0.699999988079071
+ Class: rviz_default_plugins/Map
+ Color Scheme: map
+ Draw Behind: false
+ Enabled: true
+ Name: Map
+ Topic:
+ Depth: 5
+ Durability Policy: Volatile
+ Filter size: 10
+ History Policy: Keep Last
+ Reliability Policy: Reliable
+ Value: /freespace_segmentation/occupancy_grid
+ Update Topic:
+ Depth: 5
+ Durability Policy: Volatile
+ History Policy: Keep Last
+ Reliability Policy: Reliable
+ Value: /freespace_segmentation/occupancy_grid_updates
+ Use Timestamp: false
+ Value: true
+ Enabled: true
+ Global Options:
+ Background Color: 48; 48; 48
+ Fixed Frame: base_link
+ Frame Rate: 30
+ Name: root
+ Tools:
+ - Class: rviz_default_plugins/Interact
+ Hide Inactive Objects: true
+ - Class: rviz_default_plugins/MoveCamera
+ - Class: rviz_default_plugins/Select
+ - Class: rviz_default_plugins/FocusCamera
+ - Class: rviz_default_plugins/Measure
+ Line color: 128; 128; 0
+ - Class: rviz_default_plugins/SetInitialPose
+ Covariance x: 0.25
+ Covariance y: 0.25
+ Covariance yaw: 0.06853891909122467
+ Topic:
+ Depth: 5
+ Durability Policy: Volatile
+ History Policy: Keep Last
+ Reliability Policy: Reliable
+ Value: /initialpose
+ - Class: rviz_default_plugins/SetGoal
+ Topic:
+ Depth: 5
+ Durability Policy: Volatile
+ History Policy: Keep Last
+ Reliability Policy: Reliable
+ Value: /goal_pose
+ - Class: rviz_default_plugins/PublishPoint
+ Single click: true
+ Topic:
+ Depth: 5
+ Durability Policy: Volatile
+ History Policy: Keep Last
+ Reliability Policy: Reliable
+ Value: /clicked_point
+ Transformation:
+ Current:
+ Class: rviz_default_plugins/TF
+ Value: true
+ Views:
+ Current:
+ Class: rviz_default_plugins/Orbit
+ Distance: 32.01762008666992
+ Enable Stereo Rendering:
+ Stereo Eye Separation: 0.05999999865889549
+ Stereo Focal Distance: 1
+ Swap Stereo Eyes: false
+ Value: false
+ Focal Point:
+ X: 0.7114542126655579
+ Y: -0.37252914905548096
+ Z: 0
+ Focal Shape Fixed Size: true
+ Focal Shape Size: 0.05000000074505806
+ Invert Z Axis: false
+ Name: Current View
+ Near Clip Distance: 0.009999999776482582
+ Pitch: 0.7647965550422668
+ Target Frame:
+ Value: Orbit (rviz_default_plugins)
+ Yaw: 4.062389373779297
+ Saved: ~
+Window Geometry:
+ Displays:
+ collapsed: false
+ Height: 1333
+ Hide Left Dock: false
+ Hide Right Dock: false
+ QMainWindow State: 000000ff00000000fd0000000400000000000001560000049bfc0200000008fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005c00fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000003b0000049b000000c700fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261000000010000010f0000049bfc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073010000003b0000049b000000a000fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000006b80000003efc0100000002fb0000000800540069006d00650100000000000006b80000024400fffffffb0000000800540069006d00650100000000000004500000000000000000000004470000049b00000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
+ Selection:
+ collapsed: false
+ Time:
+ collapsed: false
+ Tool Properties:
+ collapsed: false
+ Views:
+ collapsed: false
+ Width: 1720
+ X: 1720
+ Y: 0
diff --git a/isaac_ros_bi3d_freespace/include/isaac_ros_bi3d_freespace/freespace_segmentation_node.hpp b/isaac_ros_bi3d_freespace/include/isaac_ros_bi3d_freespace/freespace_segmentation_node.hpp
new file mode 100644
index 0000000..3903477
--- /dev/null
+++ b/isaac_ros_bi3d_freespace/include/isaac_ros_bi3d_freespace/freespace_segmentation_node.hpp
@@ -0,0 +1,70 @@
+// SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES
+// Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+// SPDX-License-Identifier: Apache-2.0
+
+
+#ifndef ISAAC_ROS_BI3D_FREESPACE__FREESPACE_SEGMENTATION_NODE_HPP_
+#define ISAAC_ROS_BI3D_FREESPACE__FREESPACE_SEGMENTATION_NODE_HPP_
+
+#include
+#include
+#include
+#include
+#include
+
+#include "rclcpp/rclcpp.hpp"
+#include "isaac_ros_nitros/nitros_node.hpp"
+
+#include "tf2_ros/transform_listener.h"
+#include "tf2_ros/buffer.h"
+
+namespace nvidia
+{
+namespace isaac_ros
+{
+namespace bi3d_freespace
+{
+
+class FreespaceSegmentationNode : public nitros::NitrosNode
+{
+public:
+ explicit FreespaceSegmentationNode(const rclcpp::NodeOptions &);
+ ~FreespaceSegmentationNode();
+
+ void postLoadGraphCallback() override;
+
+private:
+ std::unique_ptr tf_buffer_;
+ std::shared_ptr transform_listener_;
+
+ std::string base_link_frame_;
+ std::string camera_frame_;
+ std::vector projection_transform_param_;
+
+ double f_x_{};
+ double f_y_{};
+ std::vector intrinsics_param_;
+
+ int grid_height_;
+ int grid_width_;
+ double grid_resolution_;
+};
+
+} // namespace bi3d_freespace
+} // namespace isaac_ros
+} // namespace nvidia
+
+#endif // ISAAC_ROS_BI3D_FREESPACE__FREESPACE_SEGMENTATION_NODE_HPP_
diff --git a/isaac_ros_bi3d_freespace/launch/isaac_ros_bi3d_freespace.launch.py b/isaac_ros_bi3d_freespace/launch/isaac_ros_bi3d_freespace.launch.py
new file mode 100644
index 0000000..cf9cbfc
--- /dev/null
+++ b/isaac_ros_bi3d_freespace/launch/isaac_ros_bi3d_freespace.launch.py
@@ -0,0 +1,135 @@
+# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES
+# Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+
+import launch
+from launch.actions import DeclareLaunchArgument, ExecuteProcess
+from launch.substitutions import LaunchConfiguration
+from launch_ros.actions import ComposableNodeContainer
+from launch_ros.descriptions import ComposableNode
+
+
+def generate_launch_description():
+ launch_args = [
+ DeclareLaunchArgument(
+ 'featnet_engine_file_path',
+ default_value='',
+ description='The absolute path to the Bi3D Featnet TensorRT engine plan'),
+ DeclareLaunchArgument(
+ 'segnet_engine_file_path',
+ default_value='',
+ description='The absolute path to the Bi3D Segnet TensorRT engine plan'),
+ DeclareLaunchArgument(
+ 'rosbag_path',
+ default_value='src/isaac_ros_proximity_segmentation/resources/rosbags/bi3dnode_rosbag',
+ description='Path to the rosbag file'),
+ DeclareLaunchArgument(
+ 'max_disparity_values',
+ default_value='64',
+ description='The maximum number of disparity values given for Bi3D inference'),
+ DeclareLaunchArgument(
+ 'base_link_frame',
+ default_value='base_link',
+ description='The name of the tf2 frame corresponding to the origin of the robot base'),
+ DeclareLaunchArgument(
+ 'camera_frame',
+ default_value='carter_camera_stereo_left',
+ description='The name of the tf2 frame corresponding to the camera center'),
+ DeclareLaunchArgument(
+ 'f_x',
+ default_value='732.999267578125',
+ description='The number of pixels per distance unit in the x dimension'),
+ DeclareLaunchArgument(
+ 'f_y',
+ default_value='734.1167602539062',
+ description='The number of pixels per distance unit in the y dimension'),
+ DeclareLaunchArgument(
+ 'grid_height',
+ default_value='2000',
+ description='The desired height of the occupancy grid, in cells'),
+ DeclareLaunchArgument(
+ 'grid_width',
+ default_value='2000',
+ description='The desired width of the occupancy grid, in cells'),
+ DeclareLaunchArgument(
+ 'grid_resolution',
+ default_value='0.01',
+ description='The desired resolution of the occupancy grid, in m/cell'),
+ ]
+
+ rosbag_path = LaunchConfiguration('rosbag_path')
+
+ # Bi3DNode parameters
+ featnet_engine_file_path = LaunchConfiguration('featnet_engine_file_path')
+ segnet_engine_file_path = LaunchConfiguration('segnet_engine_file_path')
+ max_disparity_values = LaunchConfiguration('max_disparity_values')
+
+ # FreespaceSegmentationNode parameters
+ base_link_frame = LaunchConfiguration('base_link_frame')
+ camera_frame = LaunchConfiguration('camera_frame')
+ f_x_ = LaunchConfiguration('f_x')
+ f_y_ = LaunchConfiguration('f_y')
+ grid_height = LaunchConfiguration('grid_height')
+ grid_width = LaunchConfiguration('grid_width')
+ grid_resolution = LaunchConfiguration('grid_resolution')
+
+ bi3d_node = ComposableNode(
+ name='bi3d_node',
+ package='isaac_ros_bi3d',
+ plugin='nvidia::isaac_ros::bi3d::Bi3DNode',
+ parameters=[{
+ 'featnet_engine_file_path': featnet_engine_file_path,
+ 'segnet_engine_file_path': segnet_engine_file_path,
+ 'max_disparity_values': max_disparity_values,
+ 'use_sim_time': True}],
+ remappings=[('bi3d_node/bi3d_output', 'bi3d_mask'),
+ ('left_image_bi3d', 'rgb_left'),
+ ('right_image_bi3d', 'rgb_right')]
+ )
+
+ freespace_segmentation_node = ComposableNode(
+ name='freespace_segmentation_node',
+ package='isaac_ros_bi3d_freespace',
+ plugin='nvidia::isaac_ros::bi3d_freespace::FreespaceSegmentationNode',
+ parameters=[{
+ 'base_link_frame': base_link_frame,
+ 'camera_frame': camera_frame,
+ 'f_x': f_x_,
+ 'f_y': f_y_,
+ 'grid_height': grid_height,
+ 'grid_width': grid_width,
+ 'grid_resolution': grid_resolution,
+ 'use_sim_time': True
+ }])
+
+ rosbag_play = ExecuteProcess(
+ cmd=['ros2', 'bag', 'play', '--loop', rosbag_path],
+ output='screen')
+
+ container = ComposableNodeContainer(
+ name='bi3d_freespace_container',
+ namespace='bi3d_freespace',
+ package='rclcpp_components',
+ executable='component_container_mt',
+ composable_node_descriptions=[
+ bi3d_node,
+ freespace_segmentation_node,
+ ],
+ output='screen'
+ )
+
+ final_launch_description = launch_args + [rosbag_play, container]
+ return (launch.LaunchDescription(final_launch_description))
diff --git a/isaac_ros_bi3d_freespace/launch/isaac_ros_bi3d_freespace_isaac_sim.launch.py b/isaac_ros_bi3d_freespace/launch/isaac_ros_bi3d_freespace_isaac_sim.launch.py
new file mode 100644
index 0000000..e9cff93
--- /dev/null
+++ b/isaac_ros_bi3d_freespace/launch/isaac_ros_bi3d_freespace_isaac_sim.launch.py
@@ -0,0 +1,147 @@
+# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES
+# Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+
+import os
+
+from ament_index_python.packages import get_package_share_directory
+import launch
+from launch.actions import DeclareLaunchArgument
+from launch.substitutions import LaunchConfiguration
+from launch_ros.actions import ComposableNodeContainer, Node
+from launch_ros.descriptions import ComposableNode
+
+
+def generate_launch_description():
+ launch_args = [
+ DeclareLaunchArgument(
+ 'featnet_engine_file_path',
+ default_value='',
+ description='The absolute path to the Bi3D Featnet TensorRT engine plan'),
+ DeclareLaunchArgument(
+ 'segnet_engine_file_path',
+ default_value='',
+ description='The absolute path to the Bi3D Segnet TensorRT engine plan'),
+ DeclareLaunchArgument(
+ 'max_disparity_values',
+ default_value='64',
+ description='The maximum number of disparity values given for Bi3D inference'),
+ DeclareLaunchArgument(
+ 'base_link_frame',
+ default_value='base_link',
+ description='The name of the tf2 frame corresponding to the origin of the robot base'),
+ DeclareLaunchArgument(
+ 'camera_frame',
+ default_value='carter_camera_stereo_left',
+ description='The name of the tf2 frame corresponding to the camera center'),
+
+ # f(mm) / sensor width (mm) = f(pixels) / image width(pixels)
+
+ DeclareLaunchArgument(
+ 'f_x',
+ default_value='1465.99853515625',
+ description='The number of pixels per distance unit in the x dimension'),
+ DeclareLaunchArgument(
+ 'f_y',
+ default_value='1468.2335205078125',
+ description='The number of pixels per distance unit in the y dimension'),
+ DeclareLaunchArgument(
+ 'grid_height',
+ default_value='2000',
+ description='The desired height of the occupancy grid, in cells'),
+ DeclareLaunchArgument(
+ 'grid_width',
+ default_value='2000',
+ description='The desired width of the occupancy grid, in cells'),
+ DeclareLaunchArgument(
+ 'grid_resolution',
+ default_value='0.01',
+ description='The desired resolution of the occupancy grid, in m/cell'),
+ ]
+
+ # Bi3DNode parameters
+ featnet_engine_file_path = LaunchConfiguration('featnet_engine_file_path')
+ segnet_engine_file_path = LaunchConfiguration('segnet_engine_file_path')
+ max_disparity_values = LaunchConfiguration('max_disparity_values')
+
+ # FreespaceSegmentationNode parameters
+ base_link_frame = LaunchConfiguration('base_link_frame')
+ camera_frame = LaunchConfiguration('camera_frame')
+ f_x_ = LaunchConfiguration('f_x')
+ f_y_ = LaunchConfiguration('f_y')
+ grid_height = LaunchConfiguration('grid_height')
+ grid_width = LaunchConfiguration('grid_width')
+ grid_resolution = LaunchConfiguration('grid_resolution')
+
+ bi3d_node = ComposableNode(
+ name='bi3d_node',
+ package='isaac_ros_bi3d',
+ plugin='nvidia::isaac_ros::bi3d::Bi3DNode',
+ parameters=[{
+ 'featnet_engine_file_path': featnet_engine_file_path,
+ 'segnet_engine_file_path': segnet_engine_file_path,
+ 'max_disparity_values': max_disparity_values,
+ 'disparity_values': [3, 6, 9, 12, 15, 18, 21, 24, 27, 30],
+ 'use_sim_time': True
+ }],
+ remappings=[('bi3d_node/bi3d_output', 'bi3d_mask'),
+ ('left_image_bi3d', 'rgb_left'),
+ ('right_image_bi3d', 'rgb_right')]
+ )
+
+ freespace_segmentation_node = ComposableNode(
+ name='freespace_segmentation_node',
+ package='isaac_ros_bi3d_freespace',
+ plugin='nvidia::isaac_ros::bi3d_freespace::FreespaceSegmentationNode',
+ parameters=[{
+ 'base_link_frame': base_link_frame,
+ 'camera_frame': camera_frame,
+ 'f_x': f_x_,
+ 'f_y': f_y_,
+ 'grid_height': grid_height,
+ 'grid_width': grid_width,
+ 'grid_resolution': grid_resolution,
+ 'use_sim_time': True
+ }])
+
+ container = ComposableNodeContainer(
+ name='bi3d_freespace_container',
+ namespace='bi3d_freespace',
+ package='rclcpp_components',
+ executable='component_container_mt',
+ composable_node_descriptions=[
+ bi3d_node,
+ freespace_segmentation_node
+ ],
+ output='screen',
+ arguments=['--ros-args', '--log-level', 'info',
+ '--log-level', 'color_format_convert:=info',
+ '--log-level', 'NitrosImage:=info',
+ '--log-level', 'NitrosNode:=info'
+ ],
+ )
+
+ rviz_config_path = os.path.join(get_package_share_directory(
+ 'isaac_ros_bi3d_freespace'), 'config', 'isaac_ros_bi3d_freespace_isaac_sim.rviz')
+
+ rviz_node = Node(
+ package='rviz2',
+ executable='rviz2',
+ arguments=['-d', rviz_config_path],
+ output='screen')
+
+ final_launch_description = launch_args + [container, rviz_node]
+ return (launch.LaunchDescription(final_launch_description))
diff --git a/isaac_ros_bi3d_freespace/launch/isaac_ros_bi3d_freespace_realsense.launch.py b/isaac_ros_bi3d_freespace/launch/isaac_ros_bi3d_freespace_realsense.launch.py
new file mode 100644
index 0000000..4eb84d5
--- /dev/null
+++ b/isaac_ros_bi3d_freespace/launch/isaac_ros_bi3d_freespace_realsense.launch.py
@@ -0,0 +1,188 @@
+# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES
+# Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+
+import os
+
+from ament_index_python.packages import get_package_share_directory
+
+import launch
+from launch.actions import DeclareLaunchArgument
+from launch.substitutions import LaunchConfiguration
+from launch_ros.actions import ComposableNodeContainer
+from launch_ros.descriptions import ComposableNode
+
+
+def generate_launch_description():
+ launch_args = [
+ DeclareLaunchArgument(
+ 'featnet_engine_file_path',
+ default_value='',
+ description='The absolute path to the Bi3D Featnet TensorRT engine plan'),
+ DeclareLaunchArgument(
+ 'segnet_engine_file_path',
+ default_value='',
+ description='The absolute path to the Bi3D Segnet TensorRT engine plan'),
+ DeclareLaunchArgument(
+ 'max_disparity_values',
+ default_value='64',
+ description='The maximum number of disparity values given for Bi3D inference'),
+ DeclareLaunchArgument(
+ 'base_link_frame',
+ default_value='base_link',
+ description='The name of the tf2 frame corresponding to the origin of the robot base'),
+ DeclareLaunchArgument(
+ 'camera_frame',
+ default_value='camera_infra1_optical_frame',
+ description='The name of the tf2 frame corresponding to the camera optical center'),
+ DeclareLaunchArgument(
+ 'f_x',
+ default_value='386.16015625',
+ description='The number of pixels per distance unit in the x dimension'),
+ DeclareLaunchArgument(
+ 'f_y',
+ default_value='386.16015625',
+ description='The number of pixels per distance unit in the y dimension'),
+ DeclareLaunchArgument(
+ 'grid_height',
+ default_value='1000',
+ description='The desired height of the occupancy grid, in cells'),
+ DeclareLaunchArgument(
+ 'grid_width',
+ default_value='1000',
+ description='The desired width of the occupancy grid, in cells'),
+ DeclareLaunchArgument(
+ 'grid_resolution',
+ default_value='0.01',
+ description='The desired resolution of the occupancy grid, in m/cell'),
+ ]
+
+ # Bi3DNode parameters
+ featnet_engine_file_path = LaunchConfiguration('featnet_engine_file_path')
+ segnet_engine_file_path = LaunchConfiguration('segnet_engine_file_path')
+ max_disparity_values = LaunchConfiguration('max_disparity_values')
+
+ # FreespaceSegmentationNode parameters
+ base_link_frame = LaunchConfiguration('base_link_frame')
+ camera_frame = LaunchConfiguration('camera_frame')
+ f_x = LaunchConfiguration('f_x')
+ f_y = LaunchConfiguration('f_y')
+ grid_height = LaunchConfiguration('grid_height')
+ grid_width = LaunchConfiguration('grid_width')
+ grid_resolution = LaunchConfiguration('grid_resolution')
+
+ bi3d_node = ComposableNode(
+ name='bi3d_node',
+ package='isaac_ros_bi3d',
+ plugin='nvidia::isaac_ros::bi3d::Bi3DNode',
+ parameters=[{
+ 'featnet_engine_file_path': featnet_engine_file_path,
+ 'segnet_engine_file_path': segnet_engine_file_path,
+ 'max_disparity_values': max_disparity_values}],
+ remappings=[
+ ('left_image_bi3d', 'infra1/image_rect_raw'),
+ ('right_image_bi3d', 'infra2/image_rect_raw'),
+ ('bi3d_node/bi3d_output', 'bi3d_mask')])
+
+ image_format_converter_node_left = ComposableNode(
+ package='isaac_ros_image_proc',
+ plugin='nvidia::isaac_ros::image_proc::ImageFormatConverterNode',
+ name='image_format_node_left',
+ parameters=[{
+ 'encoding_desired': 'rgb8',
+ }],
+ remappings=[
+ ('image_raw', 'infra1/image_rect_raw_mono'),
+ ('image', 'infra1/image_rect_raw')]
+ )
+
+ image_format_converter_node_right = ComposableNode(
+ package='isaac_ros_image_proc',
+ plugin='nvidia::isaac_ros::image_proc::ImageFormatConverterNode',
+ name='image_format_node_right',
+ parameters=[{
+ 'encoding_desired': 'rgb8',
+ }],
+ remappings=[
+ ('image_raw', 'infra2/image_rect_raw_mono'),
+ ('image', 'infra2/image_rect_raw')]
+ )
+
+ freespace_segmentation_node = ComposableNode(
+ name='freespace_segmentation_node',
+ package='isaac_ros_bi3d_freespace',
+ plugin='nvidia::isaac_ros::bi3d_freespace::FreespaceSegmentationNode',
+ parameters=[{
+ 'base_link_frame': base_link_frame,
+ 'camera_frame': camera_frame,
+ 'f_x': f_x,
+ 'f_y': f_y,
+ 'grid_height': grid_height,
+ 'grid_width': grid_width,
+ 'grid_resolution': grid_resolution,
+ }])
+
+ tf_publisher = ComposableNode(
+ name='static_transform_publisher',
+ package='tf2_ros',
+ plugin='tf2_ros::StaticTransformBroadcasterNode',
+ parameters=[{
+ 'frame_id': base_link_frame,
+ 'child_frame_id': 'camera_link',
+ 'translation.x': 0.0,
+ 'translation.y': 0.0,
+ 'translation.z': 0.1,
+ 'rotation.x': 0.0,
+ 'rotation.y': 0.0,
+ 'rotation.z': 0.0,
+ 'rotation.w': 1.0
+ }])
+
+ # RealSense
+ realsense_config_file_path = os.path.join(
+ get_package_share_directory('isaac_ros_bi3d'),
+ 'config', 'realsense.yaml'
+ )
+
+ realsense_node = ComposableNode(
+ package='realsense2_camera',
+ plugin='realsense2_camera::RealSenseNodeFactory',
+ parameters=[realsense_config_file_path],
+ remappings=[
+ ('infra1/image_rect_raw', 'infra1/image_rect_raw_mono'),
+ ('infra2/image_rect_raw', 'infra2/image_rect_raw_mono')
+ ]
+ )
+
+ container = ComposableNodeContainer(
+ name='bi3d_container',
+ namespace='bi3d',
+ package='rclcpp_components',
+ executable='component_container_mt',
+ composable_node_descriptions=[bi3d_node,
+ image_format_converter_node_left,
+ image_format_converter_node_right,
+ freespace_segmentation_node,
+ tf_publisher,
+ realsense_node],
+ output='screen',
+ remappings=[
+ ('left_image_bi3d', 'infra1/image_rect_raw'),
+ ('right_image_bi3d', 'infra2/image_rect_raw')]
+ )
+
+ final_launch_description = launch_args + [container]
+ return (launch.LaunchDescription(final_launch_description))
diff --git a/isaac_ros_bi3d_freespace/package.xml b/isaac_ros_bi3d_freespace/package.xml
new file mode 100644
index 0000000..7f7cb00
--- /dev/null
+++ b/isaac_ros_bi3d_freespace/package.xml
@@ -0,0 +1,49 @@
+
+
+
+
+
+
+ isaac_ros_bi3d_freespace
+ 0.20.0
+ Freespace segmentation using the Bi3D inference network for ROS
+
+ Hemal Shah
+ NVIDIA Isaac ROS Software License
+ https://developer.nvidia.com/isaac-ros-gems/
+ Jaiveer Singh
+
+ ament_cmake_auto
+
+ rclcpp
+ rclcpp_components
+ tf2
+ tf2_ros
+ isaac_ros_nitros
+ isaac_ros_nitros_disparity_image_type
+ isaac_ros_nitros_occupancy_grid_type
+
+ ament_lint_auto
+ ament_lint_common
+ isaac_ros_test
+
+
+ ament_cmake
+
+
diff --git a/isaac_ros_bi3d_freespace/src/freespace_segmentation_node.cpp b/isaac_ros_bi3d_freespace/src/freespace_segmentation_node.cpp
new file mode 100644
index 0000000..6e42721
--- /dev/null
+++ b/isaac_ros_bi3d_freespace/src/freespace_segmentation_node.cpp
@@ -0,0 +1,191 @@
+// SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES
+// Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+// SPDX-License-Identifier: Apache-2.0
+
+#include "isaac_ros_bi3d_freespace/freespace_segmentation_node.hpp"
+
+
+#include "isaac_ros_nitros_occupancy_grid_type/nitros_occupancy_grid.hpp"
+#include "isaac_ros_nitros_disparity_image_type/nitros_disparity_image.hpp"
+
+#include "rclcpp/rclcpp.hpp"
+#include "rclcpp_components/register_node_macro.hpp"
+
+namespace nvidia
+{
+namespace isaac_ros
+{
+namespace bi3d_freespace
+{
+
+using nvidia::gxf::optimizer::GraphIOGroupSupportedDataTypesInfoList;
+
+constexpr char INPUT_COMPONENT_KEY[] = "freespace_segmentation/mask_in";
+constexpr char INPUT_DEFAULT_TENSOR_FORMAT[] = "nitros_disparity_image_32FC1";
+constexpr char INPUT_TOPIC_NAME[] = "bi3d_mask";
+
+constexpr char OUTPUT_COMPONENT_KEY[] = "vault/vault";
+constexpr char OUTPUT_DEFAULT_TENSOR_FORMAT[] = "nitros_occupancy_grid";
+constexpr char OUTPUT_TOPIC_NAME[] = "freespace_segmentation/occupancy_grid";
+
+constexpr char APP_YAML_FILENAME[] = "config/freespace_segmentation_node.yaml";
+constexpr char PACKAGE_NAME[] = "isaac_ros_bi3d_freespace";
+
+const std::vector> EXTENSIONS = {
+ {"isaac_ros_nitros", "gxf/std/libgxf_std.so"},
+ {"isaac_ros_nitros", "gxf/cuda/libgxf_cuda.so"},
+ {"isaac_ros_nitros", "gxf/multimedia/libgxf_multimedia.so"},
+ {"isaac_ros_nitros", "gxf/libgxf_occupancy_grid_projector.so"},
+};
+const std::vector PRESET_EXTENSION_SPEC_NAMES = {
+ "isaac_ros_bi3d_freespace"
+};
+const std::vector EXTENSION_SPEC_FILENAMES = {};
+const std::vector GENERATOR_RULE_FILENAMES = {};
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wpedantic"
+const nitros::NitrosPublisherSubscriberConfigMap CONFIG_MAP = {
+ {INPUT_COMPONENT_KEY,
+ {
+ .type = nitros::NitrosPublisherSubscriberType::NEGOTIATED,
+ .qos = rclcpp::QoS(10),
+ .compatible_data_format = INPUT_DEFAULT_TENSOR_FORMAT,
+ .topic_name = INPUT_TOPIC_NAME,
+ }
+ },
+ {OUTPUT_COMPONENT_KEY,
+ {
+ .type = nitros::NitrosPublisherSubscriberType::NEGOTIATED,
+ .qos = rclcpp::QoS(10),
+ .compatible_data_format = OUTPUT_DEFAULT_TENSOR_FORMAT,
+ .topic_name = OUTPUT_TOPIC_NAME,
+ .frame_id_source_key = INPUT_COMPONENT_KEY,
+ }
+ },
+};
+#pragma GCC diagnostic pop
+
+FreespaceSegmentationNode::FreespaceSegmentationNode(const rclcpp::NodeOptions & options)
+: nitros::NitrosNode(
+ options,
+ APP_YAML_FILENAME,
+ CONFIG_MAP,
+ PRESET_EXTENSION_SPEC_NAMES,
+ EXTENSION_SPEC_FILENAMES,
+ GENERATOR_RULE_FILENAMES,
+ EXTENSIONS,
+ PACKAGE_NAME),
+ tf_buffer_{std::make_unique(this->get_clock())},
+ transform_listener_{std::make_shared(*tf_buffer_)},
+ base_link_frame_(declare_parameter("base_link_frame", "base_link")),
+ camera_frame_(declare_parameter("camera_frame", "camera")),
+ f_x_(declare_parameter("f_x", 0.0)),
+ f_y_(declare_parameter("f_y", 0.0)),
+ grid_height_(declare_parameter("grid_height", 100)),
+ grid_width_(declare_parameter("grid_width", 100)),
+ grid_resolution_(declare_parameter("grid_resolution", 0.01))
+{
+ RCLCPP_DEBUG(get_logger(), "[FreespaceSegmentationNode] Initializing FreespaceSegmentationNode");
+
+ config_map_[OUTPUT_COMPONENT_KEY].callback =
+ [this]([[maybe_unused]] const gxf_context_t context, nitros::NitrosTypeBase & msg) {
+ msg.frame_id = base_link_frame_;
+ };
+
+ registerSupportedType();
+ registerSupportedType();
+
+ RCLCPP_DEBUG(get_logger(), "[FreespaceSegmentationNode] Constructor");
+ if (f_x_ <= 0 || f_y_ <= 0) {
+ RCLCPP_ERROR(
+ get_logger(), "[FreespaceSegmentationNode] Set the focal length before running.");
+ throw std::invalid_argument(
+ "[FreespaceSegmentationNode] Invalid focal length "
+ "fx and fy should be valid focal lengths in pixels.");
+ }
+
+ startNitrosNode();
+}
+
+void FreespaceSegmentationNode::postLoadGraphCallback()
+{
+ RCLCPP_DEBUG(get_logger(), "[FreespaceSegmentationNode] postLoadGraphCallback().");
+
+ // Collect tf2 transform at initialization time
+ RCLCPP_INFO(this->get_logger(), "Waiting for tf2 transform...");
+
+ rclcpp::Rate rate{1};
+
+ bool transform_exists = false;
+ while (!transform_exists) {
+ if (!rclcpp::ok()) {
+ RCLCPP_ERROR(this->get_logger(), "Interrupted while waiting for the service. Exiting.");
+ return;
+ }
+ try {
+ geometry_msgs::msg::TransformStamped t = tf_buffer_->lookupTransform(
+ base_link_frame_, camera_frame_, this->now());
+
+ projection_transform_param_ = {
+ t.transform.translation.x,
+ t.transform.translation.y,
+ t.transform.translation.z,
+
+ t.transform.rotation.x,
+ t.transform.rotation.y,
+ t.transform.rotation.z,
+ t.transform.rotation.w,
+ };
+
+ transform_exists = true;
+ } catch (const tf2::TransformException & ex) {
+ RCLCPP_ERROR(
+ this->get_logger(), "Could not transform %s to %s: %s",
+ base_link_frame_.c_str(), camera_frame_.c_str(), ex.what());
+ }
+ rate.sleep();
+ }
+ RCLCPP_INFO(this->get_logger(), "Transform secured");
+
+ getNitrosContext().setParameter1DFloat64Vector(
+ "freespace_segmentation", "nvidia::isaac_ros::freespace_segmentation::OccupancyGridProjector",
+ "projection_transform",
+ projection_transform_param_);
+
+ intrinsics_param_ = {f_x_, f_y_};
+ getNitrosContext().setParameter1DFloat64Vector(
+ "freespace_segmentation", "nvidia::isaac_ros::freespace_segmentation::OccupancyGridProjector",
+ "intrinsics",
+ intrinsics_param_);
+
+ getNitrosContext().setParameterInt32(
+ "freespace_segmentation", "nvidia::isaac_ros::freespace_segmentation::OccupancyGridProjector",
+ "grid_height", grid_height_);
+ getNitrosContext().setParameterInt32(
+ "freespace_segmentation", "nvidia::isaac_ros::freespace_segmentation::OccupancyGridProjector",
+ "grid_width", grid_width_);
+ getNitrosContext().setParameterFloat64(
+ "freespace_segmentation", "nvidia::isaac_ros::freespace_segmentation::OccupancyGridProjector",
+ "grid_resolution", grid_resolution_);
+}
+
+FreespaceSegmentationNode::~FreespaceSegmentationNode() {}
+
+} // namespace bi3d_freespace
+} // namespace isaac_ros
+} // namespace nvidia
+
+RCLCPP_COMPONENTS_REGISTER_NODE(nvidia::isaac_ros::bi3d_freespace::FreespaceSegmentationNode)
diff --git a/isaac_ros_bi3d_freespace/test/isaac_ros_freespace_segmentation_pol.py b/isaac_ros_bi3d_freespace/test/isaac_ros_freespace_segmentation_pol.py
new file mode 100644
index 0000000..875989b
--- /dev/null
+++ b/isaac_ros_bi3d_freespace/test/isaac_ros_freespace_segmentation_pol.py
@@ -0,0 +1,159 @@
+# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES
+# Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
+
+import time
+
+from isaac_ros_test import IsaacROSBaseTest
+
+from launch_ros.actions import ComposableNodeContainer
+from launch_ros.descriptions import ComposableNode
+
+from nav_msgs.msg import OccupancyGrid
+import pytest
+import rclpy
+from stereo_msgs.msg import DisparityImage
+
+
+@pytest.mark.rostest
+def generate_test_description():
+ freespace_segmentation_node = ComposableNode(
+ name='freespace_segmentation',
+ package='isaac_ros_bi3d_freespace',
+ plugin='nvidia::isaac_ros::bi3d_freespace::FreespaceSegmentationNode',
+ namespace=IsaacROSFreespaceSegmentationTest.generate_namespace(),
+ parameters=[{
+ 'base_link_frame': 'base_link',
+ 'camera_frame': 'camera',
+ 'f_x': 2000.0,
+ 'f_y': 2000.0,
+ 'grid_width': 200,
+ 'grid_height': 100,
+ 'grid_resolution': 0.01
+ }]
+ )
+
+ tf_publisher = ComposableNode(
+ name='static_transform_publisher',
+ package='tf2_ros',
+ plugin='tf2_ros::StaticTransformBroadcasterNode',
+ parameters=[{
+ 'frame_id': 'base_link',
+ 'child_frame_id': 'camera',
+ 'translation.x': -0.3,
+ 'translation.y': 0.2,
+ 'translation.z': 0.5,
+ 'rotation.x': -0.12,
+ 'rotation.y': 0.98,
+ 'rotation.z': -0.17,
+ 'rotation.w': 0.02,
+ }]
+ )
+
+ container = ComposableNodeContainer(
+ name='freespace_segmentation_container',
+ namespace='',
+ package='rclcpp_components',
+ executable='component_container_mt',
+ composable_node_descriptions=[freespace_segmentation_node, tf_publisher],
+ output='screen',
+ arguments=['--ros-args', '--log-level', 'info']
+ )
+ return IsaacROSFreespaceSegmentationTest.generate_test_description([container])
+
+
+class IsaacROSFreespaceSegmentationTest(IsaacROSBaseTest):
+ IMAGE_HEIGHT = 576
+ IMAGE_WIDTH = 960
+ TIMEOUT = 1000
+ GXF_WAIT_SEC = 3
+
+ def _create_disparity_image(self, name):
+
+ disp_image = DisparityImage()
+ disp_image.image.height = self.IMAGE_HEIGHT
+ disp_image.image.width = self.IMAGE_WIDTH
+ disp_image.image.encoding = '32FC1'
+ disp_image.image.is_bigendian = False
+ disp_image.image.step = self.IMAGE_WIDTH * 4
+
+ """
+ Creates the following test pattern:
+
+ ### ###
+
+
+ #
+ #
+ ###################
+
+ """
+
+ data = []
+ for row in range(self.IMAGE_HEIGHT):
+ if row == 0:
+ data += [0] * self.IMAGE_WIDTH + [1] * self.IMAGE_WIDTH + \
+ [1] * self.IMAGE_WIDTH + [0] * self.IMAGE_WIDTH
+ elif row == 575:
+ data += [0] * self.IMAGE_WIDTH + [0] * self.IMAGE_WIDTH + \
+ [0] * self.IMAGE_WIDTH + [0] * self.IMAGE_WIDTH
+ elif row > 400:
+ data += [0] * 4 + [1] * (self.IMAGE_WIDTH - 1) * 4
+ else:
+ data += [1] * self.IMAGE_WIDTH * 4
+
+ disp_image.image.data = data
+
+ disp_image.header.frame_id = name
+ return disp_image
+
+ def test_pol(self):
+ time.sleep(self.GXF_WAIT_SEC)
+
+ received_messages = {}
+
+ self.generate_namespace_lookup(['bi3d_mask', 'freespace_segmentation/occupancy_grid'])
+
+ disparity_image_pub = self.node.create_publisher(
+ DisparityImage, self.namespaces['bi3d_mask'], self.DEFAULT_QOS
+ )
+
+ subs = self.create_logging_subscribers(
+ [('freespace_segmentation/occupancy_grid', OccupancyGrid)], received_messages)
+
+ try:
+ disparity_image = self._create_disparity_image('camera')
+
+ end_time = time.time() + self.TIMEOUT
+ done = False
+
+ while time.time() < end_time:
+ disparity_image_pub.publish(disparity_image)
+
+ rclpy.spin_once(self.node, timeout_sec=0.1)
+
+ if 'freespace_segmentation/occupancy_grid' in received_messages:
+ done = True
+ break
+ self.assertTrue(
+ done, "Didn't recieve output on freespace_segmentation/occupancy_grid topic")
+
+ occupancy_grid = received_messages['freespace_segmentation/occupancy_grid']
+ self.assertTrue(0 in occupancy_grid.data, 'No cells were marked as free!')
+
+ finally:
+ self.node.destroy_subscription(subs)
+ self.node.destroy_publisher(disparity_image_pub)
diff --git a/isaac_ros_nitros_bi3d_inference_param_array_type/CMakeLists.txt b/isaac_ros_nitros_bi3d_inference_param_array_type/CMakeLists.txt
index f62acd5..5f899a4 100644
--- a/isaac_ros_nitros_bi3d_inference_param_array_type/CMakeLists.txt
+++ b/isaac_ros_nitros_bi3d_inference_param_array_type/CMakeLists.txt
@@ -1,10 +1,19 @@
-# Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
+# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES
+# Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
-# NVIDIA CORPORATION and its licensors retain all intellectual property
-# and proprietary rights in and to this software, related documentation
-# and any modifications thereto. Any use, reproduction, disclosure or
-# distribution of this software and related documentation without an express
-# license agreement from NVIDIA CORPORATION is strictly prohibited.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
cmake_minimum_required(VERSION 3.8)
project(isaac_ros_nitros_bi3d_inference_param_array_type LANGUAGES C CXX)
@@ -77,10 +86,6 @@ if(BUILD_TESTING)
)
find_package(ament_lint_auto REQUIRED)
-
- # Ignore copyright notices since we use custom NVIDIA Isaac ROS Software License
- set(ament_cmake_copyright_FOUND TRUE)
-
ament_lint_auto_find_test_dependencies()
find_package(launch_testing_ament_cmake REQUIRED)
diff --git a/isaac_ros_nitros_bi3d_inference_param_array_type/include/isaac_ros_nitros_bi3d_inference_param_array_type/nitros_bi3d_inference_param_array.hpp b/isaac_ros_nitros_bi3d_inference_param_array_type/include/isaac_ros_nitros_bi3d_inference_param_array_type/nitros_bi3d_inference_param_array.hpp
index faa1d05..b6ff81b 100644
--- a/isaac_ros_nitros_bi3d_inference_param_array_type/include/isaac_ros_nitros_bi3d_inference_param_array_type/nitros_bi3d_inference_param_array.hpp
+++ b/isaac_ros_nitros_bi3d_inference_param_array_type/include/isaac_ros_nitros_bi3d_inference_param_array_type/nitros_bi3d_inference_param_array.hpp
@@ -1,12 +1,19 @@
-/**
- * Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
- *
- * NVIDIA CORPORATION and its licensors retain all intellectual property
- * and proprietary rights in and to this software, related documentation
- * and any modifications thereto. Any use, reproduction, disclosure or
- * distribution of this software and related documentation without an express
- * license agreement from NVIDIA CORPORATION is strictly prohibited.
- */
+// SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES
+// Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+// SPDX-License-Identifier: Apache-2.0
#ifndef ISAAC_ROS_NITROS_BI3D_INFERENCE_PARAM_ARRAY_TYPE__NITROS_BI3D_INFERENCE_PARAM_ARRAY_HPP_
#define ISAAC_ROS_NITROS_BI3D_INFERENCE_PARAM_ARRAY_TYPE__NITROS_BI3D_INFERENCE_PARAM_ARRAY_HPP_
diff --git a/isaac_ros_nitros_bi3d_inference_param_array_type/package.xml b/isaac_ros_nitros_bi3d_inference_param_array_type/package.xml
index 75c522f..d7937c0 100644
--- a/isaac_ros_nitros_bi3d_inference_param_array_type/package.xml
+++ b/isaac_ros_nitros_bi3d_inference_param_array_type/package.xml
@@ -1,23 +1,31 @@
isaac_ros_nitros_bi3d_inference_param_array_type
- 0.11.0
+ 0.20.0
Isaac ROS Nitros Bi3D Inferece Param Array Type
Hemal Shah
- NVIDIA Isaac ROS Software License
+ Apache-2.0
https://developer.nvidia.com/isaac-ros-gems/
Peter Du
diff --git a/isaac_ros_nitros_bi3d_inference_param_array_type/src/nitros_bi3d_inference_param_array.cpp b/isaac_ros_nitros_bi3d_inference_param_array_type/src/nitros_bi3d_inference_param_array.cpp
index f33acb1..ddb8f25 100644
--- a/isaac_ros_nitros_bi3d_inference_param_array_type/src/nitros_bi3d_inference_param_array.cpp
+++ b/isaac_ros_nitros_bi3d_inference_param_array_type/src/nitros_bi3d_inference_param_array.cpp
@@ -1,12 +1,19 @@
-/**
- * Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
- *
- * NVIDIA CORPORATION and its licensors retain all intellectual property
- * and proprietary rights in and to this software, related documentation
- * and any modifications thereto. Any use, reproduction, disclosure or
- * distribution of this software and related documentation without an express
- * license agreement from NVIDIA CORPORATION is strictly prohibited.
- */
+// SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES
+// Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+// SPDX-License-Identifier: Apache-2.0
#include
@@ -23,8 +30,7 @@
#include "gxf/std/timestamp.hpp"
#pragma GCC diagnostic pop
-#include \
- "isaac_ros_nitros_bi3d_inference_param_array_type/nitros_bi3d_inference_param_array.hpp"
+#include "isaac_ros_nitros_bi3d_inference_param_array_type/nitros_bi3d_inference_param_array.hpp"
#include "isaac_ros_nitros/types/type_adapter_nitros_context.hpp"
#include "rclcpp/rclcpp.hpp"
diff --git a/isaac_ros_nitros_bi3d_inference_param_array_type/test/config/test_forward_node.yaml b/isaac_ros_nitros_bi3d_inference_param_array_type/test/config/test_forward_node.yaml
index 3f8e1f8..7b73898 100644
--- a/isaac_ros_nitros_bi3d_inference_param_array_type/test/config/test_forward_node.yaml
+++ b/isaac_ros_nitros_bi3d_inference_param_array_type/test/config/test_forward_node.yaml
@@ -1,11 +1,20 @@
%YAML 1.2
-# Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
+# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES
+# Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
-# NVIDIA CORPORATION and its licensors retain all intellectual property
-# and proprietary rights in and to this software, related documentation
-# and any modifications thereto. Any use, reproduction, disclosure or
-# distribution of this software and related documentation without an express
-# license agreement from NVIDIA CORPORATION is strictly prohibited.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
---
name: forward
components:
diff --git a/isaac_ros_nitros_bi3d_inference_param_array_type/test/isaac_ros_nitros_bi3d_inference_param_array_type_test_pol.py b/isaac_ros_nitros_bi3d_inference_param_array_type/test/isaac_ros_nitros_bi3d_inference_param_array_type_test_pol.py
index 0a7850d..a7db804 100644
--- a/isaac_ros_nitros_bi3d_inference_param_array_type/test/isaac_ros_nitros_bi3d_inference_param_array_type_test_pol.py
+++ b/isaac_ros_nitros_bi3d_inference_param_array_type/test/isaac_ros_nitros_bi3d_inference_param_array_type_test_pol.py
@@ -1,10 +1,19 @@
-# Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
+# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES
+# Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
-# NVIDIA CORPORATION and its licensors retain all intellectual property
-# and proprietary rights in and to this software, related documentation
-# and any modifications thereto. Any use, reproduction, disclosure or
-# distribution of this software and related documentation without an express
-# license agreement from NVIDIA CORPORATION is strictly prohibited.
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# SPDX-License-Identifier: Apache-2.0
import time
diff --git a/isaac_ros_nitros_bi3d_inference_param_array_type/test/src/nitros_bi3d_inference_param_array_forward_node.cpp b/isaac_ros_nitros_bi3d_inference_param_array_type/test/src/nitros_bi3d_inference_param_array_forward_node.cpp
index d201843..a79121d 100644
--- a/isaac_ros_nitros_bi3d_inference_param_array_type/test/src/nitros_bi3d_inference_param_array_forward_node.cpp
+++ b/isaac_ros_nitros_bi3d_inference_param_array_type/test/src/nitros_bi3d_inference_param_array_forward_node.cpp
@@ -1,12 +1,19 @@
-/**
- * Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
- *
- * NVIDIA CORPORATION and its licensors retain all intellectual property
- * and proprietary rights in and to this software, related documentation
- * and any modifications thereto. Any use, reproduction, disclosure or
- * distribution of this software and related documentation without an express
- * license agreement from NVIDIA CORPORATION is strictly prohibited.
- */
+// SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES
+// Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+// SPDX-License-Identifier: Apache-2.0
#include \
"isaac_ros_nitros_bi3d_inference_param_array_type/nitros_bi3d_inference_param_array.hpp"
diff --git a/resources/Isaac_sim_change_base_link.png b/resources/Isaac_sim_change_base_link.png
new file mode 100644
index 0000000..cfc4a38
--- /dev/null
+++ b/resources/Isaac_sim_change_base_link.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4e17cdd2ce8d4c7423d14d3a6956bdd06ba1e7ca101fa120dea418ea289bab4b
+size 94736
diff --git a/resources/Isaac_sim_disable_clock_reset.png b/resources/Isaac_sim_disable_clock_reset.png
new file mode 100644
index 0000000..ec42770
--- /dev/null
+++ b/resources/Isaac_sim_disable_clock_reset.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:7f181ebbbddcea0c04d5ab874bf5ba816c7670cec4f09fb5124d6b8146e70b5f
+size 110466
diff --git a/resources/Isaac_sim_enable_stereo.png b/resources/Isaac_sim_enable_stereo.png
new file mode 100644
index 0000000..827f8da
--- /dev/null
+++ b/resources/Isaac_sim_enable_stereo.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:602b513e8a85d563f0f87b312677de2c92d04e9c9b8800d31f71d22e6a189c84
+size 245916
diff --git a/resources/Isaac_sim_play.png b/resources/Isaac_sim_play.png
new file mode 100644
index 0000000..eb2fcbd
--- /dev/null
+++ b/resources/Isaac_sim_play.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c82817945a9e9617dc082ea389b5374050dce911ef5a104ee2c7aef577006547
+size 3756879
diff --git a/resources/Isaac_sim_rviz.png b/resources/Isaac_sim_rviz.png
new file mode 100644
index 0000000..eac26e8
--- /dev/null
+++ b/resources/Isaac_sim_rviz.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:a15788f3b866ad31f75b773bc5f63a09ec73c1ce11110b3ce91bfacaa5436f43
+size 233607
diff --git a/resources/Isaac_sim_set_stereo_offset.png b/resources/Isaac_sim_set_stereo_offset.png
new file mode 100644
index 0000000..653e042
--- /dev/null
+++ b/resources/Isaac_sim_set_stereo_offset.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:181371ea36dcb597d3a5df938191954742e6d18812e9b0ad4cb8f25d985ff8e0
+size 113557
diff --git a/resources/Isaac_sim_tutorial.gif b/resources/Isaac_sim_tutorial.gif
new file mode 100644
index 0000000..c2af3d2
--- /dev/null
+++ b/resources/Isaac_sim_tutorial.gif
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c754df88c336634e4b02925c334d2b199072df640e63af9f7deb78d6db2914b5
+size 8100685
diff --git a/resources/Rviz_quickstart.png b/resources/Rviz_quickstart.png
new file mode 100644
index 0000000..e792bc6
--- /dev/null
+++ b/resources/Rviz_quickstart.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:c03e44be0b300a259e9a6b6b872f4512367b54a4109e33052c52673404a371dd
+size 476243
diff --git a/resources/Visualizer_isaac_sim.png b/resources/Visualizer_isaac_sim.png
new file mode 100644
index 0000000..795f43e
--- /dev/null
+++ b/resources/Visualizer_isaac_sim.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:776ba816d2c6224349be99dd887c5154fa0d100fad7c843345c5ebaf0d855611
+size 22402
diff --git a/resources/realsense_camera_position.jpg b/resources/realsense_camera_position.jpg
new file mode 100644
index 0000000..e11763f
--- /dev/null
+++ b/resources/realsense_camera_position.jpg
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0e5a15c20c0b95d4344e2adea95fbfd198dadfd245b6dd9d4ca6fb5b1f54c9c6
+size 417887
diff --git a/resources/realsense_example.gif b/resources/realsense_example.gif
new file mode 100644
index 0000000..75bb2a1
--- /dev/null
+++ b/resources/realsense_example.gif
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:6cfbc1f6d3b424d0809c307f6945d0fe4956cc18a50180100ea73fe3d6b9b7cc
+size 2137051
diff --git a/resources/realsense_example.png b/resources/realsense_example.png
new file mode 100644
index 0000000..40e0479
--- /dev/null
+++ b/resources/realsense_example.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d0e47d33f21d504ee51843a75027d38e3c782256ea584972c4ab4c0e52f0ba18
+size 1466948
diff --git a/resources/rosbags/bi3dnode_rosbag/bi3dnode_rosbag_0.db3 b/resources/rosbags/bi3dnode_rosbag/bi3dnode_rosbag_0.db3
index 4f72ae9..68e790b 100644
--- a/resources/rosbags/bi3dnode_rosbag/bi3dnode_rosbag_0.db3
+++ b/resources/rosbags/bi3dnode_rosbag/bi3dnode_rosbag_0.db3
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:301c23d12ca21db82fcf7a78341e12a1cc2d4f12719f47d599ffe2f71b380249
-size 52957184
+oid sha256:d3f42dcc4e18fa7074c022ca41a4a184b7226206bc133326928415e8eb6e1902
+size 135094272
diff --git a/resources/rosbags/bi3dnode_rosbag/metadata.yaml b/resources/rosbags/bi3dnode_rosbag/metadata.yaml
index 426ea32..4a151a5 100644
--- a/resources/rosbags/bi3dnode_rosbag/metadata.yaml
+++ b/resources/rosbags/bi3dnode_rosbag/metadata.yaml
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:aca1c0ebd7f7aca5616fbdce023bcd45039935fb3dcb4b2ae448a13d3cc7e7e8
-size 2001
+oid sha256:4cbfd9f41f34454317b9597a7b87f8866ca85c1e1b839dee83f959d2996a8ce2
+size 3981
diff --git a/resources/visualizer_realsense.png b/resources/visualizer_realsense.png
new file mode 100644
index 0000000..7456b23
--- /dev/null
+++ b/resources/visualizer_realsense.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4858a3e885b424a1811e8f7d5d52033241418a025096818d37e647dd2480c726
+size 9347
diff --git a/resources/visualizer_realsense_mono_pair.png b/resources/visualizer_realsense_mono_pair.png
new file mode 100644
index 0000000..ac6fde4
--- /dev/null
+++ b/resources/visualizer_realsense_mono_pair.png
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:4777f8172e3430ad441a1260e9f3add2234ca9ba661a3864049e92e14d79729f
+size 169059