Skip to content

Commit 06a676b

Browse files
Merge pull request #48 from NVIDIA-ISAAC-ROS/release-3.2
Isaac ROS 3.2
2 parents 4c47edf + 46da6f1 commit 06a676b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+670
-212
lines changed

README.md

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

6464
## Performance
6565

66-
| Sample Graph<br/><br/> | Input Size<br/><br/> | AGX Orin<br/><br/> | Orin NX<br/><br/> | Orin Nano 8GB<br/><br/> | x86_64 w/ RTX 4060 Ti<br/><br/> | x86_64 w/ RTX 4090<br/><br/> |
67-
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|
68-
| [RT-DETR Object Detection Graph](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/benchmarks/isaac_ros_rtdetr_benchmark/scripts/isaac_ros_rtdetr_graph.py)<br/><br/><br/>SyntheticaDETR<br/><br/> | 720p<br/><br/><br/><br/> | [71.9 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_rtdetr_graph-agx_orin.json)<br/><br/><br/>24 ms @ 30Hz<br/><br/> | [30.8 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_rtdetr_graph-orin_nx.json)<br/><br/><br/>41 ms @ 30Hz<br/><br/> | [21.3 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_rtdetr_graph-orin_nano.json)<br/><br/><br/>61 ms @ 30Hz<br/><br/> | [205 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_rtdetr_graph-nuc_4060ti.json)<br/><br/><br/>8.7 ms @ 30Hz<br/><br/> | [400 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_rtdetr_graph-x86_4090.json)<br/><br/><br/>6.3 ms @ 30Hz<br/><br/> |
69-
| [DetectNet Object Detection Graph](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/benchmarks/isaac_ros_detectnet_benchmark/scripts/isaac_ros_detectnet_graph.py)<br/><br/><br/><br/> | 544p<br/><br/><br/><br/> | [165 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_detectnet_graph-agx_orin.json)<br/><br/><br/>20 ms @ 30Hz<br/><br/> | [115 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_detectnet_graph-orin_nx.json)<br/><br/><br/>26 ms @ 30Hz<br/><br/> | [63.2 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_detectnet_graph-orin_nano.json)<br/><br/><br/>36 ms @ 30Hz<br/><br/> | [488 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_detectnet_graph-nuc_4060ti.json)<br/><br/><br/>10 ms @ 30Hz<br/><br/> | [589 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_detectnet_graph-x86_4090.json)<br/><br/><br/>10 ms @ 30Hz<br/><br/> |
66+
| Sample Graph<br/><br/> | Input Size<br/><br/> | AGX Orin<br/><br/> | Orin NX<br/><br/> | Orin Nano 8GB<br/><br/> | x86_64 w/ RTX 4090<br/><br/> |
67+
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|
68+
| [RT-DETR Object Detection Graph](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/benchmarks/isaac_ros_rtdetr_benchmark/scripts/isaac_ros_rtdetr_graph.py)<br/><br/><br/>SyntheticaDETR<br/><br/> | 720p<br/><br/><br/><br/> | [56.5 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_rtdetr_graph-agx_orin.json)<br/><br/><br/>30 ms @ 30Hz<br/><br/> | [33.8 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_rtdetr_graph-orin_nx.json)<br/><br/><br/>39 ms @ 30Hz<br/><br/> | [24.1 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_rtdetr_graph-orin_nano.json)<br/><br/><br/>53 ms @ 30Hz<br/><br/> | [490 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_rtdetr_graph-x86-4090.json)<br/><br/><br/>7.1 ms @ 30Hz<br/><br/> |
69+
| [DetectNet Object Detection Graph](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/benchmarks/isaac_ros_detectnet_benchmark/scripts/isaac_ros_detectnet_graph.py)<br/><br/><br/><br/> | 544p<br/><br/><br/><br/> | [70.5 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_detectnet_graph-agx_orin.json)<br/><br/><br/>26 ms @ 30Hz<br/><br/> | [30.1 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_detectnet_graph-orin_nx.json)<br/><br/><br/>46 ms @ 30Hz<br/><br/> | [22.9 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_detectnet_graph-orin_nano.json)<br/><br/><br/>57 ms @ 30Hz<br/><br/> | [254 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_detectnet_graph-x86-4090.json)<br/><br/><br/>11 ms @ 30Hz<br/><br/> |
7070

