Compute Graph Framework SDK Reference  5.12
dwRigNode.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-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_DWRIGNODE_DWRIGNODE_HPP_
32#define DWFRAMEWORK_DWNODES_DWRIGNODE_DWRIGNODE_HPP_
33
34#include "dwRigNode_errorid.h"
35
36#include <dw/rig/Rig.h>
37#include <dwcgf/node/Node.hpp>
43#include <dwframework/dwnodes/common/channelpackets/SelfCalibrationTypes.hpp>
44#include <dwframework/dwnodes/common/channelpackets/SensorCommonTypes.hpp>
45
46namespace dw
47{
48namespace framework
49{
50
52{
53 // TODO(hongwang): the serialization will be used later
54 bool serialization;
55
56 dwRigHandle_t rigHandle;
57
59 char8_t const* rigOutputFileName;
60
63
66
67 // sensor type index
68 bool imuSensorEnabled[framework::SELF_CALIBRATION_NODE_MAX_IMUS];
69 std::uint32_t imuSensorRigIndices[framework::SELF_CALIBRATION_NODE_MAX_IMUS];
70 bool cameraSensorEnabled[framework::SELF_CALIBRATION_NODE_MAX_CAMERAS];
71 std::uint32_t cameraSensorRigIndices[framework::SELF_CALIBRATION_NODE_MAX_CAMERAS];
72 bool radarSensorEnabled[framework::SELF_CALIBRATION_NODE_MAX_RADARS];
73 std::uint32_t radarSensorRigIndices[framework::SELF_CALIBRATION_NODE_MAX_RADARS];
74 bool lidarSensorEnabled[framework::SELF_CALIBRATION_NODE_MAX_LIDARS];
75 std::uint32_t lidarSensorRigIndices[framework::SELF_CALIBRATION_NODE_MAX_LIDARS];
76};
77
84{
85public:
86 // coverity[autosar_cpp14_a7_1_5_violation] RFD Accepted: TID-1984
87 static constexpr auto describeInputPorts()
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(dwCalibratedExtrinsics, "IMU_EXTRINSICS"_sv, PortBinding::REQUIRED),
93 DW_DESCRIBE_PORT_ARRAY(dwCalibratedExtrinsics, framework::SELF_CALIBRATION_NODE_MAX_CAMERAS, "CAMERA_EXTRINSICS"_sv, PortBinding::REQUIRED),
94 DW_DESCRIBE_PORT_ARRAY(dwCalibratedExtrinsics, framework::SELF_CALIBRATION_NODE_MAX_RADARS, "RADAR_EXTRINSICS"_sv, PortBinding::REQUIRED),
95 DW_DESCRIBE_PORT_ARRAY(dwCalibratedExtrinsics, framework::SELF_CALIBRATION_NODE_MAX_LIDARS, "LIDAR_EXTRINSICS"_sv, PortBinding::REQUIRED),
96 DW_DESCRIBE_PORT(dwCalibratedWheelRadii, "WHEEL_RADII"_sv, PortBinding::REQUIRED),
97 DW_DESCRIBE_PORT(dwCalibratedSteeringProperties, "FRONT_STEERING_OFFSET"_sv, PortBinding::REQUIRED),
98 DW_DESCRIBE_PORT(dwCalibratedIMUIntrinsics, "IMU_INTRINSICS"_sv, PortBinding::OPTIONAL),
99 DW_DESCRIBE_PORT_ARRAY(dwCameraIntrinsics, framework::SELF_CALIBRATION_NODE_MAX_CAMERAS, "CAMERA_INTRINSICS"_sv, PortBinding::OPTIONAL),
100 DW_DESCRIBE_PORT(bool, "STORE"_sv, PortBinding::OPTIONAL));
101 };
102 // coverity[autosar_cpp14_a7_1_5_violation] RFD Accepted: TID-1984
103 static constexpr auto describeOutputPorts()
104 {
105 // TODO(csketch): RFD -- user defined literal being interpreted as c style cast.
106 // coverity[autosar_cpp14_a5_2_2_violation] RFD Pending: TID-1983
107 return describePortCollection();
108 };
109 // T
110 // coverity[autosar_cpp14_a7_1_5_violation] RFD Accepted: TID-1984
111 static constexpr auto describePasses()
112 {
114 describePass(StringView{"SETUP"}, DW_PROCESSOR_TYPE_CPU),
115 describePass(StringView{"PROCESS"}, DW_PROCESSOR_TYPE_CPU),
116 describePass(StringView{"TEARDOWN"}, DW_PROCESSOR_TYPE_CPU));
117 };
118
119 static std::unique_ptr<dwRigNode> create(ParameterProvider const& provider);
120
121 // coverity[autosar_cpp14_a7_1_5_violation] RFD Accepted: TID-1984
122 static constexpr auto describeParameters()
123 {
124 // TODO(csketch): RFD -- user defined literal being interpreted as c style cast.
125 // coverity[autosar_cpp14_a5_2_2_violation] RFD Pending: TID-1983
126 return describeConstructorArguments<dwRigNodeParams, dwContextHandle_t>(
129 bool,
130 "serialization"_sv,
131 &dwRigNodeParams::serialization),
133 dwRigHandle_t,
136 char8_t const*,
140 char8_t const*,
144 char8_t const*,
148 bool,
150 framework::SELF_CALIBRATION_NODE_MAX_IMUS,
153 uint32_t,
155 framework::SELF_CALIBRATION_NODE_MAX_IMUS,
158 bool,
160 framework::SELF_CALIBRATION_NODE_MAX_CAMERAS,
163 uint32_t,
165 framework::SELF_CALIBRATION_NODE_MAX_CAMERAS,
168 bool,
170 framework::SELF_CALIBRATION_NODE_MAX_RADARS,
173 uint32_t,
175 framework::SELF_CALIBRATION_NODE_MAX_RADARS,
178 bool,
180 framework::SELF_CALIBRATION_NODE_MAX_LIDARS,
183 uint32_t,
185 framework::SELF_CALIBRATION_NODE_MAX_LIDARS,
189 dwContextHandle_t)));
190 };
191
192 dwRigNode(dwRigNodeParams const& params, dwContextHandle_t const ctx);
193 ~dwRigNode() override = default;
194 dwRigNode(const dwRigNode& other) = default;
195 dwRigNode(dwRigNode&& other) = default;
196 dwRigNode& operator=(const dwRigNode&) = default;
198
199 dwStatus preShutdown() override;
200};
201
202} /* namespace framework */
203} /* namespace dw */
204#endif // DWFRAMEWORK_DWNODES_DWRIGNODE_DWRIGNODE_HPP_
#define DW_DESCRIBE_UNNAMED_PARAMETER_WITH_SEMANTIC(TYPE_NAME, SEMANTIC_TYPE_NAME, args...)
#define DW_DESCRIBE_UNNAMED_PARAMETER(TYPE_NAME, args...)
#define DW_DESCRIBE_UNNAMED_ARRAY_PARAMETER_WITH_SEMANTIC(TYPE_NAME, SEMANTIC_TYPE_NAME, ARRAY_SIZE, 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.
dwRigNode receives extrinsic calibrations from sensors in the system, and maintains that state to upd...
Definition: dwRigNode.hpp:84
~dwRigNode() override=default
dwRigNode & operator=(dwRigNode &&)=default
dwRigNode & operator=(const dwRigNode &)=default
dwRigNode(dwRigNodeParams const &params, dwContextHandle_t const ctx)
static std::unique_ptr< dwRigNode > create(ParameterProvider const &provider)
dwRigNode(const dwRigNode &other)=default
dwStatus preShutdown() override
static constexpr auto describeInputPorts()
Definition: dwRigNode.hpp:87
static constexpr auto describeParameters()
Definition: dwRigNode.hpp:122
static constexpr auto describeOutputPorts()
Definition: dwRigNode.hpp:103
static constexpr auto describePasses()
Definition: dwRigNode.hpp:111
dwRigNode(dwRigNode &&other)=default
dwRigNodeParams { bool serialization dwRigNodeParams
Definition: dwRigNode.hpp:54
bool lidarSensorEnabled[framework::SELF_CALIBRATION_NODE_MAX_LIDARS]
Definition: dwRigNode.hpp:74
std::uint32_t radarSensorRigIndices[framework::SELF_CALIBRATION_NODE_MAX_RADARS]
Definition: dwRigNode.hpp:73
char8_t const * rigOutputFileName
Definition: dwRigNode.hpp:59
constexpr auto describeConstructorArgument(const Args &&... args) -> dw::core::Tuple< Args... >
constexpr std::tuple< dw::core::StringView, dwProcessorType > describePass(dw::core::StringView const &&name, dwProcessorType processorType)
bool radarSensorEnabled[framework::SELF_CALIBRATION_NODE_MAX_RADARS]
Definition: dwRigNode.hpp:72
bool cameraSensorEnabled[framework::SELF_CALIBRATION_NODE_MAX_CAMERAS]
Definition: dwRigNode.hpp:70
std::uint32_t lidarSensorRigIndices[framework::SELF_CALIBRATION_NODE_MAX_LIDARS]
Definition: dwRigNode.hpp:75
char8_t const * calibrationOutputFileName
Definition: dwRigNode.hpp:62
std::uint32_t imuSensorRigIndices[framework::SELF_CALIBRATION_NODE_MAX_IMUS]
Definition: dwRigNode.hpp:69
std::uint32_t cameraSensorRigIndices[framework::SELF_CALIBRATION_NODE_MAX_CAMERAS]
Definition: dwRigNode.hpp:71
constexpr auto describePassCollection(const Args &&... args) -> std::tuple< Args... >
constexpr auto describePortCollection(Args &&... args) -> dw::core::Tuple< Args... >
dwRigHandle_t rigHandle
Definition: dwRigNode.hpp:56
char8_t const * calibrationOverlayFileName
Definition: dwRigNode.hpp:65
bool imuSensorEnabled[framework::SELF_CALIBRATION_NODE_MAX_IMUS]
Definition: dwRigNode.hpp:68
Definition: Buffer.hpp:40