From 6fe28fb126de9b4212988219a1fbd6db46cccbbe Mon Sep 17 00:00:00 2001 From: Jaiveer Singh Date: Thu, 25 May 2023 18:39:03 -0700 Subject: [PATCH] Isaac ROS 0.31.0 (DP3.1) --- README.md | 10 +++++--- .../config/detectnet_node.yaml | 25 +++++++++++-------- .../gxf/detectnet/detectnet_decoder.cpp | 1 + isaac_ros_detectnet/package.xml | 2 +- .../src/detectnet_decoder_node.cpp | 4 +-- 5 files changed, 24 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 530d27b..de17606 100644 --- a/README.md +++ b/README.md @@ -30,9 +30,10 @@ This package is powered by [NVIDIA Isaac Transport for ROS (NITROS)](https://dev The performance results of benchmarking the prepared pipelines in this package on supported platforms are below: -| Pipeline | AGX Orin | Orin Nano | x86_64 w/ RTX 3060 Ti | -| -------------------------- | ------------------ | ---------------- | --------------------- | -| Isaac ROS Detectnet (544p) | 225 fps
7.7ms | 72 fps
18ms | 450 fps
3.2ms | +| Sample Graph | Input Size | AGX Orin | Orin NX | Orin Nano 8GB | x86_64 w/ RTX 4060 Ti | +| --------------------------------------------------------------------------------------------------------------------------------------------------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------- | +| [DetectNet Object Detection Graph](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/scripts//isaac_ros_detectnet_graph.py) | 544p | [252 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_detectnet_graph-agx_orin.json)
8.7 ms | [110 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_detectnet_graph-orin_nx.json)
13 ms | [77.9 fps](https://github.com/NVIDIA-ISAAC-ROS/isaac_ros_benchmark/blob/main/results/isaac_ros_detectnet_graph-orin_nano_emul.json)
18 ms | -- | + > **Note**: These numbers are reported with defaults parameter values found in [params.yaml](./isaac_ros_detectnet/config/params.yaml). @@ -81,7 +82,7 @@ To run the DetectNet object detection inference, the following ROS 2 nodes shoul ## Latest Update -Update 2023-04-05: Source available GXF extensions +Update 2023-05-25: Performance improvements. ## Supported Platforms @@ -249,6 +250,7 @@ For solutions to problems with using DNN models, please check [here](https://git | Date | Changes | | ---------- | ------------------------------------------------------------------------------------- | +| 2023-05-25 | Performance improvements | | 2023-04-05 | Source available GXF extensions | | 2022-10-19 | Updated OSS licensing | | 2022-08-31 | Update to use NITROS for improved performance and to be compatible with JetPack 5.0.2 | diff --git a/isaac_ros_detectnet/config/detectnet_node.yaml b/isaac_ros_detectnet/config/detectnet_node.yaml index b25eec7..8a47472 100644 --- a/isaac_ros_detectnet/config/detectnet_node.yaml +++ b/isaac_ros_detectnet/config/detectnet_node.yaml @@ -1,6 +1,6 @@ %YAML 1.2 # SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES -# Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -58,35 +58,38 @@ components: transmitter: detections_out min_size: 1 --- -name: vault +name: sink components: - name: signal type: nvidia::gxf::DoubleBufferReceiver parameters: - capacity: 1 + capacity: 2 policy: 0 - type: nvidia::gxf::MessageAvailableSchedulingTerm parameters: receiver: signal min_size: 1 -- name: vault - type: nvidia::gxf::Vault +- name: sink + type: nvidia::isaac_ros::MessageRelay parameters: source: signal - max_waiting_count: 1 - drop_waiting: false --- components: - name: edge0 type: nvidia::gxf::Connection parameters: source: detectnet_decoder/detections_out - target: vault/signal + target: sink/signal --- components: -- type: nvidia::gxf::GreedyScheduler +- name: clock + type: nvidia::gxf::RealtimeClock +- type: nvidia::gxf::MultiThreadScheduler parameters: clock: clock stop_on_deadlock: false -- name: clock - type: nvidia::gxf::RealtimeClock + check_recession_period_ms: 1 + worker_thread_number: 2 +- type: nvidia::gxf::JobStatistics + parameters: + clock: clock diff --git a/isaac_ros_detectnet/gxf/detectnet/detectnet_decoder.cpp b/isaac_ros_detectnet/gxf/detectnet/detectnet_decoder.cpp index 3f812c8..08645e8 100644 --- a/isaac_ros_detectnet/gxf/detectnet/detectnet_decoder.cpp +++ b/isaac_ros_detectnet/gxf/detectnet/detectnet_decoder.cpp @@ -261,6 +261,7 @@ gxf_result_t DetectnetDecoder::tick() noexcept return GXF_FAILURE; } + // TODO(ashwinvk): Do not copy data to host and perform decoding using cuda // copy memory to host float cov_tensor_arr[cov_tensor->size() / sizeof(float)]; // since data in tensor is kFloat32 const cudaError_t cuda_error_cov_tensor = cudaMemcpy( diff --git a/isaac_ros_detectnet/package.xml b/isaac_ros_detectnet/package.xml index f85e51f..d6ae923 100644 --- a/isaac_ros_detectnet/package.xml +++ b/isaac_ros_detectnet/package.xml @@ -21,7 +21,7 @@ SPDX-License-Identifier: Apache-2.0 isaac_ros_detectnet - 0.30.0 + 0.31.0 DetectNet model processing Ashwin Varghese Kuruttukulam diff --git a/isaac_ros_detectnet/src/detectnet_decoder_node.cpp b/isaac_ros_detectnet/src/detectnet_decoder_node.cpp index 1020b2a..68aed2b 100644 --- a/isaac_ros_detectnet/src/detectnet_decoder_node.cpp +++ b/isaac_ros_detectnet/src/detectnet_decoder_node.cpp @@ -1,5 +1,5 @@ // SPDX-FileCopyrightText: NVIDIA CORPORATION & AFFILIATES -// Copyright (c) 2021-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved. +// Copyright (c) 2021-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -50,7 +50,7 @@ using nvidia::gxf::optimizer::GraphIOGroupSupportedDataTypesInfoList; #define INPUT_DEFAULT_TENSOR_FORMAT_TENSORLIST "nitros_tensor_list_nchw_rgb_f32" #define INPUT_TOPIC_NAME_TENSORLIST "tensor_sub" -#define OUTPUT_COMPONENT_KEY_DETECTIONS "vault/vault" +#define OUTPUT_COMPONENT_KEY_DETECTIONS "sink/sink" #define OUTPUT_DEFAULT_TENSOR_FORMAT_DETECTIONS "nitros_detection2_d_array" #define OUTPUT_TOPIC_NAME_TAG_DETECTIONS "detectnet/detections"