• <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
    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-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_DWRIGNODE_DWRIGNODE_HPP_
    32#define DWFRAMEWORK_DWNODES_DWRIGNODE_DWRIGNODE_HPP_
    33
    34#include <dw/rig/Rig.h>
    35#include <dwcgf/node/Node.hpp>
    41#include <dwframework/dwnodes/common/channelpackets/SelfCalibrationTypes.hpp>
    42#include <dwframework/dwnodes/common/channelpackets/SensorCommonTypes.hpp>
    43
    44namespace dw
    45{
    46namespace framework
    47{
    48
    50{
    51 dwRigHandle_t rigHandle;
    52
    54 char8_t const* rigOutputFileName;
    55
    58
    61
    62 // sensor type index
    63 bool imuSensorEnabled[framework::SELF_CALIBRATION_NODE_MAX_IMUS];
    64 std::uint32_t imuSensorRigIndices[framework::SELF_CALIBRATION_NODE_MAX_IMUS];
    65 bool cameraSensorEnabled[framework::SELF_CALIBRATION_NODE_MAX_CAMERAS];
    66 std::uint32_t cameraSensorRigIndices[framework::SELF_CALIBRATION_NODE_MAX_CAMERAS];
    67 bool radarSensorEnabled[framework::SELF_CALIBRATION_NODE_MAX_RADARS];
    68 std::uint32_t radarSensorRigIndices[framework::SELF_CALIBRATION_NODE_MAX_RADARS];
    69 bool lidarSensorEnabled[framework::SELF_CALIBRATION_NODE_MAX_LIDARS];
    70 std::uint32_t lidarSensorRigIndices[framework::SELF_CALIBRATION_NODE_MAX_LIDARS];
    71
    72 // sensor instance ids
    73 uint32_t cameraInstanceIds[framework::SELF_CALIBRATION_NODE_MAX_CAMERAS];
    74 uint32_t radarInstanceIds[framework::SELF_CALIBRATION_NODE_MAX_RADARS];
    75
    76 // periodic rig writing
    77 // how often to serialize in node pass cycles. 0 means turn off serialization
    79 // offset, in cycles, for the write counter. The intention is to allow to delay the
    80 // first write (and subsequently other writes) so that a few cycles occur before
    81 // serialization is attempted
    82 // must be less than rigWriteTimerPeriodInCycles for serialization to occur.
    84};
    85
    92{
    93public:
    94 // coverity[autosar_cpp14_a7_1_5_violation] RFD Accepted: TID-2201
    95 static constexpr auto describeInputPorts()
    96 {
    97 // TODO(csketch): RFD -- user defined literal being interpreted as c style cast.
    98 // coverity[autosar_cpp14_a5_2_2_violation] RFD Pending: TID-1983
    100 DW_DESCRIBE_PORT(dwCalibratedExtrinsics, "IMU_EXTRINSICS"_sv, PortBinding::REQUIRED),
    101 DW_DESCRIBE_PORT_ARRAY(dwCalibratedExtrinsics, framework::SELF_CALIBRATION_NODE_MAX_CAMERAS, "CAMERA_EXTRINSICS"_sv, PortBinding::REQUIRED),
    102 DW_DESCRIBE_PORT_ARRAY(dwCalibratedExtrinsics, framework::SELF_CALIBRATION_NODE_MAX_RADARS, "RADAR_EXTRINSICS"_sv, PortBinding::REQUIRED),
    103 DW_DESCRIBE_PORT_ARRAY(dwCalibratedExtrinsics, framework::SELF_CALIBRATION_NODE_MAX_LIDARS, "LIDAR_EXTRINSICS"_sv, PortBinding::REQUIRED),
    104 DW_DESCRIBE_PORT(dwCalibratedWheelRadii, "WHEEL_RADII"_sv, PortBinding::REQUIRED),
    105 DW_DESCRIBE_PORT(dwCalibratedSteeringProperties, "FRONT_STEERING_OFFSET"_sv, PortBinding::REQUIRED),
    106 DW_DESCRIBE_PORT(dwCalibratedIMUIntrinsics, "IMU_INTRINSICS"_sv, PortBinding::OPTIONAL),
    107 DW_DESCRIBE_PORT_ARRAY(dwCameraIntrinsics, framework::SELF_CALIBRATION_NODE_MAX_CAMERAS, "CAMERA_INTRINSICS"_sv, PortBinding::OPTIONAL),
    108 DW_DESCRIBE_PORT(bool, "STORE"_sv, PortBinding::OPTIONAL));
    109 };
    110 // coverity[autosar_cpp14_a7_1_5_violation] RFD Accepted: TID-2201
    111 static constexpr auto describeOutputPorts()
    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
    115 return describePortCollection();
    116 };
    117 // T
    118 // coverity[autosar_cpp14_a7_1_5_violation] RFD Accepted: TID-2201
    119 static constexpr auto describePasses()
    120 {
    122 describePass(StringView{"SETUP"}, DW_PROCESSOR_TYPE_CPU),
    123 describePass(StringView{"PROCESS"}, DW_PROCESSOR_TYPE_CPU),
    124 describePass(StringView{"TEARDOWN"}, DW_PROCESSOR_TYPE_CPU));
    125 };
    126
    127 static std::unique_ptr<dwRigNode> create(ParameterProvider const& provider);
    128
    129 // coverity[autosar_cpp14_a7_1_5_violation] RFD Accepted: TID-2201
    130 static constexpr auto describeParameters()
    131 {
    132 // TODO(csketch): RFD -- user defined literal being interpreted as c style cast.
    133 // coverity[autosar_cpp14_a5_2_2_violation] RFD Pending: TID-1983
    135 describeConstructorArgument<dwRigNodeParams>(
    137 dwRigHandle_t,
    138 &dwRigNodeParams::rigHandle),
    140 char8_t const*,
    144 char8_t const*,
    148 char8_t const*,
    152 bool,
    154 framework::SELF_CALIBRATION_NODE_MAX_IMUS,
    157 uint32_t,
    159 framework::SELF_CALIBRATION_NODE_MAX_IMUS,
    162 bool,
    164 framework::SELF_CALIBRATION_NODE_MAX_CAMERAS,
    167 uint32_t,
    169 framework::SELF_CALIBRATION_NODE_MAX_CAMERAS,
    172 bool,
    174 framework::SELF_CALIBRATION_NODE_MAX_RADARS,
    177 uint32_t,
    179 framework::SELF_CALIBRATION_NODE_MAX_RADARS,
    182 bool,
    184 framework::SELF_CALIBRATION_NODE_MAX_LIDARS,
    187 uint32_t,
    189 framework::SELF_CALIBRATION_NODE_MAX_LIDARS,
    192 uint32_t,
    194 framework::SELF_CALIBRATION_NODE_MAX_CAMERAS,
    197 uint32_t,
    199 framework::SELF_CALIBRATION_NODE_MAX_RADARS,
    201 DW_DESCRIBE_PARAMETER_WITH_DEFAULT(uint64_t, "rigWriteTimerPeriodInCycles"_sv, 0, &dwRigNodeParams::rigWriteTimerPeriodInCycles),
    202 DW_DESCRIBE_PARAMETER_WITH_DEFAULT(uint64_t, "rigWriteTimerOffsetInCycles"_sv, 0, &dwRigNodeParams::rigWriteTimerOffsetInCycles)),
    203 describeConstructorArgument<dwContextHandle_t>(
    205 dwContextHandle_t)));
    206 };
    207
    208 dwRigNode(dwRigNodeParams const& params, dwContextHandle_t const ctx);
    209 ~dwRigNode() override = default;
    210 dwRigNode(const dwRigNode& other) = default;
    211 dwRigNode(dwRigNode&& other) = default;
    212 dwRigNode& operator=(const dwRigNode&) = default;
    214};
    215
    216} /* namespace framework */
    217} /* namespace dw */
    218#endif // DWFRAMEWORK_DWNODES_DWRIGNODE_DWRIGNODE_HPP_
    #define DW_DESCRIBE_PARAMETER_WITH_DEFAULT(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_UNNAMED_ARRAY_PARAMETER_WITH_SEMANTIC(TYPE_NAME, SEMANTIC_TYPE_NAME, ARRAY_SIZE, 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.
    dwRigNode receives extrinsic calibrations from sensors in the system, and maintains that state to upd...
    Definition: dwRigNode.hpp:92
    ~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
    static constexpr auto describeInputPorts()
    Definition: dwRigNode.hpp:95
    static constexpr auto describeParameters()
    Definition: dwRigNode.hpp:130
    static constexpr auto describeOutputPorts()
    Definition: dwRigNode.hpp:111
    static constexpr auto describePasses()
    Definition: dwRigNode.hpp:119
    dwRigNode(dwRigNode &&other)=default
    bool lidarSensorEnabled[framework::SELF_CALIBRATION_NODE_MAX_LIDARS]
    Definition: dwRigNode.hpp:69
    std::uint32_t radarSensorRigIndices[framework::SELF_CALIBRATION_NODE_MAX_RADARS]
    Definition: dwRigNode.hpp:68
    constexpr std::tuple describeConstructorArguments()
    char8_t const * rigOutputFileName
    Definition: dwRigNode.hpp:54
    bool radarSensorEnabled[framework::SELF_CALIBRATION_NODE_MAX_RADARS]
    Definition: dwRigNode.hpp:67
    constexpr PassDescriptorT< 0 > describePass(dw::core::StringView &&name, dwProcessorType processorType)
    bool cameraSensorEnabled[framework::SELF_CALIBRATION_NODE_MAX_CAMERAS]
    Definition: dwRigNode.hpp:65
    std::uint32_t lidarSensorRigIndices[framework::SELF_CALIBRATION_NODE_MAX_LIDARS]
    Definition: dwRigNode.hpp:70
    char8_t const * calibrationOutputFileName
    Definition: dwRigNode.hpp:57
    uint32_t cameraInstanceIds[framework::SELF_CALIBRATION_NODE_MAX_CAMERAS]
    Definition: dwRigNode.hpp:73
    std::uint32_t imuSensorRigIndices[framework::SELF_CALIBRATION_NODE_MAX_IMUS]
    Definition: dwRigNode.hpp:64
    std::uint32_t cameraSensorRigIndices[framework::SELF_CALIBRATION_NODE_MAX_CAMERAS]
    Definition: dwRigNode.hpp:66
    constexpr auto describePassCollection(const Args &&... args) -> std::tuple< Args... >
    constexpr auto describePortCollection(Args &&... args) -> dw::core::Tuple< Args... >
    uint64_t rigWriteTimerPeriodInCycles
    Definition: dwRigNode.hpp:78
    char8_t const * calibrationOverlayFileName
    Definition: dwRigNode.hpp:60
    uint64_t rigWriteTimerOffsetInCycles
    Definition: dwRigNode.hpp:83
    bool imuSensorEnabled[framework::SELF_CALIBRATION_NODE_MAX_IMUS]
    Definition: dwRigNode.hpp:63
    uint32_t radarInstanceIds[framework::SELF_CALIBRATION_NODE_MAX_RADARS]
    Definition: dwRigNode.hpp:74
    dwRigNodeParams { dwRigHandle_t rigHandle dwRigNodeParams
    Definition: dwRigNode.hpp:51
    Definition: Buffer.hpp:41
    人人超碰97caoporen国产