Skip to content

Commit 156c5c2

Browse files
Isaac ROS 0.31.0 (DP3.1)
1 parent 843ecc5 commit 156c5c2

File tree

13 files changed

+149
-127
lines changed

13 files changed

+149
-127
lines changed

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,11 @@ This package is powered by [NVIDIA Isaac Transport for ROS (NITROS)](https://dev
3636

3737
The following table summarizes the per-platform performance statistics of sample graphs that use this package, with links included to the full benchmark output. These benchmark configurations are taken from the [Isaac ROS Benchmark](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark#list-of-isaac-ros-benchmarks) collection, based on the [`ros2_benchmark`](https://github.com/NVIDIA-ISAAC-ROS/ros2_benchmark) framework.
3838

39-
| Sample Graph | Input Size | AGX Orin | Orin NX | x86_64 w/ RTX 3060 Ti |
40-
| --------------------------------------------------------------------------------------------------------------------------------------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
41-
| [DNN Stereo Disparity Node](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/scripts//isaac_ros_ess_node.py) | 1080p | [63.6 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_ess_node-agx_orin.json)<br>2.6 ms | [24.5 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_ess_node-orin_nx.json)<br>3.0 ms | [131 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_ess_node-x86_64_rtx_3060Ti.json)<br>0.73 ms |
42-
| [DNN Stereo Disparity Graph](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/scripts//isaac_ros_ess_graph.py) | 1080p | [52.7 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_ess_graph-agx_orin.json)<br>20 ms | [20.8 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_ess_graph-orin_nx.json)<br>50 ms | [116 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_ess_graph-x86_64_rtx_3060Ti.json)<br>8.7 ms |
39+
| Sample Graph | Input Size | AGX Orin | Orin NX | x86_64 w/ RTX 4060 Ti |
40+
| --------------------------------------------------------------------------------------------------------------------------------------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
41+
| [DNN Stereo Disparity Node](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/scripts//isaac_ros_ess_node.py) | 1080p | [63.6 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_ess_node-agx_orin.json)<br>3.5 ms | [24.8 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_ess_node-orin_nx.json)<br>5.0 ms | [173 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_ess_node-nuc_4060ti.json)<br>3.4 ms |
42+
| [DNN Stereo Disparity Graph](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/scripts//isaac_ros_ess_graph.py) | 1080p | [52.7 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_ess_graph-agx_orin.json)<br>21 ms | [20.8 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_ess_graph-orin_nx.json)<br>50 ms | [156 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_ess_graph-nuc_4060ti.json)<br>10 ms |
43+
4344

4445
## Table of Contents
4546

@@ -81,7 +82,7 @@ The following table summarizes the per-platform performance statistics of sample
8182

8283
## Latest Update
8384

84-
Update 2023-04-05: Source available GXF extensions
85+
Update 2023-05-25: Upgraded model (1.1.0).
8586

8687
## Supported Platforms
8788

@@ -143,7 +144,7 @@ To simplify development, we strongly recommend leveraging the Isaac ROS Dev Dock
143144

144145
```bash
145146
cd /workspaces/isaac_ros-dev/src/isaac_ros_dnn_stereo_disparity/resources && \
146-
wget 'https://api.ngc.nvidia.com/v2/models/nvidia/isaac/dnn_stereo_disparity/versions/1.0.0/files/ess.etlt'
147+
wget 'https://api.ngc.nvidia.com/v2/models/nvidia/isaac/dnn_stereo_disparity/versions/1.1.0/files/ess.etlt'
147148
```
148149

149150
6. Convert the encrypted model (`.etlt`) to a TensorRT engine plan:
@@ -302,6 +303,7 @@ Make sure that the ROS bag has a reasonable size and publish rate.
302303
303304
| Date | Changes |
304305
| ---------- | ------------------------------------------ |
306+
| 2023-05-25 | Upgraded model (1.1.0) |
305307
| 2023-04-05 | Source available GXF extensions |
306308
| 2022-10-19 | Updated OSS licensing |
307309
| 2022-08-31 | Update to be compatible with JetPack 5.0.2 |

isaac_ros_ess/config/ess_inference.yaml

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
%YAML 1.2
22
# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES
3-
# Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3+
# Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -173,7 +173,7 @@ components:
173173
- name: disparity_in
174174
type: nvidia::gxf::DoubleBufferReceiver
175175
parameters:
176-
capacity: 1
176+
capacity: 2
177177
policy: 0
178178
- type: nvidia::gxf::MessageAvailableSchedulingTerm
179179
parameters:
@@ -182,7 +182,7 @@ components:
182182
- name: left_cam_receiver
183183
type: nvidia::gxf::DoubleBufferReceiver
184184
parameters:
185-
capacity: 1
185+
capacity: 2
186186
policy: 0
187187
- type: nvidia::gxf::MessageAvailableSchedulingTerm
188188
parameters:
@@ -191,7 +191,7 @@ components:
191191
- name: right_cam_receiver
192192
type: nvidia::gxf::DoubleBufferReceiver
193193
parameters:
194-
capacity: 1
194+
capacity: 2
195195
policy: 0
196196
- type: nvidia::gxf::MessageAvailableSchedulingTerm
197197
parameters:
@@ -221,7 +221,7 @@ components:
221221
min_disparity: 0
222222
max_disparity: -1
223223
---
224-
name: vault
224+
name: sink
225225
components:
226226
- name: signal
227227
type: nvidia::gxf::DoubleBufferReceiver
@@ -232,12 +232,10 @@ components:
232232
parameters:
233233
receiver: signal
234234
min_size: 1
235-
- name: vault
236-
type: nvidia::gxf::Vault
235+
- name: sink
236+
type: nvidia::isaac_ros::MessageRelay
237237
parameters:
238238
source: signal
239-
max_waiting_count: 1
240-
drop_waiting: false
241239
---
242240
name: connections
243241
components:
@@ -264,12 +262,17 @@ components:
264262
- type: nvidia::gxf::Connection
265263
parameters:
266264
source: disparity_compositor/data_transmitter
267-
target: vault/signal
265+
target: sink/signal
268266
---
269267
components:
270268
- name: clock
271269
type: nvidia::gxf::RealtimeClock
272-
- type: nvidia::gxf::GreedyScheduler
270+
- type: nvidia::gxf::MultiThreadScheduler
273271
parameters:
274272
clock: clock
275273
stop_on_deadlock: false
274+
check_recession_period_ms: 1
275+
worker_thread_number: 2
276+
- type: nvidia::gxf::JobStatistics
277+
parameters:
278+
clock: clock

isaac_ros_ess/gxf/ess/CMakeLists.txt

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,36 @@ find_package(TENSORRT)
3535

3636
# Create extension
3737
add_library(gxf_cvcore_ess SHARED
38+
TensorOps.cpp
3839
ESS.cpp
3940
extensions/ess/ESS.hpp
40-
ESSRegistry.cpp
4141

42+
extensions/tensor_ops/CameraModel.cpp
43+
extensions/tensor_ops/CameraModel.hpp
44+
extensions/tensor_ops/ConvertColorFormat.cpp
45+
extensions/tensor_ops/ConvertColorFormat.hpp
46+
extensions/tensor_ops/CropAndResize.cpp
47+
extensions/tensor_ops/CropAndResize.hpp
48+
extensions/tensor_ops/Frame3D.cpp
49+
extensions/tensor_ops/Frame3D.hpp
4250
extensions/tensor_ops/ImageAdapter.cpp
4351
extensions/tensor_ops/ImageAdapter.hpp
4452
extensions/tensor_ops/ImageUtils.cpp
4553
extensions/tensor_ops/ImageUtils.hpp
46-
54+
extensions/tensor_ops/InterleavedToPlanar.cpp
55+
extensions/tensor_ops/InterleavedToPlanar.hpp
56+
extensions/tensor_ops/Normalize.cpp
57+
extensions/tensor_ops/Normalize.hpp
58+
extensions/tensor_ops/Reshape.cpp
59+
extensions/tensor_ops/Reshape.hpp
60+
extensions/tensor_ops/Resize.cpp
61+
extensions/tensor_ops/Resize.hpp
62+
extensions/tensor_ops/TensorOperator.cpp
63+
extensions/tensor_ops/TensorOperator.hpp
64+
extensions/tensor_ops/TensorStream.cpp
65+
extensions/tensor_ops/TensorStream.hpp
66+
extensions/tensor_ops/Undistort.cpp
67+
extensions/tensor_ops/Undistort.hpp
4768
extensions/tensor_ops/detail/ImageAdapterTensorImpl.cpp
4869
extensions/tensor_ops/detail/ImageAdapterTensorImpl.hpp
4970
extensions/tensor_ops/detail/ImageAdapterVideoBufferImpl.cpp

isaac_ros_ess/gxf/ess/ESSRegistry.cpp

Lines changed: 0 additions & 27 deletions
This file was deleted.
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
// SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES
2+
// Copyright (c) 2021-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
//
8+
// http://www.apache.org/licenses/LICENSE-2.0
9+
//
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
//
16+
// SPDX-License-Identifier: Apache-2.0
17+
#include "extensions/ess/ESS.hpp"
18+
#include "extensions/tensor_ops/CameraModel.hpp"
19+
#include "extensions/tensor_ops/ConvertColorFormat.hpp"
20+
#include "extensions/tensor_ops/CropAndResize.hpp"
21+
#include "extensions/tensor_ops/Frame3D.hpp"
22+
#include "extensions/tensor_ops/ImageAdapter.hpp"
23+
#include "extensions/tensor_ops/InterleavedToPlanar.hpp"
24+
#include "extensions/tensor_ops/Normalize.hpp"
25+
#include "extensions/tensor_ops/Reshape.hpp"
26+
#include "extensions/tensor_ops/Resize.hpp"
27+
#include "extensions/tensor_ops/TensorOperator.hpp"
28+
#include "extensions/tensor_ops/TensorStream.hpp"
29+
#include "extensions/tensor_ops/Undistort.hpp"
30+
31+
#include "gxf/std/extension_factory_helper.hpp"
32+
33+
GXF_EXT_FACTORY_BEGIN()
34+
GXF_EXT_FACTORY_SET_INFO(
35+
0x6eae64ff97a94d9b, 0xb324f85e6a98a75a, "NvCvTensorOpsExtension",
36+
"Generic CVCORE tensor_ops interfaces", "Nvidia_Gxf", "3.1.0", "LICENSE");
37+
38+
GXF_EXT_FACTORY_ADD(
39+
0xd073a92344ba4b82, 0xbd0f18f4996048e8, nvidia::cvcore::tensor_ops::CameraModel,
40+
nvidia::gxf::Component,
41+
"Construct Camera distortion model / Camera intrinsic compatible with CVCORE");
42+
43+
GXF_EXT_FACTORY_ADD(
44+
0x6c9419223e4b4c2c, 0x899a4d65279c6508, nvidia::cvcore::tensor_ops::Frame3D,
45+
nvidia::gxf::Component,
46+
"Construct Camera extrinsic compatible with CVCORE");
47+
48+
GXF_EXT_FACTORY_ADD(
49+
0xd94385e5b35b4635, 0x9adb0d214a3865f7, nvidia::cvcore::tensor_ops::TensorStream,
50+
nvidia::gxf::Component, "Wrapper of CVCORE ITensorOperatorStream/ITensorOperatorContext");
51+
52+
GXF_EXT_FACTORY_ADD(
53+
0xd0c4ddad486a4a92, 0xb69c8a5304b205ea, nvidia::cvcore::tensor_ops::ImageAdapter,
54+
nvidia::gxf::Component, "Utility component for conversion between message and cvcore image type");
55+
56+
GXF_EXT_FACTORY_ADD(
57+
0xadebc792bd0b4a57, 0x99c1405fd2ea0728, nvidia::cvcore::tensor_ops::StreamUndistort,
58+
nvidia::gxf::Codelet, "Codelet for stream image undistortion in tensor_ops");
59+
60+
GXF_EXT_FACTORY_ADD(
61+
0xa58141ac7eca4ea6, 0x9b545446fe379a12, nvidia::cvcore::tensor_ops::Resize, nvidia::gxf::Codelet,
62+
"Codelet for image resizing in tensor_ops");
63+
64+
GXF_EXT_FACTORY_ADD(
65+
0xeb8b5f5b36d44b49, 0x81f959fd28e6f678, nvidia::cvcore::tensor_ops::StreamResize,
66+
nvidia::gxf::Codelet, "Codelet for stream image resizing in tensor_ops");
67+
68+
GXF_EXT_FACTORY_ADD(
69+
0x4a7ff422de3841bd, 0x9e743ac10d9294b7, nvidia::cvcore::tensor_ops::CropAndResize,
70+
nvidia::gxf::Codelet, "Codelet for crop and resizing operation in tensor_ops");
71+
72+
GXF_EXT_FACTORY_ADD(
73+
0x7018f0b9034c462c, 0xa9fbaf7ee012974a, nvidia::cvcore::tensor_ops::Normalize,
74+
nvidia::gxf::Codelet,
75+
"Codelet for image normalization in tensor_ops");
76+
77+
GXF_EXT_FACTORY_ADD(
78+
0x269d4237f3c3479e, 0xbcca9ecc44c71a71, nvidia::cvcore::tensor_ops::InterleavedToPlanar,
79+
nvidia::gxf::Codelet, "Codelet for convert interleaved image to planar image in tensor_ops");
80+
81+
GXF_EXT_FACTORY_ADD(
82+
0xfc4d7b4d8fcc4dab, 0xa286056e0fcafa79, nvidia::cvcore::tensor_ops::ConvertColorFormat,
83+
nvidia::gxf::Codelet, "Codelet for image color conversion in tensor_ops");
84+
85+
GXF_EXT_FACTORY_ADD(
86+
0x5ab4a4d8f7a34553, 0xa90be52660b076fe, nvidia::cvcore::tensor_ops::StreamConvertColorFormat,
87+
nvidia::gxf::Codelet, "Codelet for stream image color conversion in tensor_ops");
88+
89+
GXF_EXT_FACTORY_ADD(
90+
0x26789b7d5a8d4e85, 0x86b845ec5f4cd12b, nvidia::cvcore::tensor_ops::Reshape, nvidia::gxf::Codelet,
91+
"Codelet for image reshape in tensor_ops");
92+
GXF_EXT_FACTORY_ADD(
93+
0x1aa1eea914344aff, 0x97fddaaedb594121, nvidia::cvcore::ESS, nvidia::gxf::Codelet,
94+
"ESS GXF Extension");
95+
GXF_EXT_FACTORY_END()

isaac_ros_ess/gxf/ess/cvcore/include/cv/tensor_ops/Errors.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
namespace cvcore { namespace tensor_ops {
2424

25+
// TODO: Add doxygen style comments for each of the error codes
2526
enum class TensorOpsErrorCode : std::int32_t
2627
{
2728
SUCCESS = 0,

isaac_ros_ess/gxf/ess/cvcore/src/core/utility/ProfileUtils.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ std::string GetCPUName()
6666
#else
6767
std::string GetCPUName()
6868
{
69+
// TODO: this will only work on linux platform
6970
std::ifstream cpuInfo("/proc/cpuinfo");
7071
if (!cpuInfo.good())
7172
{

isaac_ros_ess/gxf/ess/cvcore/src/tensor_ops/DBScan.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ void DBScan::doClusterAndMerge(Array<BBox> &input, Array<BBox> &output, BBoxMerg
180180
doCluster(input, clusters);
181181
output.setSize(m_numClusters);
182182

183-
// merge bboxes based on different modes
183+
// merge bboxes based on different modes (TODO: might add mininum/average in the future)
184184
if (type == MAXIMUM)
185185
{
186186
MergeMaximumBBoxes(input, clusters, output);

isaac_ros_ess/gxf/ess/cvcore/src/tensor_ops/vpi/VPITensorOperators.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ std::error_code CreateVPIImageWrapperImpl(VPIImage &vpiImg, VPIImageData &imgdat
101101
return make_error_code(vpiStatus);
102102
}
103103

104-
// helper function to wrap VPI image for planar image types
104+
// helper function to wrap VPI image for planar image types (TODO: not supported in vpi so far)
105105
template<ImageType T, typename std::enable_if<IsPlanarImage<T>::value>::type * = nullptr>
106106
std::error_code CreateVPIImageWrapperImpl(VPIImage &vpiImg, VPIImageData &imgdata, const Image<T> &cvcoreImage, VPIBackend backend)
107107
{
@@ -224,6 +224,7 @@ std::error_code DestroyVPIImageWrapper(VPIImage &image, VPIImageData &imageWrap)
224224
}
225225
std::error_code VPITensorStream::Status() noexcept
226226
{
227+
// TODO Needs to be updated for supporting non blocking function calls.
227228
return ErrorCode::SUCCESS;
228229
}
229230

isaac_ros_ess/gxf/ess/cvcore/src/trtbackend/TRTBackend.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,7 @@ void TRTImpl::loadFromMemoryPointer(void *engine)
458458

459459
void TRTImpl::setupIO(int batchSize)
460460
{
461+
// @TODO: use getBindingDimensions to avoid re-setting the IO.
461462
m_bindingsCount = m_inferenceEngine->getNbBindings();
462463
for (int i = 0; i < m_bindingsCount; i++)
463464
{
@@ -542,6 +543,7 @@ void TRTBackend::infer(void **buffer)
542543

543544
void TRTBackend::infer(void **buffer, int batchSize, cudaStream_t stream)
544545
{
546+
//@TODO: fix kMin, kOpt, kMax batch size in SetupProfile() call and then add a check here.
545547
m_pImpl->setupIO(batchSize);
546548

547549
bool success = true;

0 commit comments

Comments
 (0)