7171
---
7272

@@ -97,4 +97,4 @@ Please visit the [Isaac ROS Documentation](https://nvidia-isaac-ros.github.io/re
9797

9898
## Latest
9999

100-
Update 2024-09-26: Update for ZED compatibility
100+
Update 2024-12-10: Update to be compatible with JetPack 6.1

gxf_isaac_detectnet/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,10 @@ set_target_properties(${PROJECT_NAME} PROPERTIES
6363
# Install the binary file
6464
install(TARGETS ${PROJECT_NAME} DESTINATION share/${PROJECT_NAME}/gxf/lib)
6565

66+
67+
# Embed versioning information into installed files
68+
ament_index_get_resource(ISAAC_ROS_COMMON_CMAKE_PATH isaac_ros_common_cmake_path isaac_ros_common)
69+
include("${ISAAC_ROS_COMMON_CMAKE_PATH}/isaac_ros_common-version-info.cmake")
70+
generate_version_info(${PROJECT_NAME})
71+
6672
ament_auto_package(INSTALL_TO_SHARE)

gxf_isaac_detectnet/gxf/detectnet/detectnet.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@
1414
// limitations under the License.
1515
//
1616
// SPDX-License-Identifier: Apache-2.0
17+
1718
#include <string>
19+
#include <vector>
1820

21+
#include "detectnet/detectnet_decoder.hpp"
1922
#include "gxf/core/gxf.h"
2023
#include "gxf/std/extension_factory_helper.hpp"
21-
#include "detectnet/detectnet_decoder.hpp"
2224

2325
extern "C" {
2426

gxf_isaac_detectnet/gxf/detectnet/detectnet_decoder.cpp

Lines changed: 33 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,21 @@
1515
//
1616
// SPDX-License-Identifier: Apache-2.0
1717

18-
#include "detectnet_decoder.hpp"
19-
#include "detection2_d_array_message.hpp"
20-
21-
#include <string>
2218
#include <climits>
19+
#include <memory>
20+
#include <string>
21+
#include <vector>
22+
23+
#include "./detection2_d_array_message.hpp"
24+
#include "./detectnet_decoder.hpp"
25+
26+
#include "cuda.h"
27+
#include "cuda_runtime.h"
2328

29+
#include "gxf/core/parameter_parser_std.hpp"
2430
#include "gxf/multimedia/camera.hpp"
2531
#include "gxf/multimedia/video.hpp"
26-
#include "gxf/core/parameter_parser_std.hpp"
2732
#include "gxf/std/timestamp.hpp"
28-
#include "cuda.h"
29-
#include "cuda_runtime.h"
3033

3134

3235
namespace nvidia
@@ -67,10 +70,10 @@ NvDsInferObjectDetectionInfo GetNewDetectionInfo(
6770
}
6871

6972
void FillMessage(
70-
Detection2DParts &message_parts,
71-
const std::vector<NvDsInferObjectDetectionInfo> &detection_info_vector,
73+
Detection2DParts& message_parts,
74+
const std::vector<NvDsInferObjectDetectionInfo>& detection_info_vector,
7275
gxf::Handle<nvidia::gxf::Timestamp> tensorlist_timestamp,
73-
size_t num_detections, const std::vector<std::string> &label_list)
76+
size_t num_detections, const std::vector<std::string>& label_list)
7477
{
7578
for (uint32_t i = 0; i < num_detections; i++) {
7679
NvDsInferObjectDetectionInfo detection_info = detection_info_vector[i];
@@ -89,7 +92,7 @@ void FillMessage(
8992
}
9093
*(message_parts.timestamp) = *tensorlist_timestamp;
9194
}
92-
} // anonymous namespace
95+
} // anonymous namespace
9396

9497

9598
gxf_result_t DetectnetDecoder::registerInterface(gxf::Registrar * registrar) noexcept
@@ -106,8 +109,8 @@ gxf_result_t DetectnetDecoder::registerInterface(gxf::Registrar * registrar) noe
106109

107110
result &= registrar->parameter(
108111
label_list_, "label_list", "List of network labels",
109-
"List of labels corresponding to the int labels received from the tensors", {"person", "bag",
110-
"face"});
112+
"List of labels corresponding to the int labels received from the tensors",
113+
{"person", "bag", "face"});
111114

