Compute Graph Framework SDK Reference  5.8
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 DW_FRAMEWORK_POINTCLOUD_STITCHERNODE_NODE_HPP_
32#define DW_FRAMEWORK_POINTCLOUD_STITCHERNODE_NODE_HPP_
33
34#include <dwcgf/node/Node.hpp>
38#include <dwcgf/port/Port.hpp>
42/* Need to include the appropriate ChannelPacketTypes.hpp since port initialization requires
43 the parameter_trait overrides. Otherwise, it will be considered as a packet of generic type. */
45#include <dw/pointcloudprocessing/stitcher/PointCloudStitcher.h>
46
47namespace dw
48{
49namespace framework
50{
51
53{
57 dwMemoryType memoryType;
58 dwPointCloudFormat outputFormat;
59
60 cudaStream_t stream;
61};
62
63template <>
64struct EnumDescription<dwPointCloudFormat>
65{
66 static constexpr auto get()
67 {
68 return describeEnumeratorCollection<dwPointCloudFormat>(
69 DW_DESCRIBE_C_ENUMERATOR(DW_POINTCLOUD_FORMAT_XYZI),
70 DW_DESCRIBE_C_ENUMERATOR(DW_POINTCLOUD_FORMAT_RTHI));
71 }
72};
73
74template <>
75struct EnumDescription<dwMemoryType>
76{
77 static constexpr auto get()
78 {
79 return describeEnumeratorCollection<dwMemoryType>(
80 DW_DESCRIBE_C_ENUMERATOR(DW_MEMORY_TYPE_CUDA),
81 DW_DESCRIBE_C_ENUMERATOR(DW_MEMORY_TYPE_CPU),
82 DW_DESCRIBE_C_ENUMERATOR(DW_MEMORY_TYPE_PINNED));
83 }
84};
85
90{
91public:
92 static constexpr char LOG_TAG[] = "dwLidarPointCloudStitcherNode";
93
94 static constexpr auto describeInputPorts()
95 {
96 using namespace dw::framework;
98 DW_DESCRIBE_PORT_ARRAY(dwPointCloud, MAX_LIDAR_STITCHER_PORT_NUM, "LIDAR_PACKETS"_sv),
100 DW_DESCRIBE_PORT(dwEgomotionStateHandle_t, "EGOMOTION_STATE"_sv));
101 };
102
103 static constexpr auto describeOutputPorts()
104 {
105 using namespace dw::framework;
107 DW_DESCRIBE_PORT(dwPointCloud, "POINT_CLOUD"_sv));
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 //DW_FRAMEWORK_LIDAR_POINTCLOUD_ACCUMULATOR_NODE_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)
dwSensorNodeProperties { uint64_t sensorId dwSensorNodeProperties
constexpr auto describeConstructorArgument(const Args &&... args)
constexpr auto describePassCollection(const Args &&... args)
Definition: Exception.hpp:47