Compute Graph Framework SDK Reference  5.14
dwPointCloudAccumulatorNode.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) 2022-2023 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_POINTCLOUDPROCESSING_DWACCUMULATORNODE_DWPOINTCLOUDACCUMULATORNODE_HPP_
32#define DWFRAMEWORK_DWNODES_POINTCLOUDPROCESSING_DWACCUMULATORNODE_DWPOINTCLOUDACCUMULATORNODE_HPP_
33
34#include <dwshared/dwfoundation/dw/core/logger/Logger.hpp>
35#include <dw/pointcloudprocessing/assembler/PointCloudAssembler.h>
36#include <dw/pointcloudprocessing/motioncompensator/MotionCompensator.h>
37#include <dwcgf/node/Node.hpp>
42#include <dwframework/dwnodes/common/SensorCommonTypes.hpp>
43#include <dwframework/dwnodes/common/channelpackets/EgomotionState.hpp>
44#include <dwframework/dwnodes/common/channelpackets/DwframeworkTypes.hpp>
45#include <dwframework/dwnodes/common/channelpackets/PointCloud.hpp>
46#include <dwframework/dwnodes/common/channelpackets/LidarPointCloud.hpp>
47#include <dwframework/dwnodes/common/channelpackets/SensorCommonTypes.hpp>
48
49namespace dw
50{
51namespace framework
52{
53
55{
56 dwPointCloudAssemblerParams assmParams;
57 dwMotionCompensatorParams compParams;
58 dwLidarProperties lidarProperties;
59 dwEgomotionParameters egomotionParams;
62 cudaStream_t cudaStream;
63};
64
69{
70public:
71 // TODO(csketch): FP -- This is used when the logger is called and not just at assignment.
72 // coverity[autosar_cpp14_a0_1_1_violation] FP: nvbugs/2980283
73 // coverity[autosar_cpp14_m0_1_4_violation] FP: nvbugs/2980283
74 static constexpr char8_t LOG_TAG[]{"dwPointCloudAccumulatorNode"};
75
76 // coverity[autosar_cpp14_a7_1_5_violation] RFD Accepted: TID-1984
77 static constexpr auto describeInputPorts()
78 {
79 // TODO(csketch): RFD -- user defined literal being interpreted as c style cast.
80 // coverity[autosar_cpp14_a5_2_2_violation] RFD Pending: TID-1983
82 DW_DESCRIBE_PORT(dwLidarPacketsArray, "LIDAR_PACKETS_ARRAY"_sv),
83 DW_DESCRIBE_PORT(dwEgomotionStateHandle_t, "EGOMOTION_STATE"_sv),
84 DW_DESCRIBE_PORT(dwSensorNodeProperties, "LIDAR_EXTRINSICS"_sv));
85 };
86 // coverity[autosar_cpp14_a7_1_5_violation] RFD Accepted: TID-1984
87 static constexpr auto describeOutputPorts()
88 {
89 // TODO(csketch): RFD -- user defined literal being interpreted as c style cast.
90 // coverity[autosar_cpp14_a5_2_2_violation] RFD Pending: TID-1983
92 DW_DESCRIBE_PORT(dwLidarPointCloud, "LIDAR_POINT_CLOUD_RAW"_sv),
93 DW_DESCRIBE_PORT(dwLidarPointCloud, "LIDAR_POINT_CLOUD_COMPENSATED"_sv),
94 DW_DESCRIBE_PORT(dwTime_t, "TIMESTAMP"_sv),
95 DW_DESCRIBE_PORT(bool, "POINT_CLOUD_AVAILABLE"_sv));
96 };
97
98 // coverity[autosar_cpp14_a7_1_5_violation] RFD Accepted: TID-1984
99 static constexpr auto describePasses()
100 {
102 describePass(StringView{"SETUP"}, DW_PROCESSOR_TYPE_CPU),
103 describePass(StringView{"PROCESS_ASSM_GPU_ASYNC"}, DW_PROCESSOR_TYPE_GPU),
104 describePass(StringView{"PROCESS_ASSM_CPU_SYNC"}, DW_PROCESSOR_TYPE_CPU),
105 describePass(StringView{"PROCESS_COMP_GPU_ASYNC"}, DW_PROCESSOR_TYPE_GPU),
106 describePass(StringView{"PROCESS_COMP_CPU_SYNC"}, DW_PROCESSOR_TYPE_CPU),
107 describePass(StringView{"TEARDOWN"}, DW_PROCESSOR_TYPE_CPU));
108 };
109
110 // coverity[autosar_cpp14_a7_1_5_violation] RFD Accepted: TID-1984
111 static constexpr auto describeParameters()
112 {
113 // TODO(csketch): RFD -- user defined literal being interpreted as c style cast.
114 // coverity[autosar_cpp14_a5_2_2_violation] RFD Pending: TID-1983
116 dwContextHandle_t>(
119 bool,
120 "enableCuda"_sv,
123 dwMotionCompensatorInterpolationStrategy,
124 "interpolationStrategy"_sv,
125 &dwAccumulatorNodeParams::compParams, &dwMotionCompensatorParams::interpolationStrategy),
127 bool,
128 "outputInRigCoordinates"_sv,
129 &dwAccumulatorNodeParams::compParams, &dwMotionCompensatorParams::outputInRigCoordinates),
131 dwTransformation3f,
133 "sensorId"_sv,
134 &dwAccumulatorNodeParams::compParams, &dwMotionCompensatorParams::pointCloudToRig),
136 dwLidarProperties,
137 "sensorId"_sv,
140 bool,
144 cudaStream_t,
145 "streamIndex"_sv,
149 dwContextHandle_t)));
150 };
151
152 static std::unique_ptr<dwPointCloudAccumulatorNode> create(ParameterProvider& provider);
153
155 const dwContextHandle_t ctx);
156};
157
158} // namespace framework
159} // namespace dw
160
161#endif // DWFRAMEWORK_DWNODES_POINTCLOUDPROCESSING_DWACCUMULATORNODE_DWPOINTCLOUDACCUMULATORNODE_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.
static std::unique_ptr< dwPointCloudAccumulatorNode > create(ParameterProvider &provider)
dwPointCloudAccumulatorNode(const dwAccumulatorNodeParams &paramsPointCloud, const dwContextHandle_t ctx)
constexpr std::tuple describeConstructorArguments()
constexpr auto describeConstructorArgument(const Args &&... args) -> dw::core::Tuple< Args... >
constexpr auto describePassCollection(const Args &&... args) -> std::tuple< Args... >
constexpr auto describePortCollection(Args &&... args) -> dw::core::Tuple< Args... >
constexpr PassDescriptorT< 0 > describePass(dw::core::StringView const &&name, dwProcessorType processorType)
Definition: Buffer.hpp:40