• <xmp id="om0om">
  • <table id="om0om"><noscript id="om0om"></noscript></table>
  • Compute Graph Framework SDK Reference  5.22
    All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
    dwSelfCalibrationSuspensionStateNode.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) 2023-2024 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_SELFCALIBRATION_DWSELFCALIBRATIONSUSPENSIONSTATENODE_DWSELFCALIBRATIONSUSPENSIONSTATENODE_HPP_
    32#define DWFRAMEWORK_DWNODES_SELFCALIBRATION_DWSELFCALIBRATIONSUSPENSIONSTATENODE_DWSELFCALIBRATIONSUSPENSIONSTATENODE_HPP_
    33
    37#include <dwcgf/port/Port.hpp>
    41
    42#include <dwframework/dwnodes/common/channelpackets/EgomotionState.hpp>
    43#include <dwframework/dwnodes/common/channelpackets/FeatureList.hpp>
    44#include <dwframework/dwnodes/common/channelpackets/SelfCalibrationTypes.hpp>
    45#include <dwframework/dwnodes/common/channelpackets/SensorCommonTypes.hpp>
    46#include <dwframework/dwnodes/common/channelpackets/VehicleIOValStructures.hpp>
    47#include <dwframework/dwnodes/common/channelpackets/IMU.hpp>
    48#include <dwframework/dwnodes/common/SelfCalibrationTypes.hpp>
    49#include <dw/core/context/Context.h>
    50
    51namespace dw
    52{
    53namespace framework
    54{
    55
    58{
    59 // These parameters are assigned in describeParameters()
    60 dwConstRigHandle_t rigHandle;
    61
    63
    64 int32_t cameraSensorIndices[SELF_CALIBRATION_NODE_MAX_CAMERAS_FOR_SUSPENSION_STATE];
    65
    67
    68 uint32_t channelFifoSize;
    69 cudaStream_t cudaStreamIndex;
    70
    71 bool sigPresenceSuspensionLevel[SELF_CALIBRATION_NUM_SUSPENSION_LEVEL_SIGNALS];
    76
    77 // This is a WAR to resolve the issue seen in the development of multi-process RoadRunner.
    78 // Details of the issue is available: https://nvbugs/3991262
    80
    81 // These parameters are assigned in create()
    83
    84 int32_t cameraSensorRigIndices[SELF_CALIBRATION_NODE_MAX_CAMERAS_FOR_SUSPENSION_STATE];
    85};
    86
    140{
    141public:
    142 // a valid sensor has non negative a index, define -1 as the UNUSED sensor index
    143 static constexpr int32_t UNUSED_SENSOR_INDEX = -1;
    144
    145 // TODO(sceriani): FP -- This is used when the logger is called and not just at assignment.
    146 // coverity[autosar_cpp14_a0_1_1_violation] FP: nvbugs/2980283
    147 // coverity[autosar_cpp14_m0_1_4_violation] FP: nvbugs/2980283
    148 static constexpr char8_t LOG_TAG[]{"dwSelfCalibrationSuspensionStateNode"};
    149
    150 // coverity[autosar_cpp14_a7_1_5_violation] RFD Accepted: TID-2201
    151 static constexpr auto describeInputPorts()
    152 {
    153 // TODO(sceriani): RFD -- user defined literal being interpreted as c style cast.
    154 // coverity[autosar_cpp14_a5_2_2_violation] RFD Pending: TID-1983
    156 // vehicle
    157 DW_DESCRIBE_PORT(dwVehicleIOQMState, "VEHICLE_IO_QM_STATE"_sv, PortBinding::OPTIONAL),
    158 DW_DESCRIBE_PORT(dwVehicleIOASILStateE2EWrapper, "VEHICLE_IO_ASIL_STATE"_sv, PortBinding::OPTIONAL),
    159 // imu
    160 DW_DESCRIBE_PORT(dwIMUFrame, "IMU_FRAME"_sv, PortBinding::OPTIONAL),
    161 DW_DESCRIBE_PORT(dwCalibratedExtrinsics, "IMU_EXTRINSICS"_sv, PortBinding::OPTIONAL),
    162 // egomotion
    163 DW_DESCRIBE_PORT(dwEgomotionStateHandle_t, "EGOMOTION_STATE_ODO_IMU"_sv, PortBinding::OPTIONAL),
    164 // add camera calibration inputs
    165 DW_DESCRIBE_PORT_ARRAY(dwFeatureHistoryArray, SELF_CALIBRATION_NODE_MAX_CAMERAS_FOR_SUSPENSION_STATE, "CAMERA_FEATURE_DETECTION"_sv, PortBinding::OPTIONAL),
    166 // add camera calibration output (final and intermediate)
    167 DW_DESCRIBE_PORT_ARRAY(dwCalibratedExtrinsics, SELF_CALIBRATION_NODE_MAX_CAMERAS_FOR_SUSPENSION_STATE, "CAMERA_EXTRINSICS"_sv, PortBinding::OPTIONAL),
    168 DW_DESCRIBE_PORT_ARRAY(dwCameraTwoViewTransformation, SELF_CALIBRATION_NODE_MAX_CAMERAS_FOR_SUSPENSION_STATE, "CAMERA_TWO_VIEW_TRANSFORMATION"_sv, PortBinding::OPTIONAL));
    169 };
    170 // coverity[autosar_cpp14_a7_1_5_violation] RFD Accepted: TID-2201
    171 static constexpr auto describeOutputPorts()
    172 {
    173 // TODO(sceriani): RFD -- user defined literal being interpreted as c style cast.
    174 // coverity[autosar_cpp14_a5_2_2_violation] RFD Pending: TID-1983
    176 DW_DESCRIBE_PORT(dwCalibratedSuspensionStateProperties, "SUSPENSION_STATE"_sv, PortBinding::OPTIONAL),
    177 DW_DESCRIBE_PORT(dwSelfCalibrationSuspensionStateDiagnostics, "ROADCAST_SELFCALIBRATION_SUSPENSIONSTATE_DIAGNOSTICS"_sv, PortBinding::OPTIONAL));
    178 };
    179
    180 // coverity[autosar_cpp14_a7_1_5_violation] RFD Accepted: TID-2201
    181 static constexpr auto describePasses()
    182 {
    184 describePass(StringView{"SETUP"}, DW_PROCESSOR_TYPE_CPU),
    185 describePass(StringView{"PROCESS_NONCAMERA_INPUTS"}, DW_PROCESSOR_TYPE_CPU),
    186 describePass(StringView{"PROCESS_SUSPENSIONSTATE_GPU_ASYNC"}, DW_PROCESSOR_TYPE_GPU),
    187 describePass(StringView{"PROCESS_SUSPENSIONSTATE_CPU_SYNC"}, DW_PROCESSOR_TYPE_CPU),
    188 describePass(StringView{"TEARDOWN"}, DW_PROCESSOR_TYPE_CPU));
    189 };
    190
    191 static std::unique_ptr<dwSelfCalibrationSuspensionStateNode> create(ParameterProvider const& provider);
    192
    193 // coverity[autosar_cpp14_a7_1_5_violation] RFD Accepted: TID-2201
    194 static constexpr auto describeParameters()
    195 {
    196 // TODO(sceriani): RFD -- user defined literal being interpreted as c style cast.
    197 // coverity[autosar_cpp14_a5_2_2_violation] RFD Pending: TID-1983
    199 describeConstructorArgument<dwSelfCalibrationSuspensionStateNodeParams>(
    201 dwConstRigHandle_t,
    204 int32_t,
    205 "imuSensorIndex"_sv,
    208 int32_t,
    209 "cameraSensorIndices"_sv,
    210 SELF_CALIBRATION_NODE_MAX_CAMERAS_FOR_SUSPENSION_STATE,
    213 bool,
    214 "enableCalibration"_sv,
    217 uint32_t,
    218 "channelFifoSize"_sv,
    221 cudaStream_t,
    222 "cudaStreamIndex"_sv,
    225 bool,
    226 "sigPresenceSuspensionLevel"_sv, SELF_CALIBRATION_NUM_SUSPENSION_LEVEL_SIGNALS,
    229 bool,
    230 "sigPresenceSuspensionLevelQuality"_sv,
    233 bool,
    234 "sigPresenceSuspensionLevelTimestamp"_sv,
    237 bool,
    238 "sigPresenceSuspensionLevelTimestampQuality"_sv,
    241 bool,
    242 "sigPresenceSuspensionLevelCalibrationState"_sv,
    245 dwTime_t,
    246 "nvSciChannelWaitTimeUs"_sv,
    247 0,
    249 describeConstructorArgument<dwContextHandle_t>(
    251 dwContextHandle_t)));
    252 }
    253
    255};
    256} // namespace framework
    257} // namespace dw
    258
    259#endif // DWFRAMEWORK_DWNODES_SELFCALIBRATION_DWSELFCALIBRATIONSUSPENSIONSTATENODE_DWSELFCALIBRATIONSUSPENSIONSTATENODE_HPP_
    #define DW_DESCRIBE_ARRAY_PARAMETER(TYPE_NAME, PARAM_NAME, ARRAY_SIZE, args...)
    #define DW_DESCRIBE_INDEX_PARAMETER(TYPE_NAME, args...)
    #define DW_DESCRIBE_PARAMETER_WITH_DEFAULT(TYPE_NAME, args...)
    #define DW_DESCRIBE_UNNAMED_PARAMETER(TYPE_NAME, args...)
    #define DW_DESCRIBE_PARAMETER(TYPE_NAME, args...)
    #define DW_DESCRIBE_PORT(TYPE_NAME, NAME, args...)
    #define DW_DESCRIBE_PORT_ARRAY(TYPE_NAME, ARRAYSIZE, NAME, args...)
    The interface to access parameter values identified by name and/or (semantic) type.
    Node that handles the estimation of the suspension state.
    dwSelfCalibrationSuspensionStateNode(dwSelfCalibrationSuspensionStateNodeParams const &param, dwContextHandle_t const ctx)
    static std::unique_ptr< dwSelfCalibrationSuspensionStateNode > create(ParameterProvider const &provider)
    bool sigPresenceSuspensionLevel[SELF_CALIBRATION_NUM_SUSPENSION_LEVEL_SIGNALS]
    Signals if the VIO interface signal suspensionLevel is expected to be provided by the partner VAL cli...
    bool sigPresenceSuspensionLevelCalibrationState
    Signals if the VIO interface signal suspensionLevelCalibrationState is expected to be provided by the...
    constexpr std::tuple describeConstructorArguments()
    bool sigPresenceSuspensionLevelTimestampQuality
    Signals if the VIO interface signal suspensionLevelTimestampQuality is expected to be provided by the...
    uint32_t channelFifoSize
    size of the fifo buffer used in vio and imu port. Need to be positive.
    constexpr PassDescriptorT< 0 > describePass(dw::core::StringView &&name, dwProcessorType processorType)
    int32_t cameraSensorRigIndices[SELF_CALIBRATION_NODE_MAX_CAMERAS_FOR_SUSPENSION_STATE]
    Camera sensor indices rig index (e.g. camera [0-127]), auto-populated by RR2 Loader....
    constexpr auto describePassCollection(const Args &&... args) -> std::tuple< Args... >
    constexpr auto describePortCollection(Args &&... args) -> dw::core::Tuple< Args... >
    int32_t cameraSensorIndices[SELF_CALIBRATION_NODE_MAX_CAMERAS_FOR_SUSPENSION_STATE]
    Sensor type indices for cameras (e.g. camera [0-8]), provided as parameter. Index with value >=0 mean...
    int32_t imuSensorRigIndex
    Imu sensor rig index (e.g. imu [0-127]), auto-populated by RR2 Loader. Filled in with UNUSED if the c...
    int32_t imuSensorIndex
    Sensor type index of imu, provided as parameter. Index with value >=0 means imu has to be used,...
    bool sigPresenceSuspensionLevelQuality
    Signals if the VIO interface signal suspensionLevelQuality is expected to be provided by the partner ...
    bool sigPresenceSuspensionLevelTimestamp
    Signals if the VIO interface signal suspensionLevelTimestamp is expected to be provided by the partne...
    the parameters used to construct the dwSelfCalibrationSuspensionStateNode. They are assigned in descr...
    Definition: Buffer.hpp:41
    人人超碰97caoporen国产