Compute Graph Framework SDK Reference  5.10
dwLidarPointCloudStitcherNode.hpp
Go to the documentation of this file.
1
2//
3// Notice
4// ALL NVIDIA DESIGN SPECIFICATIONS AND CODE ("MATERIALS") ARE PROVIDED "AS IS" NVIDIA MAKES
5// NO REPRESENTATIONS, WARRANTIES, EXPRESSED, IMPLIED, STATUTORY, OR OTHERWISE WITH RESPECT TO
6// THE MATERIALS, AND EXPRESSLY DISCLAIMS ANY IMPLIED WARRANTIES OF NONINFRINGEMENT,
7// MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8//
9// NVIDIA CORPORATION & AFFILIATES assumes no responsibility for the consequences of use of such
10// information or for any infringement of patents or other rights of third parties that may
11// result from its use. No license is granted by implication or otherwise under any patent
12// or patent rights of NVIDIA CORPORATION & AFFILIATES. No third party distribution is allowed unless
13// expressly authorized by NVIDIA. Details are subject to change without notice.
14// This code supersedes and replaces all information previously supplied.
15// NVIDIA CORPORATION & AFFILIATES products are not authorized for use as critical
16// components in life support devices or systems without express written approval of
17// NVIDIA CORPORATION & AFFILIATES.
18//
19// SPDX-FileCopyrightText: Copyright (c) 2020-2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
20// SPDX-License-Identifier: LicenseRef-NvidiaProprietary
21//
22// NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
23// property and proprietary rights in and to this material, related
24// documentation and any modifications thereto. Any use, reproduction,
25// disclosure or distribution of this material and related documentation
26// without an express license agreement from NVIDIA CORPORATION or
27// its affiliates is strictly prohibited.
28//
30
31#ifndef DWFRAMEWORK_DWNODES_DWLIDARPOINTCLOUDSTITCHERNODE_DWLIDARPOINTCLOUDSTITCHERNODE_HPP_
32#define DWFRAMEWORK_DWNODES_DWLIDARPOINTCLOUDSTITCHERNODE_DWLIDARPOINTCLOUDSTITCHERNODE_HPP_
33
34#include <dw/pointcloudprocessing/stitcher/PointCloudStitcher.h>
35#include <dwcgf/node/Node.hpp>
39#include <dwcgf/port/Port.hpp>
45
46namespace dw
47{
48namespace framework
49{
50
52{
56 dwMemoryType memoryType;
57 dwPointCloudFormat outputFormat;
58
59 cudaStream_t stream;
60};
61
62template <>
63struct EnumDescription<dwPointCloudFormat>
64{
65 static constexpr auto get()
66 {
67 return describeEnumeratorCollection<dwPointCloudFormat>(
68 DW_DESCRIBE_C_ENUMERATOR(DW_POINTCLOUD_FORMAT_XYZI),
69 DW_DESCRIBE_C_ENUMERATOR(DW_POINTCLOUD_FORMAT_RTHI));
70 }
71};
72
73template <>
74struct EnumDescription<dwMemoryType>
75{
76 static constexpr auto get()
77 {
78 return describeEnumeratorCollection<dwMemoryType>(
79 DW_DESCRIBE_C_ENUMERATOR(DW_MEMORY_TYPE_CUDA),
80 DW_DESCRIBE_C_ENUMERATOR(DW_MEMORY_TYPE_CPU),
81 DW_DESCRIBE_C_ENUMERATOR(DW_MEMORY_TYPE_PINNED));
82 }
83};
84
89{
90public:
91 static constexpr char LOG_TAG[] = "dwLidarPointCloudStitcherNode";
92
93 static constexpr auto describeInputPorts()
94 {
95 using namespace dw::framework;
97 DW_DESCRIBE_PORT_ARRAY(dwPointCloud, MAX_LIDAR_STITCHER_PORT_NUM, "LIDAR_PACKETS"_sv),
99 DW_DESCRIBE_PORT(dwEgomotionStateHandle_t, "EGOMOTION_STATE"_sv));
100 };
101
102 static constexpr auto describeOutputPorts()
103 {
104 using namespace dw::framework;
106 DW_DESCRIBE_PORT(dwPointCloud, "POINT_CLOUD"_sv, PortBinding::REQUIRED),
107 DW_DESCRIBE_PORT(dwTime_t, "TARGET_TIMESTAMP"_sv, PortBinding::OPTIONAL));
108 };
109
110 static constexpr auto describePasses()
111 {
113 describePass("SETUP"_sv, DW_PROCESSOR_TYPE_CPU),
114 describePass("PROCESS_GPU"_sv, DW_PROCESSOR_TYPE_GPU),
115 describePass("PROCESS_CPU"_sv, DW_PROCESSOR_TYPE_CPU),
116 describePass("TEARDOWN"_sv, DW_PROCESSOR_TYPE_CPU));
117 };
118
119 static std::unique_ptr<dwLidarPointCloudStitcherNode> create(ParameterProvider& provider);
120
121 static constexpr auto describeParameters()
122 {
123 return describeConstructorArguments<dwLidarPointCloudStitcherNodeParams, dwContextHandle_t>(
126 bool,
131 dwLidarProperties,
135 dwTransformation3f,
140 dwMemoryType,
141 "memoryType"_sv,
144 dwPointCloudFormat,
145 "outputFormat"_sv,
148 cudaStream_t,
149 "stream"_sv,
153 dwContextHandle_t)));
154 }
155
157 dwContextHandle_t ctx);
158};
159}
160}
161
162#endif // DWFRAMEWORK_DWNODES_DWLIDARPOINTCLOUDSTITCHERNODE_DWLIDARPOINTCLOUDSTITCHERNODE_HPP_
#define DW_DESCRIBE_C_ENUMERATOR(NAME)
Syntactic sugar calling describeEnumerator().
#define DW_DESCRIBE_INDEX_PARAMETER(TYPE_NAME, args...)
#define DW_DESCRIBE_UNNAMED_ARRAY_PARAMETER_WITH_SEMANTIC(TYPE_NAME, SEMANTIC_TYPE_NAME, args...)
#define DW_DESCRIBE_UNNAMED_PARAMETER(TYPE_NAME, args...)
#define DW_DESCRIBE_UNNAMED_ARRAY_PARAMETER(TYPE_NAME, args...)
#define DW_DESCRIBE_PARAMETER(TYPE_NAME, args...)
#define DW_DESCRIBE_PORT(TYPE_NAME, args...)
#define DW_DESCRIBE_PORT_ARRAY(TYPE_NAME, ARRAYSIZE, args...)
The interface to access parameter values identified by name and/or (semantic) type.
dwLidarPointCloudStitcherNode(const dwLidarPointCloudStitcherNodeParams &, dwContextHandle_t ctx)
static std::unique_ptr< dwLidarPointCloudStitcherNode > create(ParameterProvider &provider)
static constexpr uint32_t MAX_LIDAR_STITCHER_PORT_NUM
dwLidarProperties lidarProperties[MAX_LIDAR_STITCHER_PORT_NUM]
constexpr auto describePortCollection(Args &&... args)
dwTransformation3f lidar2RigDefault[MAX_LIDAR_STITCHER_PORT_NUM]
constexpr std::tuple< dw::core::StringView, dwProcessorType > describePass(dw::core::StringView const &&name, dwProcessorType processorType)
constexpr auto describeConstructorArgument(const Args &&... args)
constexpr auto describePassCollection(const Args &&... args)
Definition: Buffer.hpp:40