Skip to content

Commit 610c548

Browse files
Merge pull request #27 from NVIDIA-ISAAC-ROS/release-2.0.0
Isaac ROS 2.0.0
2 parents 040c1e8 + 6084afe commit 610c548

37 files changed

+946
-391
lines changed

README.md

Lines changed: 72 additions & 241 deletions
Large diffs are not rendered by default.

docs/tutorial-custom-model.md

Lines changed: 0 additions & 39 deletions
This file was deleted.

docs/tutorial-isaac-sim.md

Lines changed: 0 additions & 53 deletions
This file was deleted.

isaac_ros_detectnet/CMakeLists.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES
2-
# Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
# Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
1515
#
1616
# SPDX-License-Identifier: Apache-2.0
1717

18-
cmake_minimum_required(VERSION 3.23.2)
18+
cmake_minimum_required(VERSION 3.22.1)
1919
project(isaac_ros_detectnet LANGUAGES C CXX)
2020

2121
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
@@ -43,6 +43,12 @@ if(BUILD_TESTING)
4343
find_package(ament_lint_auto REQUIRED)
4444
ament_lint_auto_find_test_dependencies()
4545

46+
47+
# The FindPythonInterp and FindPythonLibs modules are removed
48+
if(POLICY CMP0148)
49+
cmake_policy(SET CMP0148 OLD)
50+
endif()
51+
4652
find_package(launch_testing_ament_cmake REQUIRED)
4753
add_launch_test(test/isaac_ros_detectnet_pol_test.py TIMEOUT "600")
4854
endif()

isaac_ros_detectnet/gxf/detectnet/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ find_package(GXF ${ISAAC_ROS_GXF_VERSION} MODULE REQUIRED
2424
std
2525
)
2626
find_package(isaac_ros_nitros_detection2_d_array_type REQUIRED)
27-
include(YamlCpp)
27+
find_package(yaml-cpp)
2828

