Skip to content

Commit d9c5d4b

Browse files
authored
Merge pull request #30 from NVIDIA-ISAAC-ROS/release-dp3.1
Isaac ROS 0.31.0 (DP3.1)
2 parents 1b50d8c + 17967fd commit d9c5d4b

File tree

11 files changed

+55
-51
lines changed

11 files changed

+55
-51
lines changed

README.md

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

2727
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.
2828

29-
| Sample Graph | Input Size | AGX Orin | Orin NX | Orin Nano 8GB | x86_64 w/ RTX 3060 Ti |
30-
| -------------------------------------------------------------------------------------------------------------------------------- | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
31-
| [AprilTag Node](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/scripts//isaac_ros_apriltag_node.py) | 720p | [108 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_apriltag_node-agx_orin.json)<br>11 ms | [65.5 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_apriltag_node-orin_nx.json)<br>17 ms | [47.1 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_apriltag_node-orin_nano_8gb.json)<br>23 ms | [242 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_apriltag_node-x86_64_rtx_3060Ti.json)<br>4.7 ms |
32-
| [AprilTag Graph](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/scripts//isaac_ros_apriltag_graph.py) | 720p | [117 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_apriltag_graph-agx_orin.json)<br>12 ms | [70.5 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_apriltag_graph-orin_nx.json)<br>17 ms | [51.9 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_apriltag_graph-orin_nano_8gb.json)<br>24 ms | [270 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_apriltag_graph-x86_64_rtx_3060Ti.json)<br>5.0 ms |
29+
| Sample Graph | Input Size | AGX Orin | Orin NX | Orin Nano 8GB | x86_64 w/ RTX 4060 Ti |
30+
| -------------------------------------------------------------------------------------------------------------------------------- | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
31+
| [AprilTag Node](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/scripts//isaac_ros_apriltag_node.py) | 720p | [110 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_apriltag_node-agx_orin.json)<br>15 ms | [69.6 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_apriltag_node-orin_nx.json)<br>18 ms | [50.1 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_apriltag_node-orin_nano.json)<br>25 ms | [262 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_apriltag_node-nuc_4060ti.json)<br>9.3 ms |
32+
| [AprilTag Graph](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/scripts//isaac_ros_apriltag_graph.py) | 720p | [143 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_apriltag_graph-agx_orin.json)<br>16 ms | [82.9 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_apriltag_graph-orin_nx.json)<br>22 ms | [58.0 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_apriltag_graph-orin_nano.json)<br>31 ms | [349 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_apriltag_graph-nuc_4060ti.json)<br>11 ms |
3333

3434

3535
## Table of Contents
@@ -62,7 +62,7 @@ The following table summarizes the per-platform performance statistics of sample
6262

6363
## Latest Update
6464

65-
Update 2023-04-05: Source available GXF extensions
65+
Update 2023-05-25: Performance improvements.
6666

6767
## Supported Platforms
6868

@@ -243,6 +243,7 @@ For solutions to problems with Isaac ROS, please check [here](https://github.com
243243

244244
| Date | Changes |
245245
| ---------- | --------------------------------------------------------------------------------------- |
246+
| 2023-05-25 | Performance improvements |
246247
| 2023-04-05 | Source available GXF extensions |
247248
| 2022-10-19 | Updated OSS licensing |
248249
| 2022-08-31 | Update to be compatible with JetPack 5.0.2 |

isaac_ros_apriltag/CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,17 @@ ament_auto_find_build_dependencies()
2828
# Dependencies
2929
find_package(Eigen3 3.3 REQUIRED NO_MODULE)
3030

31-
# nvapriltags (resolve path from ament_index)
32-
ament_index_get_resource(NVAPRILTAGS_RELATIVE_PATH nvapriltags isaac_ros_nitros)
31+
# cuapriltags (resolve path from ament_index)
32+
ament_index_get_resource(CUAPRILTAGS_RELATIVE_PATH cuapriltags isaac_ros_nitros)
3333
ament_index_get_prefix_path(AMENT_INDEX_PREFIX_PATHS)
3434
foreach(PREFIX_PATH IN LISTS AMENT_INDEX_PREFIX_PATHS)
35-
if(EXISTS "${PREFIX_PATH}/${NVAPRILTAGS_RELATIVE_PATH}")
36-
set(NVAPRILTAGS "${PREFIX_PATH}/${NVAPRILTAGS_RELATIVE_PATH}")
35+
if(EXISTS "${PREFIX_PATH}/${CUAPRILTAGS_RELATIVE_PATH}")
36+
set(CUAPRILTAGS "${PREFIX_PATH}/${CUAPRILTAGS_RELATIVE_PATH}")
3737
break()
3838
endif()
3939
endforeach()
4040

41-
message( STATUS "Found nvapriltags at ${NVAPRILTAGS}")
41+
message( STATUS "Found cuapriltags at ${CUAPRILTAGS}")
4242

4343
# ApriltagNode
4444
ament_auto_add_library(apriltag_node SHARED src/apriltag_node.cpp)

isaac_ros_apriltag/config/apriltag_node.yaml

Lines changed: 19 additions & 16 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.
@@ -83,7 +83,7 @@ components:
8383
name: resource
8484
components:
8585
- name: adapter
86-
type: nvidia::cvcore::tensor_ops::ImageAdapter
86+
type: nvidia::isaac::tensor_ops::ImageAdapter
8787
parameters:
8888
message_type: "VideoBuffer"
8989
---
@@ -114,7 +114,7 @@ components:
114114
block_size: 14400000
115115
num_blocks: 40
116116
- name: image_converter
117-
type: nvidia::cvcore::tensor_ops::ConvertColorFormat
117+
type: nvidia::isaac::tensor_ops::ConvertColorFormat
118118
parameters:
119119
output_type: "RGB_U8"
120120
receiver: camera_image_in
@@ -145,7 +145,7 @@ components:
145145
parameters:
146146
receiver: camera_info_in
147147
min_size: 1
148-
148+
149149
- name: camera_image_info_out
150150
type: nvidia::gxf::DoubleBufferTransmitter
151151
parameters:
@@ -169,7 +169,7 @@ components:
169169
- name: april_tags_in
170170
type: nvidia::gxf::DoubleBufferReceiver
171171
parameters:
172-
capacity: 1
172+
capacity: 2
173173
policy: 0
174174
- type: nvidia::gxf::MessageAvailableSchedulingTerm
175175
parameters:
@@ -179,13 +179,13 @@ components:
179179
- name: camera_info_in
180180
type: nvidia::gxf::DoubleBufferReceiver
181181
parameters:
182-
capacity: 1
182+
capacity: 2
183183
policy: 0
184184
- type: nvidia::gxf::MessageAvailableSchedulingTerm
185185
parameters:
186186
receiver: camera_info_in
187187
min_size: 1
188-
188+
189189
- name: april_tags_timestamp_out
190190
type: nvidia::gxf::DoubleBufferTransmitter
191191
parameters:
@@ -203,7 +203,7 @@ components:
203203
camera_model_rx: camera_info_in
204204
tx: april_tags_timestamp_out
205205
---
206-
name: vault
206+
name: sink
207207
components:
208208
- name: signal
209209
type: nvidia::gxf::DoubleBufferReceiver
@@ -214,12 +214,10 @@ components:
214214
parameters:
215215
receiver: signal
216216
min_size: 1
217-
- name: vault
218-
type: nvidia::gxf::Vault
217+
- name: sink
218+
type: nvidia::isaac_ros::MessageRelay
219219
parameters:
220220
source: signal
221-
max_waiting_count: 1
222-
drop_waiting: false
223221
---
224222
components:
225223
- name: edge0
@@ -246,17 +244,22 @@ components:
246244
type: nvidia::gxf::Connection
247245
parameters:
248246
source: timestamp_compositor/april_tags_timestamp_out
249-
target: vault/signal
247+
target: sink/signal
250248
- name: edge5
251249
type: nvidia::gxf::Connection
252250
parameters:
253251
source: image_converter/camera_image_out
254252
target: camera_image_info_compositor/camera_image_in
255253
---
256254
components:
257-
- type: nvidia::gxf::GreedyScheduler
255+
- name: clock
256+
type: nvidia::gxf::RealtimeClock
257+
- type: nvidia::gxf::MultiThreadScheduler
258258
parameters:
259259
clock: clock
260260
stop_on_deadlock: false
261-
- name: clock
262-
type: nvidia::gxf::RealtimeClock
261+
check_recession_period_ms: 1
262+
worker_thread_number: 2
263+
- type: nvidia::gxf::JobStatistics
264+
parameters:
265+
clock: clock

isaac_ros_apriltag/config/image_format_converter_substitution.yaml

Lines changed: 2 additions & 2 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.
@@ -22,7 +22,7 @@ body:
2222
groups:
2323
- entities:
2424
- components:
25-
- type: nvidia::cvcore::tensor_ops::ConvertColorFormat
25+
- type: nvidia::isaac::tensor_ops::ConvertColorFormat
2626
parameters:
2727
output_type: "RGB_U8"
2828
receiver: camera_image_in

isaac_ros_apriltag/config/namespace_injector_rule_apriltag.yaml

Lines changed: 2 additions & 2 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.
@@ -20,5 +20,5 @@ name: Image Proc Namespace Injector Rule
2020
operation: namespace_injector
2121
body:
2222
components:
23-
- type: nvidia::cvcore::tensor_ops::ConvertColorFormat
23+
- type: nvidia::isaac::tensor_ops::ConvertColorFormat
2424
path_parameter_keys: [input_adapter, output_adapter]

isaac_ros_apriltag/gxf/fiducials/CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ find_package(GXF ${ISAAC_ROS_GXF_VERSION} MODULE REQUIRED
3434
)
3535
include(YamlCpp)
3636

37-
# nvApriltag
38-
add_library(nvapriltags STATIC IMPORTED)
37+
# cuApriltags
38+
add_library(cuapriltags STATIC IMPORTED)
3939

4040
execute_process(COMMAND uname -m COMMAND tr -d '\n' OUTPUT_VARIABLE ARCHITECTURE)
4141
message( STATUS "Architecture: ${ARCHITECTURE}" )
@@ -44,7 +44,7 @@ if( ${ARCHITECTURE} STREQUAL "x86_64" )
4444
elseif( ${ARCHITECTURE} STREQUAL "aarch64" )
4545
set(ARCH_GXF_PATH "lib_aarch64_jetpack51")
4646
endif()
47-
set_property(TARGET nvapriltags PROPERTY IMPORTED_LOCATION ${NVAPRILTAGS}/${ARCH_GXF_PATH}/libapril_tagging.a)
47+
set_property(TARGET cuapriltags PROPERTY IMPORTED_LOCATION ${CUAPRILTAGS}/${ARCH_GXF_PATH}/libcuapriltags.a)
4848

4949
# Fiducials extension
5050
add_library(gxf_fiducials SHARED
@@ -56,14 +56,14 @@ target_include_directories(gxf_fiducials
5656
PUBLIC
5757
include
5858
PRIVATE
59-
${NVAPRILTAGS}/nvapriltags
59+
${CUAPRILTAGS}/cuapriltags
6060
${isaac_ros_nitros_april_tag_detection_array_type_INCLUDE_DIRS}
6161
)
6262
target_link_libraries(gxf_fiducials
6363
PRIVATE
6464
Eigen3::Eigen
6565
${isaac_ros_nitros_april_tag_detection_array_type_LIBRARIES}
66-
nvapriltags
66+
cuapriltags
6767
PUBLIC
6868
GXF::cuda
6969
GXF::multimedia

isaac_ros_apriltag/gxf/fiducials/components/cuda_april_tag_detector.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#include <utility>
2222
#include <vector>
2323

24-
#include "nvAprilTags.h"
24+
#include "cuAprilTags.h"
2525
#include "engine/core/image/image.hpp"
2626
#include "engine/gems/image/utils.hpp"
2727
#include "extensions/fiducials/messages/fiducial_message.hpp"
@@ -51,7 +51,7 @@ gxf::Expected<gxf::Tensor> CornersToTensor(const float2 corners[4],
5151

5252
// Converts pose from april tag detection library to Pose3
5353
::isaac::Pose3d DetectionToPose3d(const float translation[3], const float rot_flat[9]) {
54-
// Rotation matrix from nvAprilTags is column major
54+
// Rotation matrix from cuAprilTags is column major
5555
::isaac::Matrix3d rot_matrix;
5656
rot_matrix << rot_flat[0], rot_flat[3], rot_flat[6],
5757
rot_flat[1], rot_flat[4], rot_flat[7],
@@ -66,13 +66,13 @@ ::isaac::Pose3d DetectionToPose3d(const float translation[3], const float rot_fl
6666

6767
struct CudaAprilTagDetector::AprilTagData {
6868
// Handle used to interface with the stereo library.
69-
nvAprilTagsHandle april_tags_handle;
69+
cuAprilTagsHandle april_tags_handle;
7070
// CUDA buffers to store the input image.
71-
nvAprilTagsImageInput_t input_image;
71+
cuAprilTagsImageInput_t input_image;
7272
// Camera intrinsics
73-
nvAprilTagsCameraIntrinsics_t cam_intrinsics;
73+
cuAprilTagsCameraIntrinsics_t cam_intrinsics;
7474
// Output vector of detected Tags
75-
std::vector<nvAprilTagsID_t> tags;
75+
std::vector<cuAprilTagsID_t> tags;
7676
// CUDA stream
7777
cudaStream_t main_stream;
7878
};
@@ -180,18 +180,18 @@ gxf_result_t CudaAprilTagDetector::tick() {
180180

181181
// Run AprilTags detection
182182
uint32_t num_tags;
183-
const int error = nvAprilTagsDetect(impl_->april_tags_handle, &(impl_->input_image),
183+
const int error = cuAprilTagsDetect(impl_->april_tags_handle, &(impl_->input_image),
184184
impl_->tags.data(), &num_tags, max_tags_, impl_->main_stream);
185185
if (error != 0) {
186-
GXF_LOG_ERROR("Call to nvAprilTagsDetect failed with error code %d", error);
186+
GXF_LOG_ERROR("Call to cuAprilTagsDetect failed with error code %d", error);
187187
return GXF_FAILURE;
188188
}
189189

190190
return gxf::ToResultCode(
191191
CreateFiducialListMessage(context(), num_tags)
192192
.map([&](FiducialListMessageParts message) -> gxf::Expected<void> {
193193
for (uint32_t i = 0; i < num_tags; i++) {
194-
const nvAprilTagsID_t& tag = impl_->tags[i];
194+
const cuAprilTagsID_t& tag = impl_->tags[i];
195195
message.info[i].value()->type = FiducialInfo::Type::kAprilTag;
196196
message.info[i].value()->id = tag_family_.get() + "_" + std::to_string(tag.id);
197197
auto keypoints = CornersToTensor(tag.corners, allocator_);
@@ -208,7 +208,7 @@ gxf_result_t CudaAprilTagDetector::tick() {
208208
gxf_result_t CudaAprilTagDetector::stop() {
209209
if (impl_->april_tags_handle != nullptr) {
210210
cudaStreamDestroy(impl_->main_stream);
211-
nvAprilTagsDestroy(impl_->april_tags_handle);
211+
cuAprilTagsDestroy(impl_->april_tags_handle);
212212
}
213213
return GXF_SUCCESS;
214214
}
@@ -229,7 +229,7 @@ gxf::Expected<void> CudaAprilTagDetector::createAprilTagDetector(
229229
// Create AprilTags detector instance and get handle
230230
const int error = nvCreateAprilTagsDetector(&(impl_->april_tags_handle),
231231
intrinsics->dimensions.x, intrinsics->dimensions.y,
232-
nvAprilTagsFamily::NVAT_TAG36H11,
232+
cuAprilTagsFamily::NVAT_TAG36H11,
233233
&(impl_->cam_intrinsics), tag_dimensions_);
234234
if (error != 0) {
235235
GXF_LOG_ERROR("Call to nvCreateAprilTagsDetector failed with error code %d", error);

isaac_ros_apriltag/gxf/fiducials/fiducials.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ GXF_EXT_FACTORY_ADD_0(0xe91d3fa6a42b85ff, 0x966f4e80c607ca9e,
3030

3131
GXF_EXT_FACTORY_ADD(0xeacaaee8b4f923b8, 0xc5c90679ce99113c,
3232
nvidia::isaac::CudaAprilTagDetector, nvidia::gxf::Codelet,
33-
"Detects AprilTags in images with nvAprilTags library.");
33+
"Detects AprilTags in images with cuAprilTags library.");
3434

3535
GXF_EXT_FACTORY_END()

isaac_ros_apriltag/gxf/fiducials/include/extensions/fiducials/components/cuda_april_tag_detector.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
namespace nvidia {
2929
namespace isaac {
3030

31-
// Detects AprilTags in images with nvAprilTags library
31+
// Detects AprilTags in images with cuAprilTags library
3232
class CudaAprilTagDetector : public gxf::Codelet {
3333
public:
3434
// Explicitly declare constructors and destructors

isaac_ros_apriltag/package.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
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_apriltag</name>
24-
<version>0.30.0</version>
24+
<version>0.31.0</version>
2525
<description>CUDA-accelerated Apriltag detection and pose estimation.</description>
2626

2727
<maintainer email="[email protected]">Hemal Shah</maintainer>

0 commit comments

Comments
 (0)