NVIDIA DriveOS Linux NSR SDK API Reference

7.0.3.0 Release
Egomotion.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2015-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: LicenseRef-NvidiaProprietary
4  *
5  * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
6  * property and proprietary rights in and to this material, related
7  * documentation and any modifications thereto. Any use, reproduction,
8  * disclosure or distribution of this material and related documentation
9  * without an express license agreement from NVIDIA CORPORATION or
10  * its affiliates is strictly prohibited.
11  */
12 
42 #ifndef DW_EGOMOTION_BASE_EGOMOTION_H_
43 #define DW_EGOMOTION_BASE_EGOMOTION_H_
44 
45 #include <dw/core/base/Config.h>
46 #include <dw/core/base/Exports.h>
47 #include <dw/core/context/Context.h>
48 #include <dw/core/base/Types.h>
49 
50 #include <dw/control/vehicleio/VehicleIO.h>
51 #include <dw/control/vehicleio/VehicleIOValStructures.h>
52 
53 #include <dw/sensors/imu/IMU.h>
54 
55 #include <dw/rig/Rig.h>
56 #include <dw/rig/CoordinateSystem.h>
57 
58 #include "EgomotionTypes.h"
59 
60 #ifdef __cplusplus
61 extern "C" {
62 #endif
63 
67 typedef struct dwEgomotionObject* dwEgomotionHandle_t;
68 
72 typedef struct dwEgomotionObject const* dwEgomotionConstHandle_t;
73 
79 
115  const char* imuSensorName, const char* vehicleSensorName);
116 
140  uint32_t imuSensorIdx, uint32_t vehicleSensorIdx);
141 
162 
178 
195 
233 
276  dwVehicleIONonSafetyState const* nonSafeState,
277  dwVehicleIOActuationFeedback const* actuationFeedback,
279 
297 
321 
345 dwStatus dwEgomotion_addIMUMeasurementByIndex(const dwIMUFrame* imu, uint32_t const sensorIndex, dwEgomotionHandle_t obj);
346 
366 
402 
431 
457  dwTime_t timestamp_a, dwTime_t timestamp_b,
459 
488  dwEgomotionTransformationQuality* const quality,
489  dwTime_t const timestamp,
490  dwCoordinateSystem const coordinateSystemA,
491  dwCoordinateSystem const coordinateSystemB,
493 
512 
529 
547 
567 
586 
606 
625 
647  size_t index, dwEgomotionConstHandle_t obj);
648 
665 
666 //-----------------------------
667 // utility functions
668 
687  const dwTransformation3f* vehicleAToB,
688  const dwTransformation3f* vehicleToWorldAtA);
689 
713 DW_DEPRECATED("dwEgomotion_computeSteeringAngleFromIMU() is deprecated and will be removed soon. ")
715  float32_t* inverseSteeringR,
716  const dwIMUFrame* imuMeasurement,
718 
741 
764 
765 #ifdef __cplusplus
766 }
767 #endif
768 
769 #endif // DW_EGOMOTION_BASE_EGOMOTION_H_
dwEgomotion_getHistorySize
DW_API_PUBLIC dwStatus dwEgomotion_getHistorySize(size_t *size, dwEgomotionConstHandle_t obj)
Returns the number of elements currently stored in the history.
dwEgomotion_computeRelativeTransformation
DW_API_PUBLIC dwStatus dwEgomotion_computeRelativeTransformation(dwTransformation3f *poseAtoB, dwEgomotionTransformationQuality *quality, dwTime_t timestamp_a, dwTime_t timestamp_b, dwEgomotionConstHandle_t obj)
Computes the relative transformation between two timestamps and the uncertainty of this transform.
dwEgomotionHandle_t
struct dwEgomotionObject * dwEgomotionHandle_t
Egomotion Handle.
Definition: Egomotion.h:67
dwEgomotion_getMotionModel
DW_API_PUBLIC dwStatus dwEgomotion_getMotionModel(dwMotionModel *model, dwEgomotionConstHandle_t obj)
Returns the type of the motion model used.
dwEgomotion_addIMUMeasurementByIndex
DW_API_PUBLIC dwStatus dwEgomotion_addIMUMeasurementByIndex(const dwIMUFrame *imu, uint32_t const sensorIndex, dwEgomotionHandle_t obj)
Adds an IMU frame to the egomotion module for a specific IMU.
dwConstRigHandle_t
struct dwRigObject const * dwConstRigHandle_t
Handle representing the const Rig interface.
Definition: Rig.h:58
EgomotionTypes.h
ctx
DW_API_PUBLIC dwPointCloudRangeImageCreatorParams const *const const dwContextHandle_t ctx
Definition: PointCloudRangeImageCreator.h:293
dwVehicleIONonSafetyState
Non-safety critical RoV state.
Definition: VehicleIOValStructures.h:8792
dwEgomotionUncertainty
Instantaneous state uncertainty estimates.
Definition: EgomotionTypes.h:495
dwEgomotion_updateIMUExtrinsics
DW_API_PUBLIC dwStatus dwEgomotion_updateIMUExtrinsics(const dwTransformation3f *imuToRig, dwEgomotionHandle_t obj)
This method updates the IMU extrinsics to convert from the IMU coordinate system to the vehicle rig c...
dwEgomotion_initParamsFromRig
DW_API_PUBLIC dwStatus dwEgomotion_initParamsFromRig(dwEgomotionParameters *params, dwConstRigHandle_t rigConfiguration, const char *imuSensorName, const char *vehicleSensorName)
Initialize egomotion parameters from a provided RigConfiguration.
dwEgomotion_estimate
DW_API_PUBLIC dwStatus dwEgomotion_estimate(dwEgomotionResult *pose, dwEgomotionUncertainty *uncertainty, dwTime_t timestamp_us, dwEgomotionConstHandle_t obj)
Estimates the state for a given timestamp.
dwEgomotion_computeSteeringAngleFromIMU
DW_API_PUBLIC dwStatus dwEgomotion_computeSteeringAngleFromIMU(float32_t *steeringAngle, float32_t *inverseSteeringR, const dwIMUFrame *imuMeasurement, dwEgomotionConstHandle_t obj)
Computes steering angle of the vehicle based on IMU measurement.
dwEgomotionRelativeUncertainty
dwEgomotionTransformationQuality dwEgomotionRelativeUncertainty
Backwards compatibility between dwEgomotionRelativeUncertainty (old) and dwEgomotionTransformationQua...
Definition: Egomotion.h:78
dwEgomotion_getGyroscopeBias
DW_API_PUBLIC dwStatus dwEgomotion_getGyroscopeBias(dwVector3f *gyroBias, dwEgomotionConstHandle_t obj)
Get estimated gyroscope bias of the BASE IMU.
dwEgomotion_initParamsFromRigByIndex
DW_API_PUBLIC dwStatus dwEgomotion_initParamsFromRigByIndex(dwEgomotionParameters *params, dwConstRigHandle_t rigConfiguration, uint32_t imuSensorIdx, uint32_t vehicleSensorIdx)
Same as dwEgomotion_initParamsFromRig however uses sensor indices in rigConfiguration instead of thei...
dwEgomotion_getUncertainty
DW_API_PUBLIC dwStatus dwEgomotion_getUncertainty(dwEgomotionUncertainty *result, dwEgomotionConstHandle_t obj)
Gets the latest state estimate uncertainties.
timestamp
const WFDPipeline const WFDSource const WFDTransition const WFDRect *const const WFDuint64 timestamp
Definition: wfdext.h:61
dwEgomotionParameters
Holds initialization parameters for the Egomotion module.
Definition: EgomotionTypes.h:344
dwEgomotion_release
DW_API_PUBLIC dwStatus dwEgomotion_release(dwEgomotionHandle_t obj)
Releases the egomotion module.
dwEgomotion_initialize
DW_API_PUBLIC dwStatus dwEgomotion_initialize(dwEgomotionHandle_t *obj, const dwEgomotionParameters *params, dwContextHandle_t ctx)
Initializes the egomotion module.
dwEgomotion_reset
DW_API_PUBLIC dwStatus dwEgomotion_reset(dwEgomotionHandle_t obj)
Resets the state estimate and all history of the egomotion module.
dwVehicleIOState
The vehicle IO state data. Fields only set if supported by VehicleIO driver.
Definition: VehicleIOLegacyStructures.h:852
dwTime_t
int64_t dwTime_t
Specifies a timestamp unit, in microseconds.
Definition: BasicTypes.h:54
float32_t
float float32_t
Specifies POD types.
Definition: BasicTypes.h:41
dwVector3f
Defines a three-element floating-point vector.
Definition: MatrixTypes.h:74
dwEgomotion_getGyroscopeBiasByIndex
DW_API_PUBLIC dwStatus dwEgomotion_getGyroscopeBiasByIndex(dwVector3f *gyroBias, uint32_t const sensorIndex, dwEgomotionConstHandle_t obj)
Get estimated gyroscope bias of specific IMU.
dwEgomotion_applyRelativeTransformation
DW_API_PUBLIC dwStatus dwEgomotion_applyRelativeTransformation(dwTransformation3f *vehicleToWorldAtB, const dwTransformation3f *vehicleAToB, const dwTransformation3f *vehicleToWorldAtA)
Applies the estimated relative motion as returned by dwEgomotion_computeRelativeTransformation to a g...
dwEgomotionTransformationQuality
Relative transformation validity and uncertainty.
Definition: EgomotionTypes.h:514
dwIMUFrame
This structure contains one frame of data from a IMU sensor.
Definition: IMUTypes.h:396
dwVehicle
DEPRECATED: Properties of a passenger car vehicle.
Definition: Vehicle.h:472
DW_DEPRECATED
#define DW_DEPRECATED(msg)
Definition: Exports.h:50
dwEgomotion_steeringWheelAngleToSteeringAngle
DW_API_PUBLIC dwStatus dwEgomotion_steeringWheelAngleToSteeringAngle(float32_t *steeringAngle, float32_t steeringWheelAngle, dwEgomotionHandle_t obj)
Convert steering wheel angle to steering angle.
dwEgomotion_hasEstimation
DW_API_PUBLIC dwStatus dwEgomotion_hasEstimation(bool *result, dwEgomotionConstHandle_t obj)
Check whether estimation is available.
dwContextHandle_t
struct dwContextObject * dwContextHandle_t
Context handle.
Definition: Context.h:74
timestamp_us
dwTime_t timestamp_us
Definition: IMUTypes.h:9
dwEgomotion_updateVehicle
DW_API_PUBLIC dwStatus dwEgomotion_updateVehicle(const dwVehicle *vehicle, dwEgomotionHandle_t obj)
This method updates the egomotion module with an updated vehicle.
dwCoordinateSystem
dwCoordinateSystem
Coordinate systems.
Definition: CoordinateSystem.h:43
dwEgomotion_update
DW_API_PUBLIC dwStatus dwEgomotion_update(dwTime_t timestamp_us, dwEgomotionHandle_t obj)
Runs the motion model estimation for a given timestamp.
dwVehicleIOActuationFeedback
Feedback from actuation.
Definition: VehicleIOValStructures.h:7205
dwEgomotion_getEstimationTimestamp
DW_API_PUBLIC dwStatus dwEgomotion_getEstimationTimestamp(dwTime_t *timestamp, dwEgomotionConstHandle_t obj)
Gets the timestamp of the latest state estimate.
dwEgomotion_getHistoryElement
DW_API_PUBLIC dwStatus dwEgomotion_getHistoryElement(dwEgomotionResult *pose, dwEgomotionUncertainty *uncertainty, size_t index, dwEgomotionConstHandle_t obj)
Returns an element from the motion history that is currently available.
dwStatus
dwStatus
Status definition.
Definition: ErrorDefs.h:27
dwEgomotion_addIMUMeasurement
DW_API_PUBLIC dwStatus dwEgomotion_addIMUMeasurement(const dwIMUFrame *imu, dwEgomotionHandle_t obj)
Adds an IMU frame to the egomotion module for the BASE IMU.
dwTransformation3f
Specifies a 3D rigid transformation.
Definition: MatrixTypes.h:226
dwEgomotion_addVehicleState
DW_API_PUBLIC dwStatus dwEgomotion_addVehicleState(const dwVehicleIOState *state, dwEgomotionHandle_t obj)
Notifies the egomotion module of a changed vehicle state.
dwEgomotion_computeBodyTransformation
DW_API_PUBLIC dwStatus dwEgomotion_computeBodyTransformation(dwTransformation3f *const transformationAToB, dwEgomotionTransformationQuality *const quality, dwTime_t const timestamp, dwCoordinateSystem const coordinateSystemA, dwCoordinateSystem const coordinateSystemB, dwEgomotionConstHandle_t const obj)
Compute the transformation between two coordinate systems at a specific timestamp and the uncertainty...
params
DW_API_PUBLIC dwPointCloudRangeImageCreatorParams const *const params
Definition: PointCloudRangeImageCreator.h:292
DW_API_PUBLIC
#define DW_API_PUBLIC
Definition: Exports.h:38
obj
const NvSciSyncObj *const obj
Definition: wfdext.h:120
dwEgomotionConstHandle_t
struct dwEgomotionObject const * dwEgomotionConstHandle_t
Const Egomotion Handle.
Definition: Egomotion.h:72
dwMotionModel
dwMotionModel
Defines the motion models.
Definition: EgomotionTypes.h:32
dwEgomotion_getEstimation
DW_API_PUBLIC dwStatus dwEgomotion_getEstimation(dwEgomotionResult *result, dwEgomotionConstHandle_t obj)
Gets the latest state estimate.
dwEgomotionResult
Instantaneous state estimate.
Definition: EgomotionTypes.h:457
dwVehicleIOSafetyState
Safety critical VIO state.
Definition: VehicleIOValStructures.h:8054
dwEgomotion_steeringAngleToSteeringWheelAngle
DW_API_PUBLIC dwStatus dwEgomotion_steeringAngleToSteeringWheelAngle(float32_t *steeringWheelAngle, float32_t steeringAngle, dwEgomotionHandle_t obj)
Convert steering angle to steering wheel angle.
dwEgomotion_addVehicleIOState
DW_API_PUBLIC dwStatus dwEgomotion_addVehicleIOState(dwVehicleIOSafetyState const *safeState, dwVehicleIONonSafetyState const *nonSafeState, dwVehicleIOActuationFeedback const *actuationFeedback, dwEgomotionHandle_t obj)
Notifies the egomotion module of a changed vehicle state.