Compute Graph Framework SDK Reference  5.8
dwLidarPointCloudAccumulatorNode.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_LIDARPOINTCLOUDACCUMULATOR_NODE_HPP_
32#define DW_FRAMEWORK_LIDARPOINTCLOUDACCUMULATOR_NODE_HPP_
33
34#include <dwcgf/node/Node.hpp>
40/* Need to include the appropriate ChannelPacketTypes.hpp since port initialization requires
41 the parameter_trait overrides. Otherwise, it will be considered as a packet of generic type. */
43
44#include <dw/pointcloudprocessing/accumulator/PointCloudAccumulator.h>
45
47
48namespace dw
49{
50namespace framework
51{
52
54{
55 dwPointCloudAccumulatorParams pointCloudAccuParams;
57 dwLidarProperties lidarProperties;
58 dwEgomotionParameters egomotionParams;
60 cudaStream_t cudaStream;
61};
62
67{
68public:
69 static constexpr char LOG_TAG[] = "dwLidarPointCloudAccumulatorNode";
70
71 static constexpr auto describeInputPorts()
72 {
74 DW_DESCRIBE_PORT(dwLidarPacketsArray, "LIDAR_PACKETS_ARRAY"_sv),
75 DW_DESCRIBE_PORT(dwEgomotionStateHandle_t, "EGOMOTION_STATE"_sv),
76 DW_DESCRIBE_PORT(dwSensorNodeProperties, "LIDAR_EXTRINSICS"_sv));
77 };
78 static constexpr auto describeOutputPorts()
79 {
81 DW_DESCRIBE_PORT(dwPointCloud, "POINT_CLOUD"_sv, PortBinding::REQUIRED),
82 DW_DESCRIBE_PORT(bool, "POINT_CLOUD_AVAILABLE"_sv, PortBinding::REQUIRED),
83 DW_DESCRIBE_PORT(dwVector2ui, "LIDAR_ACCUMULATOR_SWEEP_SIZE"_sv, PortBinding::REQUIRED));
84 };
85
86 static constexpr auto describePasses()
87 {
89 describePass("SETUP"_sv, DW_PROCESSOR_TYPE_CPU),
90 describePass("PROCESS_GPU_ASYNC"_sv, DW_PROCESSOR_TYPE_GPU),
91 describePass("PROCESS_CPU_SYNC"_sv, DW_PROCESSOR_TYPE_CPU),
92 describePass("TEARDOWN"_sv, DW_PROCESSOR_TYPE_CPU));
93 };
94
95 static constexpr auto describeParameters()
96 {
98 dwContextHandle_t>(
101 dwMemoryType,
102 "memoryType"_sv,
103 &dwPointCloudAccumulatorNodeParams::pointCloudAccuParams, &dwPointCloudAccumulatorParams::memoryType),
105 uint32_t,
106 "outputFormats"_sv,
107 &dwPointCloudAccumulatorNodeParams::pointCloudAccuParams, &dwPointCloudAccumulatorParams::outputFormats),
109 uint32_t,
110 "filterWindowSize"_sv,
111 &dwPointCloudAccumulatorNodeParams::pointCloudAccuParams, &dwPointCloudAccumulatorParams::filterWindowSize),
113 float32_t,
114 "minAngleDegree"_sv,
115 &dwPointCloudAccumulatorNodeParams::pointCloudAccuParams, &dwPointCloudAccumulatorParams::minAngleDegree),
117 float32_t,
118 "maxAngleDegree"_sv,
119 &dwPointCloudAccumulatorNodeParams::pointCloudAccuParams, &dwPointCloudAccumulatorParams::maxAngleDegree),
121 float32_t,
122 "minDistanceMeter"_sv,
123 &dwPointCloudAccumulatorNodeParams::pointCloudAccuParams, &dwPointCloudAccumulatorParams::minDistanceMeter),
125 float32_t,
126 "maxDistanceMeter"_sv,
127 &dwPointCloudAccumulatorNodeParams::pointCloudAccuParams, &dwPointCloudAccumulatorParams::maxDistanceMeter),
129 bool,
130 "enableMotionCompensation"_sv,
131 &dwPointCloudAccumulatorNodeParams::pointCloudAccuParams, &dwPointCloudAccumulatorParams::enableMotionCompensation),
133 bool,
134 "organized"_sv,
135 &dwPointCloudAccumulatorNodeParams::pointCloudAccuParams, &dwPointCloudAccumulatorParams::organized),
137 bool,
138 "enableZeroCrossDetection"_sv,
139 &dwPointCloudAccumulatorNodeParams::pointCloudAccuParams, &dwPointCloudAccumulatorParams::enableZeroCrossDetection),
141 bool,
142 "outputInRigCoordinates"_sv,
143 &dwPointCloudAccumulatorNodeParams::pointCloudAccuParams, &dwPointCloudAccumulatorParams::outputInRigCoordinates),
145 dwTransformation3f,
147 "sensorId"_sv,
148 &dwPointCloudAccumulatorNodeParams::pointCloudAccuParams, &dwPointCloudAccumulatorParams::sensorTransformation),
150 bool,
151 "enableEgomotionCompensation"_sv,
154 dwLidarProperties,
155 "sensorId"_sv,
158 bool,
162 cudaStream_t,
163 "streamIndex"_sv,
167 dwContextHandle_t)));
168 };
169
170 static std::unique_ptr<dwLidarPointCloudAccumulatorNode> create(ParameterProvider& provider);
171
173 const dwContextHandle_t ctx);
174};
175
176} // namespace framework
177} // namespace dw
178
179#endif //DW_FRAMEWORK_LIDARPOINTCLOUDACCUMULATOR_NODE_HPP_
#define DW_DESCRIBE_INDEX_PARAMETER_WITH_SEMANTIC(TYPE_NAME, SEMANTIC_TYPE_NAME, args...)
#define DW_DESCRIBE_INDEX_PARAMETER(TYPE_NAME, args...)
#define DW_DESCRIBE_UNNAMED_PARAMETER_WITH_SEMANTIC(TYPE_NAME, SEMANTIC_TYPE_NAME, args...)
#define DW_DESCRIBE_UNNAMED_PARAMETER(TYPE_NAME, args...)
#define DW_DESCRIBE_PARAMETER(TYPE_NAME, args...)
#define DW_DESCRIBE_PORT(TYPE_NAME, args...)
The interface to access parameter values identified by name and/or (semantic) type.
dwLidarPointCloudAccumulatorNode(const dwPointCloudAccumulatorNodeParams &paramsPointCloud, const dwContextHandle_t ctx)
static std::unique_ptr< dwLidarPointCloudAccumulatorNode > create(ParameterProvider &provider)
constexpr std::tuple describeConstructorArguments()
constexpr auto describePortCollection(Args &&... args)
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)
dwLidarPacketsArray { dwLidarDecodedPacket *packets dwLidarPacketsArray
constexpr auto describePassCollection(const Args &&... args)
Definition: Exception.hpp:47