112115
result &= registrar->parameter(
113116
enable_confidence_threshold_, "enable_confidence_threshold", "Enable Confidence Threshold",
@@ -131,27 +134,27 @@ gxf_result_t DetectnetDecoder::registerInterface(gxf::Registrar * registrar) noe
131134

132135
result &= registrar->parameter(
133136
dbscan_confidence_threshold_, "dbscan_confidence_threshold", "Dbscan Confidence Threshold",
134-
"Minimum score in a cluster for the cluster to be considered an object \
135-
during grouping. Different clustering may cause the algorithm \
136-
to use different scores.",
137+
"Minimum score in a cluster for the cluster to be considered an object "
138+
"during grouping. Different clustering may cause the algorithm "
139+
"to use different scores.",
137140
0.6);
138141

139142
result &= registrar->parameter(
140143
dbscan_eps_, "dbscan_eps", "Dbscan Epsilon",
141-
"Holds the epsilon to control merging of overlapping boxes. \
142-
Refer to OpenCV groupRectangles and DBSCAN documentation for more information on epsilon. ",
144+
"Holds the epsilon to control merging of overlapping boxes. "
145+
"Refer to OpenCV groupRectangles and DBSCAN documentation for more information on epsilon. ",
143146
0.01);
144147

145148
result &= registrar->parameter(
146149
dbscan_min_boxes_, "dbscan_min_boxes", "Dbscan Minimum Boxes",
147-
"Holds the minimum number of boxes in a cluster to be considered \
148-
an object during grouping using DBSCAN",
150+
"Holds the minimum number of boxes in a cluster to be considered "
151+
"an object during grouping using DBSCAN",
149152
1);
150153

151154
result &= registrar->parameter(
152155
dbscan_enable_athr_filter_, "dbscan_enable_athr_filter", "Dbscan Enable Athr Filter",
153-
"true enables the area-to-hit ratio (ATHR) filter. \
154-
The ATHR is calculated as: ATHR = sqrt(clusterArea) / nObjectsInCluster.",
156+
"true enables the area-to-hit ratio (ATHR) filter. "
157+
"The ATHR is calculated as: ATHR = sqrt(clusterArea) / nObjectsInCluster.",
155158
0);
156159

157160
result &= registrar->parameter(
@@ -196,7 +199,6 @@ gxf_result_t DetectnetDecoder::start() noexcept
196199

197200
gxf_result_t DetectnetDecoder::tick() noexcept
198201
{
199-
200202
gxf::Expected<void> result;
201203

202204
// Receive disparity image and left/right camera info
@@ -272,9 +274,10 @@ gxf_result_t DetectnetDecoder::tick() noexcept
272274
return GXF_FAILURE;
273275
}
274276

275-
float bbox_tensor_arr[bbox_tensor->size() / sizeof(float)]; // since data in tensor is kFloat32
277+
// data in tensor is kFloat32
278+
std::vector<float> bbox_tensor_arr(bbox_tensor->size() / sizeof(float));
276279
const cudaError_t cuda_error_bbox_tensor = cudaMemcpy(
277-
&bbox_tensor_arr, bbox_tensor->pointer(),
280+
bbox_tensor_arr.data(), bbox_tensor->pointer(),
278281
bbox_tensor->size(), cudaMemcpyDeviceToHost);
279282
if (cuda_error_bbox_tensor != cudaSuccess) {
280283
GXF_LOG_ERROR("Error while copying kernel: %s", cudaGetErrorString(cuda_error_bbox_tensor));
@@ -315,8 +318,8 @@ gxf_result_t DetectnetDecoder::tick() noexcept
315318
float coverage = cov_tensor_arr[cov_pos];
316319

317320
// Center of the grid in pixels
318-
float grid_center_y = (row + bounding_box_offset_ ) * kStride;
319-
float grid_center_x = (col + bounding_box_offset_ ) * kStride;
321+
float grid_center_y = (row + bounding_box_offset_) * kStride;
322+
float grid_center_x = (col + bounding_box_offset_) * kStride;
320323

321324
// Get each element of the bounding box
322325
float bbox[kBoundingBoxParams];
@@ -342,7 +345,8 @@ gxf_result_t DetectnetDecoder::tick() noexcept
342345
// check if object_class is out of range for label_list_
343346
if (static_cast<size_t>(object_class) >= label_list_.get().size()) {
344347
GXF_LOG_ERROR(
345-
"[DetectNet Decoder] object_class %i is out of range for provided label_list_ of size %lu", object_class,
348+
"[DetectNet Decoder] object_class %i is out of range for provided "
349+
"label_list_ of size %lu", object_class,
346350
label_list_.get().size());
347351
return GXF_FAILURE;
348352
}
@@ -360,7 +364,7 @@ gxf_result_t DetectnetDecoder::tick() noexcept
360364

361365
size_t num_detections = detection_info_vector.size();
362366
if (enable_dbscan_clustering_) {
363-
NvDsInferObjectDetectionInfo * detection_info_pointer = &detection_info_vector[0];
367+
NvDsInferObjectDetectionInfo* detection_info_pointer = &detection_info_vector[0];
364368
NvDsInferDBScanHandle dbscan_hdl = NvDsInferDBScanCreate();
365369
if (dbscan_clustering_algorithm_ == kDbscanCluster) {
366370
NvDsInferDBScanCluster(dbscan_hdl, &params_, detection_info_pointer, &num_detections);
@@ -386,7 +390,6 @@ gxf_result_t DetectnetDecoder::tick() noexcept
386390
num_detections, label_list_);
387391
return detections_transmitter_->publish(message_parts.message);
388392
}));
389-
390393
}
391394
} // namespace isaac_ros
392395
} // namespace nvidia

