Skip to content

Commit 2d73f40

Browse files
authored
Merge pull request #14 from NVIDIA-ISAAC-ROS/release-dp-2
Isaac ROS 0.20.0 (DP2)
2 parents b0b32c0 + 28fa663 commit 2d73f40

18 files changed

+569
-177
lines changed

CONTRIBUTING.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Isaac ROS Contribution Rules
2+
3+
Any contribution that you make to this repository will
4+
be under the Apache 2 License, as dictated by that
5+
[license](http://www.apache.org/licenses/LICENSE-2.0.html):
6+
7+
> **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.
8+
9+
Contributors must sign-off each commit by adding a `Signed-off-by: ...`
10+
line to commit messages to certify that they have the right to submit
11+
the code they are contributing to the project according to the
12+
[Developer Certificate of Origin (DCO)](https://developercertificate.org/).
13+
14+
[//]: # (202201002)

LICENSE

Lines changed: 201 additions & 65 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 46 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,25 @@
33
<div align="center"><img alt="Isaac ROS DetectNet Sample Output" src="resources/header-image.png" width="600px"/></div>
44

55
## Overview
6+
67
This repository provides a GPU-accelerated package for object detection based on [DetectNet](https://developer.nvidia.com/blog/detectnet-deep-neural-network-object-detection-digits/). Using a trained deep-learning model and a monocular camera, the `isaac_ros_detectnet` package can detect objects of interest in an image and provide bounding boxes. DetectNet is similar to other popular object detection models such as YOLOV3, FasterRCNN, SSD, and others while being efficient with multiple object classes in large images.
78

89
### Isaac ROS NITROS Acceleration
10+
911
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.
1012

1113
### Performance
12-
The performance results of benchmarking the prepared pipelines in this package on supported platforms are below:
1314

15+
The performance results of benchmarking the prepared pipelines in this package on supported platforms are below:
1416

15-
| Pipeline | AGX Orin | AGX Xavier | x86_64 w/ RTX 3060 Ti |
16-
| -------------------------- | --------- | ---------- | --------------------- |
17-
| Isaac ROS Detectnet (544p) | 104 fps | 79 fps | 104 fps |
17+
| Pipeline | AGX Orin | Orin Nano | x86_64 w/ RTX 3060 Ti |
18+
| -------------------------- | ------------------ | ---------------- | --------------------- |
19+
| Isaac ROS Detectnet (544p) | 225 fps <br> 7.7ms | 72 fps <br> 18ms | 450 fps <br> 3.2ms |
1820

1921
> **Note:** These numbers are reported with defaults parameter values found in [params.yaml](./isaac_ros_detectnet/config/params.yaml).
22+
23+
These data have been collected per the methodology described [here](https://github.com/NVIDIA-ISAAC-ROS/.github/blob/main/profile/performance-summary.md#methodology).
24+
2025
### ROS2 Graph Configuration
2126

2227
To run the DetectNet object detection inference, the following ROS2 nodes should be set up and running:
@@ -25,13 +30,14 @@ To run the DetectNet object detection inference, the following ROS2 nodes should
2530

2631
1. **Isaac ROS DNN Image encoder**: This will take an image message and convert it to a tensor ([`TensorList`](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_common/blob/main/isaac_ros_tensor_list_interfaces/msg/TensorList.msg) that can be
2732
processed by the network.
28-
2. **Isaac ROS DNN Inference - Triton**: This will execute the DetectNet network and take as input the tensor from the DNN Image Encoder.
33+
2. **Isaac ROS DNN Inference - Triton**: This will execute the DetectNet network and take as input the tensor from the DNN Image Encoder.
2934
> **Note:** The [Isaac ROS TensorRT](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_dnn_inference/tree/main/isaac_ros_tensor_rt) package is not able to perform inference with DetectNet models at this time.
3035
3136
The output will be a TensorList message containing the encoded detections. Use the parameters `model_name` and `model_repository_paths` to point to the model folder and set the model name. The `.plan` file should be located at `$model_repository_path/$model_name/1/model.plan`
3237
3. **Isaac ROS Detectnet Decoder**: This node will take the TensorList with encoded detections as input, and output `Detection2DArray` messages for each frame. See the following section for the parameters.
3338

3439
## Table of Contents
40+
3541
- [Isaac ROS Object Detection](#isaac-ros-object-detection)
3642
- [Overview](#overview)
3743
- [Isaac ROS NITROS Acceleration](#isaac-ros-nitros-acceleration)
@@ -44,7 +50,6 @@ To run the DetectNet object detection inference, the following ROS2 nodes should
4450
- [Quickstart](#quickstart)
4551
- [Next Steps](#next-steps)
4652
- [Try More Examples](#try-more-examples)
47-
- [Use Different Models](#use-different-models)
4853
- [Customize your Dev Environment](#customize-your-dev-environment)
4954
- [Package Reference](#package-reference)
5055
- [`isaac_ros_detectnet`](#isaac_ros_detectnet)
@@ -58,26 +63,28 @@ To run the DetectNet object detection inference, the following ROS2 nodes should
5863
- [Updates](#updates)
5964

6065
## Latest Update
61-
Update 2022-08-31: Update to use [NVIDIA Isaac Transport for ROS (NITROS)](https://developer.nvidia.com/blog/improve-perception-performance-for-ros-2-applications-with-nvidia-isaac-transport-for-ros/) and to be compatible with JetPack 5.0.2
66+
67+
Update 2022-10-19: Updated OSS licensing
6268

6369
## Supported Platforms
70+
6471
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.
6572

6673
> **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.
6774
68-
69-
| Platform | Hardware | Software | Notes |
70-
| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
71-
| Jetson | [Jetson Orin](https://www.nvidia.com/en-us/autonomous-machines/embedded-systems/jetson-orin/)<br/>[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. |
72-
| x86_64 | NVIDIA GPU | [Ubuntu 20.04+](https://releases.ubuntu.com/20.04/) <br> [CUDA 11.6.1+](https://developer.nvidia.com/cuda-downloads) |
73-
75+
| Platform | Hardware | Software | Notes |
76+
| -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
77+
| Jetson | [Jetson Orin](https://www.nvidia.com/en-us/autonomous-machines/embedded-systems/jetson-orin/) <br> [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. |
78+
| x86_64 | NVIDIA GPU | [Ubuntu 20.04+](https://releases.ubuntu.com/20.04/) <br> [CUDA 11.6.1+](https://developer.nvidia.com/cuda-downloads) |
7479

7580
### Docker
81+
7682
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.
7783

7884
> **Note:** All Isaac ROS Quickstarts, tutorials, and examples have been designed with the Isaac ROS Docker images as a prerequisite.
7985
8086
## Quickstart
87+
8188
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).
8289
2. Clone this repository and its dependencies under `~/workspaces/isaac_ros-dev/src`.
8390

@@ -102,47 +109,59 @@ To simplify development, we strongly recommend leveraging the Isaac ROS Dev Dock
102109
```
103110

104111
3. Pull down a ROS Bag of sample data:
112+
105113
```bash
106114
cd ~/workspaces/isaac_ros-dev/src/isaac_ros_object_detection/isaac_ros_detectnet && \
107115
git lfs pull -X "" -I "resources/rosbags"
108116
```
117+
109118
4. Launch the Docker container using the `run_dev.sh` script:
119+
110120
```bash
111121
cd ~/workspaces/isaac_ros-dev/src/isaac_ros_common && \
112122
./scripts/run_dev.sh
113123
```
124+
114125
5. Inside the container, build and source the workspace:
126+
115127
```bash
116128
cd /workspaces/isaac_ros-dev && \
117129
colcon build --symlink-install && \
118130
source install/setup.bash
119131
```
132+
120133
6. (Optional) Run tests to verify complete and correct installation:
134+
121135
```bash
122136
colcon test --executor sequential
123137
```
138+
124139
7. Run the quickstart setup script which will download the [PeopleNet Model](https://catalog.ngc.nvidia.com/orgs/nvidia/teams/tao/models/peoplenet) from NVIDIA GPU Cloud(NGC)
140+
125141
```bash
126142
cd /workspaces/isaac_ros-dev/src/isaac_ros_object_detection/isaac_ros_detectnet && \
127143
./scripts/setup_model.sh --height 632 --width 1200 --config-file resources/quickstart_config.pbtxt
128144
```
129145

130146
8. Run the following launch file to spin up a demo of this package:
147+
131148
```bash
132149
cd /workspaces/isaac_ros-dev && \
133150
ros2 launch isaac_ros_detectnet isaac_ros_detectnet_quickstart.launch.py
134151
```
135-
9. Visualize and validate the output of the package in the `rqt_image_view` window. After about a minute, your output should look like this:
152+
153+
9. Visualize and validate the output of the package in the `rqt_image_view` window. After about a minute, your output should look like this:
136154

137155
![DetectNet output image showing a tennis ball correctly identified](resources/rqt_visualizer.png "RQT showing detection boxes of an NVIDIA Mug and a tennis ball from simulation using DetectNet")
138156

139157
## Next Steps
158+
140159
### Try More Examples
160+
141161
To continue your exploration, check out the following suggested examples:
142-
- [Tutorial with Isaac Sim](docs/tutorial-isaac-sim.md)
143162

144-
### Use Different Models
145-
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.
163+
- [Tutorial with Isaac Sim](docs/tutorial-isaac-sim.md)
164+
- [Tutorial with Custom Model](docs/tutorial-custom-model.md) For more info click [here](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_dnn_inference/blob/main/docs/model-preparation.md)
146165

147166
This package only supports models based on the `Detectnet_v2` architecture. Some of the [supported DetectNet models](https://catalog.ngc.nvidia.com/?filters=&orderBy=scoreDESC&query=DetectNet) from NGC:
148167

@@ -153,12 +172,14 @@ This package only supports models based on the `Detectnet_v2` architecture. Some
153172
| [DashCamNet](https://ngc.nvidia.com/catalog/models/nvidia:tao:dashcamnet) | Identify objects from a moving object |
154173
| [FaceDetectIR](https://ngc.nvidia.com/catalog/models/nvidia:tao:facedetectir) | Detect faces in a dark environment with IR camera |
155174

156-
157175
### Customize your Dev Environment
176+
158177
To customize your development environment, reference [this guide](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_common/blob/main/docs/modify-dockerfile.md).
159178

160179
## Package Reference
180+
161181
### `isaac_ros_detectnet`
182+
162183
#### Usage
163184

164185
```bash
@@ -182,26 +203,32 @@ ros2 launch isaac_ros_detectnet isaac_ros_detectnet.launch.py label_list:=<list
182203
| `bounding_box_offset` | `double` | `0.0` | Bounding box offset for both X and Y dimensions. |
183204

184205
#### ROS Topics Subscribed
206+
185207
| ROS Topic | Interface | Description |
186208
| ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------- |
187209
| `tensor_sub` | [isaac_ros_tensor_list_interfaces/TensorList](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_common/blob/main/isaac_ros_tensor_list_interfaces/msg/TensorList.msg) | The tensor that represents the inferred aligned bounding boxes. |
188210

189211
#### ROS Topics Published
212+
190213
| ROS Topic | Interface | Description |
191214
| ---------------------- | ---------------------------------------------------------------------------------------------------------------- | -------------------------------------------------- |
192215
| `detectnet/detections` | [vision_msgs/Detection2DArray](https://github.com/ros-perception/vision_msgs/blob/ros2/msg/Detection2DArray.msg) | Aligned image bounding boxes with detection class. |
193216

194-
195217
## Troubleshooting
218+
196219
### Isaac ROS Troubleshooting
220+
197221
For solutions to problems with Isaac ROS, please check [here](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_common/blob/main/docs/troubleshooting.md).
198222

199223
### Deep Learning Troubleshooting
224+
200225
For solutions to problems with using DNN models, please check [here](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_dnn_inference/blob/main/docs/troubleshooting.md).
201226

202227
## Updates
228+
203229
| Date | Changes |
204230
| ---------- | ------------------------------------------------------------------------------------- |
231+
| 2022-10-19 | Updated OSS licensing |
205232
| 2022-08-31 | Update to use NITROS for improved performance and to be compatible with JetPack 5.0.2 |
206233
| 2022-06-30 | Support for ROS2 Humble and miscellaneous bug fixes |
207234
| 2022-03-21 | Initial release |

docs/tutorial-custom-model.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Tutorial for DetectNet with a Custom Model
2+
3+
## Overview
4+
5+
This tutorial walks you through how to use a different [DetectNet Model](https://catalog.ngc.nvidia.com/models?filters=&orderBy=dateModifiedDESC&query=detectnet) with [isaac_ros_detectnet](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_object_detection) for object detection.
6+
7+
## Tutorial Walkthrough
8+
9+
1. Complete the [Quickstart section](../README.md#quickstart) in the main README.
10+
2. Choose one of the detectnet model that is [listed here](https://catalog.ngc.nvidia.com/models?filters=&orderBy=dateModifiedDESC&query=detectnet&page=0&pageSize=25)
11+
3. Create a config file. Use `resources/quickstart_config.pbtxt` as a template. The datatype can be found in the overview tab of the model page. The `input/dims` should be the size of the raw input images. It can be different for the same model. The `output/dims` dimensions can be calculated as `round(input_dims/max_batch_size)`. Place this config file in the `isaac_ros_detectnet/resources` directory. You can find more information about the config file [here](https://github.com/NVIDIA-AI-IOT/tao-toolkit-triton-apps/blob/main/docs/configuring_the_client.md#configuring-the-detectnet_v2-model-entry-in-the-model-repository)
12+
4. Run the following command with the required input parameters:
13+
14+
```bash
15+
cd /workspaces/isaac_ros-dev/src/isaac_ros_object_detection/isaac_ros_detectnet && \
16+
./scripts/setup_model.sh --height 720 --width 1280 --config-file resources/isaac_sim_config.pbtxt
17+
```
18+
19+
Parameters:
20+
21+
`--model-link` : Get the wget link to the specific model version under the file browser tab in the page. Click on the download button on the top right and select WGET. This will copy the commend to you clipboard. Paste this in a text editor and extract only the hyperlink. eg: `https://api.ngc.nvidia.com/v2/models/nvidia/tao/peoplenet/versions/deployable_quantized_v2.5/zip`
22+
23+
`--model-file-name` : The name of the .etl file found in the file browser tab of the model page. eg: `resnet34_peoplenet_int8.etlt`
24+
25+
`--height` : height dimension of the input image eg: `632`
26+
27+
`--width` : width dimension of the input image. eg: `1200`
28+
29+
`--config-file` : relative path to the config file mentioned in step 3. eg: `isaac_ros_detectnet/resources/peoplenet_config.pbtxt`
30+
--precision : type/precision of model found in the overview tag of the model page. eg: `int8`
31+
32+
`--output-layers`: output layers seperated by commas that can be found from the txt file in the file browser tab of the model page. eg: `output_cov/Sigmoid,output_bbox/BiasAdd`
33+
5. Replace lines 32 and 33 in [isaac_ros_detectnet.launch.py](../isaac_ros_detectnet/launch/isaac_ros_detectnet.launch.py#L32-33) with the input image dimensions
34+
6. Run the following command:
35+
36+
```bash
37+
cd /workspaces/isaac_ros-dev && \
38+
ros2 launch isaac_ros_detectnet isaac_ros_detectnet.launch.py
39+
```

0 commit comments

Comments
 (0)