2929
# DetectNet extension
3030
add_library(gxf_detectnet SHARED

isaac_ros_detectnet/gxf/detectnet/deepstream_utils/nvdsinfer/include/nvdsinfer.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,11 +287,14 @@ typedef enum
287287
/**
288288
* Holds full dimensions (including batch size) for a layer.
289289
*/
290+
#pragma GCC diagnostic push
291+
#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
290292
typedef struct
291293
{
292294
int batchSize = 0;
293295
NvDsInferDims dims = {0};
294296
} NvDsInferBatchDims;
297+
#pragma GCC diagnostic pop
295298

296299
/**
297300
* Extended structure for bound layer information which additionally includes

isaac_ros_detectnet/gxf/detectnet/detectnet_decoder.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -263,18 +263,18 @@ gxf_result_t DetectnetDecoder::tick() noexcept
263263

264264
// TODO(ashwinvk): Do not copy data to host and perform decoding using cuda
265265
// copy memory to host
266-
float cov_tensor_arr[cov_tensor->size() / sizeof(float)]; // since data in tensor is kFloat32
266+
std::unique_ptr<float[]> cov_tensor_arr(new float[cov_tensor->element_count()]);
267267
const cudaError_t cuda_error_cov_tensor = cudaMemcpy(
268-
&cov_tensor_arr, cov_tensor->pointer(),
268+
cov_tensor_arr.get(), cov_tensor->pointer(),
269269
cov_tensor->size(), cudaMemcpyDeviceToHost);
270270
if (cuda_error_cov_tensor != cudaSuccess) {
271271
GXF_LOG_ERROR("Error while copying kernel: %s", cudaGetErrorString(cuda_error_cov_tensor));
272272
return GXF_FAILURE;
273273
}
274274

275-
float bbox_tensor_arr[bbox_tensor->size() / sizeof(float)]; // since data in tensor is kFloat32
275+
std::unique_ptr<float[]> bbox_tensor_arr(new float[bbox_tensor->element_count()]);
276276
const cudaError_t cuda_error_bbox_tensor = cudaMemcpy(
277-
&bbox_tensor_arr, bbox_tensor->pointer(),
277+
bbox_tensor_arr.get(), bbox_tensor->pointer(),
278278
bbox_tensor->size(), cudaMemcpyDeviceToHost);
279279
if (cuda_error_bbox_tensor != cudaSuccess) {
280280
GXF_LOG_ERROR("Error while copying kernel: %s", cudaGetErrorString(cuda_error_bbox_tensor));
@@ -342,7 +342,7 @@ gxf_result_t DetectnetDecoder::tick() noexcept
342342
// check if object_class is out of range for label_list_
343343
if (static_cast<size_t>(object_class) >= label_list_.get().size()) {
344344
GXF_LOG_ERROR(
345-
"[DetectNet Decoder] object_class %i is out of range for provided label_list_ of size %i", object_class,
345+
"[DetectNet Decoder] object_class %i is out of range for provided label_list_ of size %lu", object_class,
346346
label_list_.get().size());
347347
return GXF_FAILURE;
348348
}
@@ -369,7 +369,7 @@ gxf_result_t DetectnetDecoder::tick() noexcept
369369
} else {
370370
GXF_LOG_ERROR(
371371
"Invalid value for dbscan_clustering_algorithm: %i",
372-
dbscan_clustering_algorithm_);
372+
dbscan_clustering_algorithm_.get());
373373
return GXF_FAILURE;
374374
}
375375
NvDsInferDBScanDestroy(dbscan_hdl);

isaac_ros_detectnet/include/isaac_ros_detectnet/detectnet_decoder_node.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES
2-
// Copyright (c) 2021-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
// Copyright (c) 2021-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
33
//
44
// Licensed under the Apache License, Version 2.0 (the "License");
55
// you may not use this file except in compliance with the License.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES
2+
# Copyright (c) 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

isaac_ros_detectnet/launch/isaac_ros_detectnet.launch.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES
2-
# Copyright (c) 2021-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
# Copyright (c) 2021-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -35,11 +35,16 @@ def generate_launch_description():
3535

3636
encoder_node = ComposableNode(
3737
name='dnn_image_encoder',
38-
package='isaac_ros_dnn_encoders',
38+
package='isaac_ros_dnn_image_encoder',
3939
plugin='nvidia::isaac_ros::dnn_inference::DnnImageEncoderNode',
4040
parameters=[{
41+
'input_image_width': 1200,
42+
'input_image_height': 632,
4143
'network_image_width': 1200,
42-
'network_image_height': 632
44+
'network_image_height': 632,
45+
'image_mean': [0.0, 0.0, 0.0],
46+
'image_stddev': [1.0, 1.0, 1.0],
47+
'enable_padding': False
4348
}],
4449
remappings=[('encoded_tensor', 'tensor_pub')]
4550
)

isaac_ros_detectnet/launch/isaac_ros_detectnet_isaac_sim.launch.py

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES
2-
# Copyright (c) 2021-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
# Copyright (c) 2021-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -33,16 +33,37 @@ def generate_launch_description():
3333
with open(labels_file_path, 'r') as fd:
3434
label_list = fd.read().strip().splitlines()
3535

36+
image_resize_node_left = ComposableNode(
37+
package='isaac_ros_image_proc',
38+
plugin='nvidia::isaac_ros::image_proc::ResizeNode',
39+
name='image_resize_node_left',
40+
parameters=[{
41+
'output_width': 1280,
42+
'output_height': 720,
43+
'encoding_desired': 'rgb8',
44+
}],
45+
remappings=[
46+
('camera_info', 'front_stereo_camera/left_rgb/camerainfo'),
47+
('image', 'front_stereo_camera/left_rgb/image_raw'),
48+
('resize/camera_info', 'front_stereo_camera/left_rgb/camerainfo_resize'),
49+
('resize/image', 'front_stereo_camera/left_rgb/image_resize')]
50+
)
51+
3652
encoder_node = ComposableNode(
3753
name='dnn_image_encoder',
38-
package='isaac_ros_dnn_encoders',
54+
package='isaac_ros_dnn_image_encoder',
3955
plugin='nvidia::isaac_ros::dnn_inference::DnnImageEncoderNode',
4056
parameters=[{
57+
'input_image_width': 1280,
58+
'input_image_height': 720,
4159
'network_image_width': 1280,
42-
'network_image_height': 720
60+
'network_image_height': 720,
61+
'image_mean': [0.0, 0.0, 0.0],
62+
'image_stddev': [1.0, 1.0, 1.0],
63+
'enable_padding': False
4364
}],
4465
remappings=[('encoded_tensor', 'tensor_pub'),
45-
('image', 'rgb_left')]
66+
('image', 'front_stereo_camera/left_rgb/image_resize')]
4667
)
4768

4869
triton_node = ComposableNode(
@@ -77,15 +98,15 @@ def generate_launch_description():
7798
package='rclcpp_components',
7899
executable='component_container_mt',
79100
composable_node_descriptions=[
80-
encoder_node, triton_node, detectnet_decoder_node],
101+
image_resize_node_left, encoder_node, triton_node, detectnet_decoder_node],
81102
output='screen'
82103
)
83104

84105
detectnet_visualizer_node = Node(
85106
package='isaac_ros_detectnet',
86107
executable='isaac_ros_detectnet_visualizer.py',
87108
name='detectnet_visualizer',
88-
remappings=[('image', 'rgb_left')]
109+
remappings=[('image', 'front_stereo_camera/left_rgb/image_resize')]
89110

90111
)
91112

isaac_ros_detectnet/launch/isaac_ros_detectnet_quickstart.launch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES
2-
# Copyright (c) 2021-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
# Copyright (c) 2021-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.

isaac_ros_detectnet/package.xml

Lines changed: 2 additions & 2 deletions
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>isaac_ros_detectnet</name>
24-
<version>0.31.0</version>
24+
<version>2.0.0</version>
2525
<description>DetectNet model processing</description>
2626

2727
<maintainer email="[email protected]">Ashwin Varghese Kuruttukulam</maintainer>
@@ -44,7 +44,7 @@ SPDX-License-Identifier: Apache-2.0
4444
<test_depend>ament_lint_auto</test_depend>
4545
<test_depend>ament_lint_common</test_depend>
4646
<test_depend>isaac_ros_test</test_depend>
47-
<test_depend>isaac_ros_dnn_encoders</test_depend>
47+
<test_depend>isaac_ros_dnn_image_encoder</test_depend>
4848
<test_depend>isaac_ros_triton</test_depend>
4949

5050
<export>
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: "peoplenet"
2+
platform: "tensorrt_plan"
3+
max_batch_size: 16
4+
input [
5+
{
6+
name: "input_1"
7+
data_type: TYPE_FP32
8+
format: FORMAT_NCHW
9+
dims: [ 3, 544, 960 ]
10+
}
11+
]
12+
output [
13+
{
14+
name: "output_bbox/BiasAdd"
15+
data_type: TYPE_FP32
16+
dims: [ 12, 34, 60 ]
17+
},
18+
{
19+
name: "output_cov/Sigmoid"
20+
data_type: TYPE_FP32
21+
dims: [ 3, 34, 60 ]
22+
}
23+
]
24+
dynamic_batching { }
25+
version_policy: {
26+
specific {
27+
versions: [ 1 ]
28+
}
29+
}

isaac_ros_detectnet/scripts/isaac_ros_detectnet_visualizer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python3
22

33
# SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES
4-
# Copyright (c) 2021-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
4+
# Copyright (c) 2021-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
55
#
66
# Licensed under the Apache License, Version 2.0 (the "License");
77
# you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)