gxf_isaac_detectnet/gxf/detectnet/detectnet_decoder.hpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,19 @@
1818
#ifndef NVIDIA_ISAAC_ROS_EXTENSIONS_DETECTNET_DECODER_HPP_
1919
#define NVIDIA_ISAAC_ROS_EXTENSIONS_DETECTNET_DECODER_HPP_
2020

21+
#include <string>
22+
#include <vector>
23+
24+
#include "./detection2_d_array_message.hpp"
25+
#include "deepstream_utils/nvdsinferutils/dbscan/nvdsinfer_dbscan.hpp"
26+
2127
#include "gxf/core/entity.hpp"
2228
#include "gxf/core/gxf.h"
2329
#include "gxf/core/parameter.hpp"
24-
#include "gxf/std/codelet.hpp"
2530
#include "gxf/core/parameter_parser_std.hpp"
31+
#include "gxf/std/codelet.hpp"
2632
#include "gxf/std/receiver.hpp"
2733
#include "gxf/std/transmitter.hpp"
28-
#include "detection2_d_array_message.hpp"
29-
#include "deepstream_utils/nvdsinferutils/dbscan/nvdsinfer_dbscan.hpp"
3034

3135

3236
namespace nvidia

gxf_isaac_detectnet/package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ SPDX-License-Identifier: Apache-2.0
2121
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
2222
<package format="3">
2323
<name>gxf_isaac_detectnet</name>
24-
<version>3.1.0</version>
24+
<version>3.2.0</version>
2525
<description>Detectnet GXF extension.</description>
2626

