Compute Graph Framework SDK Reference  5.10
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 DWFRAMEWORK_DWNODES_DWLIDARPOINTCLOUDACCUMULATORNODE_DWLIDARPOINTCLOUDACCUMULATORNODE_HPP_
32#define DWFRAMEWORK_DWNODES_DWLIDARPOINTCLOUDACCUMULATORNODE_DWLIDARPOINTCLOUDACCUMULATORNODE_HPP_
33
34#include <dw/core/logger/Logger.hpp>
35#include <dw/pointcloudprocessing/accumulator/PointCloudAccumulator.h>
36#include <dwcgf/node/Node.hpp>
45
46namespace dw
47{
48namespace framework
49{
50
52{
53 dwPointCloudAccumulatorParams pointCloudAccuParams;
55 dwLidarProperties lidarProperties;
56 dwEgomotionParameters egomotionParams;
58 cudaStream_t cudaStream;
59};
60
65{
66public:
67 static constexpr char LOG_TAG[] = "dwLidarPointCloudAccumulatorNode";
68
69 static constexpr auto describeInputPorts()
70 {
72 DW_DESCRIBE_PORT(dwLidarPacketsArray, "LIDAR_PACKETS_ARRAY"_sv),
73 DW_DESCRIBE_PORT(dwEgomotionStateHandle_t, "EGOMOTION_STATE"_sv),
74 DW_DESCRIBE_PORT(dwSensorNodeProperties, "LIDAR_EXTRINSICS"_sv));
75 };
76 static constexpr auto describeOutputPorts()
77 {
79 DW_DESCRIBE_PORT(dwPointCloud, "POINT_CLOUD"_sv, PortBinding::REQUIRED),
80 DW_DESCRIBE_PORT(bool, "POINT_CLOUD_AVAILABLE"_sv, PortBinding::REQUIRED),
81 DW_DESCRIBE_PORT(dwVector2ui, "LIDAR_ACCUMULATOR_SWEEP_SIZE"_sv, PortBinding::REQUIRED));
82 };
83
84 static constexpr auto describePasses()
85 {
87 describePass("SETUP"_sv, DW_PROCESSOR_TYPE_CPU),
88 describePass("PROCESS_GPU_ASYNC"_sv, DW_PROCESSOR_TYPE_GPU),
89 describePass("PROCESS_CPU_SYNC"_sv, DW_PROCESSOR_TYPE_CPU),
90 describePass("TEARDOWN"_sv, DW_PROCESSOR_TYPE_CPU));
91 };
92
93 static constexpr auto describeParameters()
94 {
96 dwContextHandle_t>(
99 dwMemoryType,
100 "memoryType"_sv,
101 &dwPointCloudAccumulatorNodeParams::pointCloudAccuParams, &dwPointCloudAccumulatorParams::memoryType),
103 uint32_t,
104 "outputFormats"_sv,
105 &dwPointCloudAccumulatorNodeParams::pointCloudAccuParams, &dwPointCloudAccumulatorParams::outputFormats),
107 uint32_t,
108 "filterWindowSize"_sv,
109 &dwPointCloudAccumulatorNodeParams::pointCloudAccuParams, &dwPointCloudAccumulatorParams::filterWindowSize),
111 float32_t,
112 "minAngleDegree"_sv,
113 &dwPointCloudAccumulatorNodeParams::pointCloudAccuParams, &dwPointCloudAccumulatorParams::minAngleDegree),
115 float32_t,
116 "maxAngleDegree"_sv,
117 &dwPointCloudAccumulatorNodeParams::pointCloudAccuParams, &dwPointCloudAccumulatorParams::maxAngleDegree),
119 float32_t,
120 "minDistanceMeter"_sv,
121 &dwPointCloudAccumulatorNodeParams::pointCloudAccuParams, &dwPointCloudAccumulatorParams::minDistanceMeter),
123 float32_t,
124 "maxDistanceMeter"_sv,
125 &dwPointCloudAccumulatorNodeParams::pointCloudAccuParams, &dwPointCloudAccumulatorParams::maxDistanceMeter),
127 bool,
128 "enableMotionCompensation"_sv,
129 &dwPointCloudAccumulatorNodeParams::pointCloudAccuParams, &dwPointCloudAccumulatorParams::enableMotionCompensation),
131 bool,
132 "organized"_sv,
133 &dwPointCloudAccumulatorNodeParams::pointCloudAccuParams, &dwPointCloudAccumulatorParams::organized),
135 bool,
136 "enableZeroCrossDetection"_sv,
137 &dwPointCloudAccumulatorNodeParams::pointCloudAccuParams, &dwPointCloudAccumulatorParams::enableZeroCrossDetection),
139 bool,
140 "outputInRigCoordinates"_sv,
141 &dwPointCloudAccumulatorNodeParams::pointCloudAccuParams, &dwPointCloudAccumulatorParams::outputInRigCoordinates),
143 dwTransformation3f,
145 "sensorId"_sv,
146 &dwPointCloudAccumulatorNodeParams::pointCloudAccuParams, &dwPointCloudAccumulatorParams::sensorTransformation),
148 bool,
149 "enableEgomotionCompensation"_sv,
152 dwLidarProperties,
153 "sensorId"_sv,
156 bool,
160 cudaStream_t,
161 "streamIndex"_sv,
165 dwContextHandle_t)));
166 };
167
168 static std::unique_ptr<dwLidarPointCloudAccumulatorNode> create(ParameterProvider& provider);
169
171 const dwContextHandle_t ctx);
172};
173
174} // namespace framework
175} // namespace dw
176
177#endif // DWFRAMEWORK_DWNODES_DWLIDARPOINTCLOUDACCUMULATORNODE_DWLIDARPOINTCLOUDACCUMULATORNODE_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)
constexpr auto describeConstructorArgument(const Args &&... args)
constexpr auto describePassCollection(const Args &&... args)
Definition: Buffer.hpp:40