2727
<maintainer email="[email protected]">Isaac ROS Maintainers</maintainer>

isaac_ros_detectnet/CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ if(BUILD_TESTING)
4747
endif()
4848

4949
find_package(launch_testing_ament_cmake REQUIRED)
50-
add_launch_test(test/isaac_ros_detectnet_pol_test.py TIMEOUT "600")
50+
add_launch_test(test/isaac_ros_detectnet_pol_test.py TIMEOUT "900")
5151
endif()
5252

5353
# Visualizer python scripts
@@ -63,4 +63,10 @@ install(DIRECTORY
6363
DESTINATION share/${PROJECT_NAME}
6464
)
6565

66+
67+
# Embed versioning information into installed files
68+
ament_index_get_resource(ISAAC_ROS_COMMON_CMAKE_PATH isaac_ros_common_cmake_path isaac_ros_common)
69+
include("${ISAAC_ROS_COMMON_CMAKE_PATH}/isaac_ros_common-version-info.cmake")
70+
generate_version_info(${PROJECT_NAME})
71+
6672
ament_auto_package(INSTALL_TO_SHARE config launch)

isaac_ros_detectnet/config/hawk_config.pbtxt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@ platform: "tensorrt_plan"
33
max_batch_size: 16
44
input [
55
{
6-
name: "input_1"
6+
name: "input_1:0"
77
data_type: TYPE_FP32
88
format: FORMAT_NCHW
99
dims: [ 3, 1200, 1920 ]
1010
}
1111
]
1212
output [
1313
{
14-
name: "output_bbox/BiasAdd"
14+
name: "output_bbox/BiasAdd:0"
1515
data_type: TYPE_FP32
1616
dims: [ 12, 75, 120]
1717
},
1818
{
19-
name: "output_cov/Sigmoid"
19+
name: "output_cov/Sigmoid:0"
2020
data_type: TYPE_FP32
2121
dims: [ 3, 75, 120]
2222
}

isaac_ros_detectnet/config/isaac_sim_config.pbtxt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,20 @@ platform: "tensorrt_plan"
33
max_batch_size: 16
44
input [
55
{
6-
name: "input_1"
6+
name: "input_1:0"
77
data_type: TYPE_FP32
88
format: FORMAT_NCHW
99
dims: [ 3, 720, 1280 ]
1010
}
1111
]
1212
output [
1313
{
14-
name: "output_bbox/BiasAdd"
14+
name: "output_bbox/BiasAdd:0"
1515
data_type: TYPE_FP32
1616
dims: [ 12, 45, 80]
1717
},
1818
{
19-
name: "output_cov/Sigmoid"
19+
name: "output_cov/Sigmoid:0"
2020
data_type: TYPE_FP32
2121
dims: [ 3, 45, 80]
2222
}

isaac_ros_detectnet/config/peoplenet_config.pbtxt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,22 @@ platform: "tensorrt_plan"
33
max_batch_size: 16
44
input [
55
{
6-
name: "input_1"
6+
name: "input_1:0"
77
data_type: TYPE_FP32
88
format: FORMAT_NCHW
9-
dims: [ 3, 544, 960 ]
9+
dims: [ 3, 544, 960]
1010
}
1111
]
1212
output [
1313
{
14-
name: "output_bbox/BiasAdd"
14+
name: "output_bbox/BiasAdd:0"
1515
data_type: TYPE_FP32
16-
dims: [ 12, 34, 60 ]
16+
dims: [ 12, 34, 60]
1717
},
1818
{
19-
name: "output_cov/Sigmoid"
19+
name: "output_cov/Sigmoid:0"
2020
data_type: TYPE_FP32
21-
dims: [ 3, 34, 60 ]
21+
dims: [ 3, 34, 60]
2222
}
2323
]
2424
dynamic_batching { }

0 commit comments

Comments
 (0)