Provides vehicle egomotion functionality.
The egomotion module provides implementations of motion models with different sensor modalities. Starting from a simple Ackerman-based odometry-only model, to a full-fledged fusion of inertial sensor information.
This module provides access to a history of motion estimates with a predefined cadence and length. At any point of time an access into the history can be made to retrieve previous estimates. The access into the history is timestamp-based. If an access falls between two history entries it will be interpolated.
In addition to history-based access, all motion models support prediction of the motion into the future.
Data Structures | |
| struct | dwEgomotionMeasurementParameters |
| Egomotion measurement parameters. More... | |
| struct | dwEgomotionVMOParameters |
| Vehicle motion observer parameters. More... | |
| struct | dwEgomotionWheelObserverParameters |
| Wheel observer parameters. More... | |
| struct | dwEgomotionVehicleMovingDirectionDetectorParameters |
| Vehicle moving direction detection parameters. More... | |
| struct | dwEgomotionIMUIntrinsics |
| IMU intrinsic parameters. More... | |
| struct | dwEgomotionSuspensionProperties |
| Suspension properties. More... | |
| struct | dwEgomotionParameters2 |
| Egomotion parameters. More... | |
| struct | dwEgomotionLinearAccelerationFilterParams |
| Defines egomotion linear acceleration filter parameters. More... | |
| struct | dwEgomotionSuspensionParameters |
| Suspension model type and parameters. More... | |
| struct | dwEgomotionSensorCharacteristics |
| Sensor measurement noise characteristics. More... | |
| struct | dwEgomotionStateParams |
| Defines egomotion state initialization parameters. More... | |
| struct | dwEgomotionParameters |
| Holds initialization parameters for the Egomotion module. More... | |
| struct | dwEgomotionQuality |
| Egomotion quality: integrity and error bounds. More... | |
| struct | dwEgomotionResultQuality |
| Quality of instantaneous state estimate. More... | |
| struct | dwEgomotionResult |
| Instantaneous state estimate. More... | |
| struct | dwEgomotionUncertainty |
| Instantaneous state uncertainty estimates. More... | |
| struct | dwEgomotionTransformationQuality |
| Relative transformation validity and uncertainty. More... | |
| struct | dwEgomotionSignalLimitsUInt8 |
| Limits for uint8_t signal ranges. More... | |
| struct | dwEgomotionSignalLimitsInt16 |
| Limits for int16_t signal ranges. More... | |
| struct | dwEgomotionSignalLimitsFloat32 |
| Limits for float32_t signal ranges. More... | |
| struct | dwEgomotionSignalLimitsFloat64 |
| Limits for float64_t signal ranges. More... | |
| struct | dwEgomotionSignalLimitsDwTime |
| Limits for dwTime_t signal ranges. More... | |
| struct | dwEgomotionIMUMonitorParameters |
| Parameters for error handling IMU L2 Monitor. More... | |
| struct | dwEgomotionErrorHandlingParameters |
| Parameters for error handling related logic. More... | |
| struct | dwGlobalEgomotionUncertainty |
| Holds global egomotion uncertainty estimate. More... | |
| struct | dwGlobalEgomotionRelativeDeviation |
| Global to relative egomotion deviation information. More... | |
| struct | dwGlobalEgomotionGpsStatus |
| Holds global egomotion GPS timeout and stuck status information. More... | |
| struct | dwGlobalEgomotionResult |
| Holds global egomotion state estimate. More... | |
| struct | dwGlobalEgomotionStateElement |
| Defines global egomotion state element. More... | |
| struct | dwGlobalEgomotionState |
| Defines global egomotion state. More... | |
| struct | dwEgomotionIMUAccBiasEstimatorParameters |
| IMU accelerometer bias estimator parameters. More... | |
| struct | dwEgomotionIMUGyroBiasEstimatorParameters |
| IMU gyroscope bias estimator parameters. More... | |
| struct | dwEgomotionSteeringOffsetEstimatorParameters |
| Steering offset estimator parameters. More... | |
| struct | dwYawDisturbanceDetectorParameters |
| Yaw disturbance detector parameters for HFE integration. More... | |
Modules | |
| Egomotion Extra API | |
| Defines additional related API. | |
| Global Egomotion Interface | |
| Provides global location and orientation estimation functionality. | |
| Producer/State API | |
| Defines producer/state related API. | |
| RadarDopplerMotion Interface | |
| Provides estimation of the speed and heading of the radar observing doppler based radar measurements. | |
| Serialization Interface | |
| Defines the serialization API of the global egomotion module. | |
Macros | |
| #define | DW_EGOMOTION_ERROR_ID_COUNT (753) |
| #define | DW_EGOMOTIONRESULT_IDENTIFIER_MAX_LEN 16 |
| Max length allow for the identifier describing dwEgomotionResult, dwEgomotionPose and dwGlobalEgomotionResult. More... | |
| #define | DW_GLOBAL_EGOMOTION_STATE_CAPACITY 1000U |
| #define | DW_EGOMOTION_C3_LOOKUP_TABLE_SIZE 8U |
| Number of elements in the C3 trigger lookup table. More... | |
| #define DW_EGOMOTION_C3_LOOKUP_TABLE_SIZE 8U |
Number of elements in the C3 trigger lookup table.
Definition at line 55 of file IMUBiasEstimatorParameters.h.
| #define DW_EGOMOTION_ERROR_ID_COUNT (753) |
Definition at line 56 of file ErrorHandlingParameters.h.
| #define DW_EGOMOTIONRESULT_IDENTIFIER_MAX_LEN 16 |
Max length allow for the identifier describing dwEgomotionResult, dwEgomotionPose and dwGlobalEgomotionResult.
Definition at line 34 of file GlobalEgomotionTypes.h.
| #define DW_GLOBAL_EGOMOTION_STATE_CAPACITY 1000U |
Definition at line 36 of file GlobalEgomotionTypes.h.
| typedef struct dwEgomotionObject const* dwEgomotionConstHandle_t |
Const Egomotion Handle.
Alias for pointer to const egomotion instance.
Definition at line 72 of file Egomotion.h.
| typedef enum dwEgomotionDataField dwEgomotionDataField |
Defines flags that indicate validity of corresponding data in dwEgomotionResult and dwEgomotionUncertainty.
| typedef enum dwEgomotionDirectionMode dwEgomotionDirectionMode |
Vehicle direction detection modes.
Egomotion can estimate the vehicle moving direction from different sources depending on vehicle platform capabilities.
Select DW_EGOMOTION_DIRECTION_FROM_SPEED_SIGN if the wheel tick increments and wheel speeds are signed, indicating forward and reverse driving unambiguously.
Select DW_EGOMOTION_DIRECTION_FROM_WHEEL_DIR_AND_GEAR if the wheel tick increments and wheel speeds are unsigned, such that forward and reverse driving cannot be distinguished from these signals alone.
Select DW_EGOMOTION_DIRECTION_FROM_SPEED_SIGN_AND_GEAR if the wheel tick increments and wheel speeds are signed with ambiguous region around 0 to be resolved based on target gear and current gear signals. dwEgomotionVehicleMovingDirectionDetectorParameters::ticksAmbiguousSpeedThreshold
The default configuration for production platforms is DW_EGOMOTION_DIRECTION_FROM_WHEEL_DIR_AND_GEAR.
Parameters for error handling related logic.
Ground speed measurement types.
Egomotion can estimate vehicle ground speed from different sources depending on vehicle platform capabilities.
The default configuration for production platforms is DW_EGOMOTION_GROUND_SPEED_FROM_WHEEL_TICKS_AND_SPEEDS_BOTH_AXLES.
| typedef struct dwEgomotionObject* dwEgomotionHandle_t |
Egomotion Handle.
Alias for pointer to egomotion instance.
Definition at line 67 of file Egomotion.h.
IMU accelerometer bias estimator parameters.
IMU gyroscope bias estimator parameters.
| typedef enum dwEgomotionIMUIdentifier dwEgomotionIMUIdentifier |
Defines IMU identifiers.
| typedef struct dwEgomotionIMUIntrinsics dwEgomotionIMUIntrinsics |
IMU intrinsic parameters.
| typedef struct dwEgomotionIMUMonitorParameters dwEgomotionIMUMonitorParameters |
Parameters for error handling IMU L2 Monitor.
| typedef enum dwEgomotionIntegrity dwEgomotionIntegrity |
Egomotion integrity levels.
Non-QM integrity levels are only applicable to vehicle platforms developed for NDAS. No guarantees are made for usage of egomotion as part of non-NDAS DriveWorks SDK.
Non-QM integrity levels are only provided for select egomotion modalities.
Defines egomotion linear acceleration filter mode.
Defines egomotion linear acceleration filter parameters.
| typedef struct dwEgomotionMeasurementParameters dwEgomotionMeasurementParameters |
Egomotion measurement parameters.
| typedef enum dwEgomotionMeasurementTypes dwEgomotionMeasurementTypes |
Measurements used by egomotion.
| typedef struct dwEgomotionParameters dwEgomotionParameters |
Holds initialization parameters for the Egomotion module.
| typedef struct dwEgomotionParameters2 dwEgomotionParameters2 |
Egomotion parameters.
All parameters are required unless otherwise noted.
| typedef struct dwEgomotionQuality dwEgomotionQuality |
Egomotion quality: integrity and error bounds.
Egomotion provides (conservative) error bounds on its signals by leveraging an extensive monitoring framework and quantifying the impact of any input or internal error on its output. Not all egomotion modalities support this.
Lower and upper error bounds are given relative to the estimated quantity and only valid if status indicates ASIL level. Absolute angular quantities are subject to [-PI, PI] limits and error bounds do not wrap around.
For example, linear velocity upper and lower bounds of +1 m/s, -2 m/s respectively indicate that the true velocity is within this range from the current estimate, with corresponding integrity. If the velocity estimated by egomotion is 10 m/s, the bounds translate to a guarantee that the true velocity is between 8 and 11 m/s. In other words, the velocity is at most under estimated by 10/11=~9%, or over estimated by 10/8=25%.
| typedef struct dwEgomotionResult dwEgomotionResult |
Instantaneous state estimate.
| typedef struct dwEgomotionResultQuality dwEgomotionResultQuality |
Quality of instantaneous state estimate.
| typedef struct dwEgomotionSensorCharacteristics dwEgomotionSensorCharacteristics |
Sensor measurement noise characteristics.
| typedef struct dwEgomotionSignalLimitsDwTime dwEgomotionSignalLimitsDwTime |
Limits for dwTime_t signal ranges.
| typedef struct dwEgomotionSignalLimitsFloat32 dwEgomotionSignalLimitsFloat32 |
Limits for float32_t signal ranges.
| typedef struct dwEgomotionSignalLimitsFloat64 dwEgomotionSignalLimitsFloat64 |
Limits for float64_t signal ranges.
| typedef struct dwEgomotionSignalLimitsInt16 dwEgomotionSignalLimitsInt16 |
Limits for int16_t signal ranges.
| typedef struct dwEgomotionSignalLimitsUInt8 dwEgomotionSignalLimitsUInt8 |
Limits for uint8_t signal ranges.
Defines speed measurement types.
| typedef struct dwEgomotionStateParams dwEgomotionStateParams |
Defines egomotion state initialization parameters.
Defines steering measurement types.
| typedef struct dwEgomotionSteeringOffsetEstimatorParameters dwEgomotionSteeringOffsetEstimatorParameters |
Steering offset estimator parameters.
| typedef enum dwEgomotionSuspensionModel dwEgomotionSuspensionModel |
Defines egomotion suspension model.
| typedef struct dwEgomotionSuspensionParameters dwEgomotionSuspensionParameters |
Suspension model type and parameters.
| typedef struct dwEgomotionSuspensionProperties dwEgomotionSuspensionProperties |
Suspension properties.
| typedef struct dwEgomotionTransformationQuality dwEgomotionTransformationQuality |
Relative transformation validity and uncertainty.
| typedef struct dwEgomotionUncertainty dwEgomotionUncertainty |
Instantaneous state uncertainty estimates.
Data in these fields represent the uncertainties of the corresponding fields in dwEgomotionResult. The uncertainties are represented as covariance matrix when appropriate, or in standard deviation around the estimate otherwise. These values are provided "as is" for usage in fusion algorithms depending on egomotion estimation but no accuracy claims are made (see below).
| typedef struct dwEgomotionVehicleMovingDirectionDetectorParameters dwEgomotionVehicleMovingDirectionDetectorParameters |
Vehicle moving direction detection parameters.
Used to inform egomotion on the moving direction of the vehicle.
| typedef struct dwEgomotionVMOParameters dwEgomotionVMOParameters |
Vehicle motion observer parameters.
Wheel observer parameters.
| typedef struct dwGlobalEgomotionGpsStatus dwGlobalEgomotionGpsStatus |
Holds global egomotion GPS timeout and stuck status information.
Global to relative egomotion deviation information.
| typedef struct dwGlobalEgomotionResult dwGlobalEgomotionResult |
Holds global egomotion state estimate.
| typedef struct dwGlobalEgomotionState dwGlobalEgomotionState |
Defines global egomotion state.
| typedef struct dwGlobalEgomotionStateElement dwGlobalEgomotionStateElement |
Defines global egomotion state element.
| typedef struct dwGlobalEgomotionUncertainty dwGlobalEgomotionUncertainty |
Holds global egomotion uncertainty estimate.
| typedef enum dwMotionModel dwMotionModel |
Defines the motion models.
| typedef enum dwMotionModelMeasurement dwMotionModelMeasurement |
Defines motion measurements.
Yaw disturbance detector parameters for HFE integration.
These parameters configure the HFE yaw disturbance detector.
| enum dwEgomotionDataField |
Defines flags that indicate validity of corresponding data in dwEgomotionResult and dwEgomotionUncertainty.
| Enumerator | |
|---|---|
| DW_EGOMOTION_ROTATION | indicates validity of rotation,
|
| DW_EGOMOTION_LIN_VEL_X | indicates validity of linearVelocity[0] |
| DW_EGOMOTION_LIN_VEL_Y | indicates validity of linearVelocity[1] |
| DW_EGOMOTION_LIN_VEL_Z | indicates validity of linearVelocity[2] |
| DW_EGOMOTION_ANG_VEL_X | indicates validity of angularVelocity[0] |
| DW_EGOMOTION_ANG_VEL_Y | indicates validity of angularVelocity[1] |
| DW_EGOMOTION_ANG_VEL_Z | indicates validity of angularVelocity[2] |
| DW_EGOMOTION_LIN_ACC_X | indicates validity of linearAcceleration[0] |
| DW_EGOMOTION_LIN_ACC_Y | indicates validity of linearAcceleration[1] |
| DW_EGOMOTION_LIN_ACC_Z | indicates validity of linearAcceleration[2] |
| DW_EGOMOTION_ANG_ACC_X | indicates validity of angularAcceleration[0] |
| DW_EGOMOTION_ANG_ACC_Y | indicates validity of angularAcceleration[1] |
| DW_EGOMOTION_ANG_ACC_Z | indicates validity of angularAcceleration[2] |
| DW_EGOMOTION_CURVATURE | indicates validity of curvature |
Definition at line 217 of file EgomotionTypes.h.
Vehicle direction detection modes.
Egomotion can estimate the vehicle moving direction from different sources depending on vehicle platform capabilities.
Select DW_EGOMOTION_DIRECTION_FROM_SPEED_SIGN if the wheel tick increments and wheel speeds are signed, indicating forward and reverse driving unambiguously.
Select DW_EGOMOTION_DIRECTION_FROM_WHEEL_DIR_AND_GEAR if the wheel tick increments and wheel speeds are unsigned, such that forward and reverse driving cannot be distinguished from these signals alone.
Select DW_EGOMOTION_DIRECTION_FROM_SPEED_SIGN_AND_GEAR if the wheel tick increments and wheel speeds are signed with ambiguous region around 0 to be resolved based on target gear and current gear signals. dwEgomotionVehicleMovingDirectionDetectorParameters::ticksAmbiguousSpeedThreshold
The default configuration for production platforms is DW_EGOMOTION_DIRECTION_FROM_WHEEL_DIR_AND_GEAR.
Definition at line 124 of file Egomotion2.h.
Ground speed measurement types.
Egomotion can estimate vehicle ground speed from different sources depending on vehicle platform capabilities.
The default configuration for production platforms is DW_EGOMOTION_GROUND_SPEED_FROM_WHEEL_TICKS_AND_SPEEDS_BOTH_AXLES.
Definition at line 90 of file Egomotion2.h.
Defines IMU identifiers.
Definition at line 104 of file EgomotionTypes.h.
| enum dwEgomotionIntegrity |
Egomotion integrity levels.
Non-QM integrity levels are only applicable to vehicle platforms developed for NDAS. No guarantees are made for usage of egomotion as part of non-NDAS DriveWorks SDK.
Non-QM integrity levels are only provided for select egomotion modalities.
Definition at line 246 of file EgomotionTypes.h.
Defines egomotion linear acceleration filter mode.
| Enumerator | |
|---|---|
| DW_EGOMOTION_ACC_FILTER_NO_FILTERING | no filtering of the output linear acceleration |
| DW_EGOMOTION_ACC_FILTER_SIMPLE | simple low-pass filtering of the acceleration |
Definition at line 199 of file EgomotionTypes.h.
Measurements used by egomotion.
| Enumerator | |
|---|---|
| DW_EGOMOTION_MEASUREMENT_STEERING |
|
| DW_EGOMOTION_MEASUREMENT_SUSPENSION |
|
| DW_EGOMOTION_MEASUREMENT_ANGULAR_ACCELERATION |
|
| DW_EGOMOTION_MEASUREMENT_PROPER_ACCELERATION |
|
| DW_EGOMOTION_MEASUREMENT_ANGULAR_VELOCITY |
|
| DW_EGOMOTION_MEASUREMENT_LINEAR_GROUND_SPEED |
|
| DW_EGOMOTION_MEASUREMENT_LINEAR_BODY_SPEED | Linear body speed. |
| DW_EGOMOTION_MEASUREMENT_WHEEL_TICKS | |
| DW_EGOMOTION_MEASUREMENT_WHEEL_SPEEDS |
|
| DW_EGOMOTION_MEASUREMENT_TRAILER_ANGLE |
|
| DW_EGOMOTION_MEASUREMENT_REAR_STEERING |
|
| DW_EGOMOTION_MEASUREMENT_TYPES_COUNT |
|
Definition at line 66 of file Egomotion2.h.
Defines speed measurement types.
| Enumerator | |
|---|---|
| DW_EGOMOTION_FRONT_SPEED | Indicates that speed is linear speed [m/s] measured at front wheels (along steering direction). Steering angle [rad] is used internally to compute longitudinal speed.
Provide front speed measurement and steering angle with the dwEgomotion_addVehicleState API where the |
| DW_EGOMOTION_REAR_WHEEL_SPEED | Indicates that speeds are angular speeds [rad/s] measured at rear wheels.
Provide rear wheel speed measurements with the dwEgomotion_addVehicleState API where the |
| DW_EGOMOTION_REAR_SPEED | Indicates that speed is linear speed [m/s] measured at rear axle center (along steering direction). Rear steering angle [rad] given by dwVehicleIOState.rearWheelAngle is used internally to compute longitudinal speed.
Provide rear speed measurement with the dwEgomotion_addVehicleState API where the |
Definition at line 125 of file EgomotionTypes.h.
Defines steering measurement types.
| Enumerator | |
|---|---|
| DW_EGOMOTION_FRONT_STEERING |
|
| DW_EGOMOTION_STEERING_WHEEL_ANGLE |
|
Definition at line 190 of file EgomotionTypes.h.
Defines egomotion suspension model.
Definition at line 208 of file EgomotionTypes.h.
| enum dwMotionModel |
Defines the motion models.
| Enumerator | |
|---|---|
| DW_EGOMOTION_ODOMETRY | Given odometry information, estimates motion of the vehicle using a bicycle model. The following parameters are required for this model:
This model is capable of providing the following estimates:
Uncertainty estimates are not supported at this time.
|
| DW_EGOMOTION_IMU_ODOMETRY | Fuses odometry model with IMU measurements to estimate motion of the vehicle. The following parameters are required for this model:
This model is capable of providing the following estimates:
Uncertainty estimates are provided for all state estimates listed above.
|
| DW_EGOMOTION_VEHICLE_MOTION_OBSERVER | Egomotion estimation based on IMU and RoV sensors (wheel encoders, steering, suspension, drive status, ...) targeted for NDAS production. Not officially supported as part of DriveWorks SDK, backwards compatibility and deprecation process will not be followed. See disclaimer in dw/egomotion/2.0/Egomotion2.h for more information. |
Definition at line 37 of file EgomotionTypes.h.
Defines motion measurements.
Definition at line 115 of file EgomotionTypes.h.
| DW_API_PUBLIC dwStatus dwEgomotion2_getAccelerometerBias | ( | dwVector3f * | accBias, |
| dwEgomotionConstHandle_t | obj | ||
| ) |
Get estimated accelerometer bias of the BASE IMU.
| [in,out] | accBias | Pointer to dwVector3f to be filled with accelerometer biases [m/s^2]. |
| [in] | obj | Egomotion handle. |
| DW_API_PUBLIC dwStatus dwEgomotion2_getAccelerometerBiasByIndex | ( | dwVector3f * | accBias, |
| uint32_t const | sensorIndex, | ||
| dwEgomotionConstHandle_t | obj | ||
| ) |
Get estimated accelerometer bias of a specific IMU.
| [in,out] | accBias | Pointer to dwVector3f to be filled with accelerometer biases [m/s^2]. |
| [in] | sensorIndex | Identifier of IMU to get bias for |
| [in] | obj | Egomotion handle. |
| DW_API_PUBLIC dwStatus dwEgomotion2_getAccelerometerBiasExt | ( | dwEgomotionCalibrationStatus * | status, |
| dwEgomotionCalibrationManeuverArray * | maneuvers, | ||
| dwEgomotionCalibrationProperties * | properties, | ||
| dwEgomotionConstHandle_t | obj | ||
| ) |
Get advanced accelerometer bias estimator status information for Base IMU,.
| [in,out] | status | Pointer to the current status of the accelerometer bias calibration to be filled out. |
| [in,out] | maneuvers | Pointer to an array of maneuvers of type dwCalibrationManeuverArray to be filled out. |
| [in,out] | properties | Pointer to the properties of the accelerometer bias calibration procedure to be filled out. |
| [in] | obj | Egomotion handle. |
| DW_API_PUBLIC dwStatus dwEgomotion2_getAccelerometerBiasExtByIndex | ( | dwEgomotionCalibrationStatus * | status, |
| dwEgomotionCalibrationManeuverArray * | maneuvers, | ||
| dwEgomotionCalibrationProperties * | properties, | ||
| uint32_t const | sensorIndex, | ||
| dwEgomotionConstHandle_t | obj | ||
| ) |
Get advanced accelerometer bias estimator status information for specific IMU.
| [in,out] | status | Pointer to the current status of the accelerometer bias calibration to be filled out. |
| [in,out] | maneuvers | Pointer to an array of maneuvers of type dwCalibrationManeuverArray to be filled out. |
| [in,out] | properties | Pointer to the properties of the accelerometer bias calibration procedure to be filled out. |
| [in] | sensorIndex | Sensor index of IMU. |
| [in] | obj | Egomotion handle. |
| dwStatus dwEgomotion2_getErrorIdDisableMask | ( | bool | disabledErrorIdMask[DW_EGOMOTION_ERROR_ID_COUNT], |
| char8_t const *const | disabledErrorIds[DW_EGOMOTION_ERROR_ID_COUNT] | ||
| ) |
Convert a list of ErrorId names to a mask representing their status.
| disabledErrorIdMask | Output bools indicating for each ErrorId whether the ErrorId should be enabled. Set by this function. |
| disabledErrorIds | Array of string representations of ErrorIds to disable. |
| DW_API_PUBLIC dwStatus dwEgomotion2_getFrontSteeringAngleOffset | ( | float32_t * | steeringOffset, |
| dwEgomotionConstHandle_t | obj | ||
| ) |
Get estimated front steering angle offset.
The offset is to be used to compentate for the steering angle sensor offset. True steering angle = measured steering angle - offset.
| [in,out] | steeringOffset | Pointer to float to be filled with steering offset [rad]. |
| [in] | obj | Egomotion handle. |
| DW_API_PUBLIC dwStatus dwEgomotion2_getFrontSteeringAngleOffsetExt | ( | dwEgomotionCalibrationStatus * | status, |
| dwEgomotionCalibrationManeuverArray * | maneuvers, | ||
| dwEgomotionCalibrationProperties * | properties, | ||
| dwEgomotionConstHandle_t | obj | ||
| ) |
Get advanced steering offset estimator status information.
| [in,out] | status | Pointer to the current status of the steering offfset calibration to be filled out. |
| [in,out] | maneuvers | Pointer to an array of maneuvers of type dwCalibrationManeuverArray to be filled out. |
| [in,out] | properties | Pointer to the properties of the steering offfset calibration procedure to be filled out. |
| [in] | obj | Egomotion handle. |
| DW_API_PUBLIC dwStatus dwEgomotion2_initDefaultParams | ( | dwEgomotionParameters2 * | params | ) |
Initializes the egomotion parameters to sane defaults applicable to most vehicles.
This API does not set the required vehicle-specific parameters which must be provided separately.
See also dwEgomotion2_initParamsFromRig
| [in,out] | params | A pointer to the egomotion parameters to be filled out. |
| DW_API_PUBLIC dwStatus dwEgomotion2_initialize | ( | dwEgomotionHandle_t *const | obj, |
| dwEgomotionParameters2 const * | params, | ||
| dwContextHandle_t const | ctx | ||
| ) |
Initializes the egomotion 2.0 module.
Instantiates the subfunctions composing the overall module and allocates memory for their operation. Configuration of the module is provided by the params argument. Default parameters can be obtained from the dwEgomotion2_initParamsFromRig function.
| [in,out] | obj | A pointer to the egomotion handle to be set for the created module. |
| [in] | params | A pointer to the configuration parameters of the module. |
| [in] | ctx | Specifies the handler to the context under which the Egomotion module is created. |
| DW_API_PUBLIC dwStatus dwEgomotion2_initializeState | ( | dwEgomotionStateHandle_t * | state, |
| size_t const | historySize, | ||
| dwContextHandle_t | ctx | ||
| ) |
Initializes an instance of the egomotion 2.0 state history.
This empty state history instance can be used to deserialize from a binary representation of the state. After deserialization state can be queried with state API for it's content. The state can contain internally a history of up-to passed amount of elements.
| [out] | state | Handle to be set with pointer to created empty state. |
| [in] | historySize | State history size (maximum capacity). If left 0, a default size of 1000 is used. |
| [in] | ctx | Handle of the context. |
historySize is smaller than the egomotion internal history capacity, any retrieval of the state with dwEgomotion_getState will fill out this state's only with as much data as can fit, dropping oldest entries. This in turn would mean that calls to dwEgomotionState_computeRelativeTransformation might not succeed if requested for timestamp outside of the covered history. | DW_API_PUBLIC dwStatus dwEgomotion2_initParamsFromRig | ( | dwEgomotionParameters2 * | params, |
| dwConstRigHandle_t | rigConfiguration, | ||
| char const * | imu1Name, | ||
| char const * | imu2Name, | ||
| char const * | imu3Name | ||
| ) |
Initializes the egomotion parameters to sane defaults given vehicle configuration.
This API is used to initialize parameters for egomotion 2.0.
| [in,out] | params | A pointer to the egomotion parameters to be filled out. |
| [in] | rigConfiguration | A pointer to the vehicle rig configuration. |
| [in] | imu1Name | Name of first IMU sensor as it appears in rig configuration. |
| [in] | imu2Name | Name of second IMU sensor as it appears in rig configuration. Optional, can be left null (1) (2). |
| [in] | imu3Name | Name of third IMU sensor as it appears in rig configuration. Optional, can be left null (1). |
| DW_API_PUBLIC dwStatus dwEgomotion2_initParamsFromRigByIndex | ( | dwEgomotionParameters2 * | params, |
| dwConstRigHandle_t | rigConfiguration, | ||
| uint32_t const | imu1Index, | ||
| uint32_t const | imu2Index, | ||
| uint32_t const | imu3Index | ||
| ) |
Initializes the egomotion parameters to sane defaults given vehicle configuration.
This API is used to initialize parameters for egomotion 2.0.
| [in,out] | params | A pointer to the egomotion parameters to be filled out. |
| [in] | rigConfiguration | A pointer to the vehicle rig configuration. |
| [in] | imu1Index | Index of first IMU sensor as it appears in rig configuration. |
| [in] | imu2Index | Index of second IMU sensor as it appears in rig configuration. Optional, can be set to UINT32_MAX (1) (2). |
| [in] | imu3Index | Index of third IMU sensor as it appears in rig configuration. Optional, can be set to UINT32_MAX (1). |
| DW_API_PUBLIC dwStatus dwEgomotion2_updateIMUExtrinsics | ( | dwEgomotionCalibratedExtrinsics const *const | imuToRig, |
| dwEgomotionHandle_t | obj | ||
| ) |
Update IMU extrinsics for Base IMU,.
| [in] | imuToRig | New imu extrinsics with validity information. |
| [in] | obj | Egomotion handle. |
| DW_API_PUBLIC dwStatus dwEgomotion2_updateIMUExtrinsicsByIndex | ( | dwEgomotionCalibratedExtrinsics const *const | imuToRig, |
| uint32_t const | sensorIndex, | ||
| dwEgomotionHandle_t | obj | ||
| ) |
Update IMU extrinsics for a specific IMU.
| [in] | imuToRig | New imu extrinsics with validity information. |
| [in] | sensorIndex | Sensor index of IMU the extrinsics apply to. |
| [in] | obj | Egomotion handle. |
| DW_API_PUBLIC dwStatus dwEgomotion2_updateWheelRadii | ( | dwEgomotionCalibratedWheelRadii const *const | wheelRadii, |
| dwEgomotionHandle_t | obj | ||
| ) |
Update wheel radii.
| [in] | wheelRadii | New wheel radii with validity information. |
| [in] | obj | Egomotion handle. |
| DW_API_PUBLIC dwStatus dwEgomotion_addIMUMeasurement | ( | const dwIMUFrame * | imu, |
| dwEgomotionHandle_t | obj | ||
| ) |
Adds an IMU frame to the egomotion module for the BASE IMU.
The IMU frame shall contain either linear acceleration or angular velocity measurements for X, Y and Z axes or both at once; the frame will be discarded otherwise.
Egomotion might generate a new estimate on addition of IMU frame, see dwEgomotionParameters::automaticUpdate.
| [in] | imu | IMU measurement. |
| [in] | obj | Egomotion handle. |
| 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.
The IMU frame shall contain either linear acceleration or angular velocity measurements for X, Y and Z axes or both at once; the frame will be discarded otherwise.
Egomotion might generate a new estimate on addition of IMU frame, see dwEgomotionParameters::automaticUpdate.
| [in] | imu | IMU measurement. |
| [in] | sensorIndex | Identifier of IMU for measurement. |
| [in] | obj | Egomotion handle. |
| 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.
In case relevant new information is contained in this state then it gets consumed, otherwise state is ignored.
Signals consumed depend on the selected egomotion motion model,
When using DW_EGOMOTION_ODOMETRY, the following valid signals in at least one of the structs dwVehicleIOSafetyState, dwVehicleIONonSafetyState or dwVehicleIOActuationFeedback are required:
When using DW_EGOMOTION_IMU_ODOMETRY, the following valid signals in at least one of the structs dwVehicleIOSafetyState, dwVehicleIONonSafetyState or dwVehicleIOActuationFeedback are required:
| [in] | safeState | New dwVehicleIOSafetyState which contains potentially new information for egomotion consumption |
| [in] | nonSafeState | New dwVehicleIONonSafetyState which contains potentially new information for egomotion consumption |
| [in] | actuationFeedback | New dwVehicleIOActuationFeedback which contains potentially new information for egomotion consumption |
| [in] | obj | Egomotion handle. |
| DW_API_PUBLIC dwStatus dwEgomotion_addVehicleState | ( | const dwVehicleIOState * | state, |
| dwEgomotionHandle_t | obj | ||
| ) |
Notifies the egomotion module of a changed vehicle state.
In case relevant new information is contained in this state then it gets consumed, otherwise state is ignored.
Signals consumed depend on the selected egomotion motion model,
When using DW_EGOMOTION_ODOMETRY:
When using DW_EGOMOTION_IMU_ODOMETRY:
| [in] | state | New VehicleIOState which contains potentially new information for egomotion consumption |
| [in] | obj | Egomotion handle. |
| DW_API_PUBLIC dwStatus dwEgomotion_addVIOState | ( | dwVehicleIOASILState const * | asilState, |
| dwVehicleIOQMState const * | qmState, | ||
| dwEgomotionHandle_t | obj | ||
| ) |
Notifies the egomotion module of a changed vehicle state.
In case relevant new information is contained in this state then it gets consumed, otherwise state is ignored.
Signals consumed depend on the selected egomotion motion model,
When using DW_EGOMOTION_ODOMETRY, the following valid signals in at least one of the structs dwVehicleIOQMState, dwVehicleIOASILState are required:
When using DW_EGOMOTION_IMU_ODOMETRY, the following valid signals in at least one of the structs dwVehicleIOQMState, dwVehicleIOASILState are required:
| [in] | asilState | New dwVehicleIOASILState which contains potentially new information for egomotion consumption |
| [in] | qmState | New dwVehicleIOQMState which contains potentially new information for egomotion consumption |
| [in] | obj | Egomotion handle. |
| 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 given vehicle pose.
| [out] | vehicleToWorldAtB | Transformation to be filled with pose of the vehicle in world at time B. |
| [in] | vehicleAToB | Transformation providing motion of vehicle from time A to time B. |
| [in] | vehicleToWorldAtA | Transformation providing pose of the vehicle in world at time A. |
| 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 of this transform.
| [out] | transformationAToB | Transformation mapping a point in coordinate system A to a point in coordinate system B. |
| [out] | quality | Structure to be filled with quality of transformation (optional, ignored if nullptr provided). |
| [in] | timestamp | Timestamp for which to get transformation [us]. |
| [in] | coordinateSystemA | Coordinate system A. |
| [in] | coordinateSystemB | Coordinate system B. |
| [in] | obj | Egomotion handle. |
| 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.
| [out] | poseAtoB | Transform to be filled with transformation mapping a point at time a to a point at time b. |
| [out] | quality | Structure to be filled with quality of transformation (optional, ignored if nullptr provided). |
| [in] | timestamp_a | Timestamp corresponding to beginning of transformation [us]. |
| [in] | timestamp_b | Timestamp corresponding to end of transformation [us]. |
| [in] | obj | Egomotion handle. |
| 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.
The computation will take the yaw rate measurement from the IMU and combine it with currently estimated speed and wheel base. Speed used for estimation will be the reported by dwEgomotion_getEstimation.
| [out] | steeringAngle | Steering angle to be set to estimation from imu yaw rate (can be null, in which case it will not be set) [rad]. |
| [out] | inverseSteeringR | Inverse radius to be set to arc driven by the vehicle. (can be null, in which case it will not be filled) [1/m]. |
| [in] | imuMeasurement | IMU measurement with IMU measured in vehicle coordinate system. |
| [in] | obj | Egomotion handle. |
| DW_API_PUBLIC dwStatus dwEgomotion_estimate | ( | dwEgomotionResult * | pose, |
| dwEgomotionUncertainty * | uncertainty, | ||
| dwTime_t | timestamp_us, | ||
| dwEgomotionConstHandle_t | obj | ||
| ) |
Estimates the state for a given timestamp.
This method does not modify internal state and can only be used to extrapolate motion into the future or interpolate motion between estimates the past.
| [out] | pose | Structure to be filled with estimate state. |
| [out] | uncertainty | Structure to be filled with uncertainties. Can be nullptr if not used. |
| [in] | timestamp_us | Timestamp to estimate state for [us]. |
| [in] | obj | Egomotion handle. |
| DW_API_PUBLIC dwStatus dwEgomotion_getEstimation | ( | dwEgomotionResult * | result, |
| dwEgomotionConstHandle_t | obj | ||
| ) |
Gets the latest state estimate.
| [out] | result | Structure to be filled with latest state estimate. |
| [in] | obj | Egomotion handle. |
| DW_API_PUBLIC dwStatus dwEgomotion_getEstimationTimestamp | ( | dwTime_t * | timestamp, |
| dwEgomotionConstHandle_t | obj | ||
| ) |
Gets the timestamp of the latest state estimate.
The timestamp will be updated after each egomotion filter update.
| [out] | timestamp | Timestamp to be set with latest available state estimate timestamp [us]. |
| [in] | obj | Egomotion handle. |
| DW_API_PUBLIC dwStatus dwEgomotion_getGyroscopeBias | ( | dwVector3f * | gyroBias, |
| dwEgomotionConstHandle_t | obj | ||
| ) |
Get estimated gyroscope bias of the BASE IMU.
| [out] | gyroBias | Vector to be filled with gyroscope biases [rad/s]. |
| [in] | obj | Egomotion handle. |
| DW_API_PUBLIC dwStatus dwEgomotion_getGyroscopeBiasByIndex | ( | dwVector3f * | gyroBias, |
| uint32_t const | sensorIndex, | ||
| dwEgomotionConstHandle_t | obj | ||
| ) |
Get estimated gyroscope bias of specific IMU.
| [out] | gyroBias | Vector to be filled with gyroscope biases [rad/s]. |
| [in] | sensorIndex | IMU sensor index. |
| [in] | obj | Egomotion handle. |
| 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.
| [out] | pose | Structure to be filled with state estimate at the requested index in history (can be null, in which case it will not be filled). |
| [out] | uncertainty | Structure to be filled with uncertainty at the requested index in history (can be null, in which case it will not be filled). |
| [in] | index | Index into the history, in the range [0; dwEgomotion_getHistorySize ), with 0 being latest estimate and last element pointing to oldest estimate. |
| [in] | obj | Egomotion handle. |
| DW_API_PUBLIC dwStatus dwEgomotion_getHistorySize | ( | size_t * | size, |
| dwEgomotionConstHandle_t | obj | ||
| ) |
Returns the number of elements currently stored in the history.
| [out] | size | Integer to be set with the number of elements in the history. |
| [in] | obj | Egomotion handle. |
| DW_API_PUBLIC dwStatus dwEgomotion_getMotionModel | ( | dwMotionModel * | model, |
| dwEgomotionConstHandle_t | obj | ||
| ) |
Returns the type of the motion model used.
| [out] | model | dwMotionModel to be set with the motion model type used by instance specified by the handle. |
| [in] | obj | Egomotion handle. |
| DW_API_PUBLIC dwStatus dwEgomotion_getUncertainty | ( | dwEgomotionUncertainty * | result, |
| dwEgomotionConstHandle_t | obj | ||
| ) |
Gets the latest state estimate uncertainties.
| [out] | result | Structure to be filled with latest uncertainties. |
| [in] | obj | Egomotion handle. |
| DW_API_PUBLIC dwStatus dwEgomotion_hasEstimation | ( | bool * | result, |
| dwEgomotionConstHandle_t | obj | ||
| ) |
Check whether estimation is available.
| [out] | result | Boolean to be set with estimation availablity. |
| [in] | obj | Egomotion handle. |
| DW_API_PUBLIC dwStatus dwEgomotion_initialize | ( | dwEgomotionHandle_t * | obj, |
| const dwEgomotionParameters * | params, | ||
| dwContextHandle_t | ctx | ||
| ) |
Initializes the egomotion module.
Configuration of the module is provided by the params argument. Default parameters can be obtained from the dwEgomotion_initParamsFromRig function.
| [out] | obj | Handle to be set with pointer to created module. |
| [in] | params | A pointer to the configuration parameters of the module. |
| [in] | ctx | Specifies the handler to the context under which the Egomotion module is created. |
| DW_API_PUBLIC dwStatus dwEgomotion_initParamsFromRig | ( | dwEgomotionParameters * | params, |
| dwConstRigHandle_t | rigConfiguration, | ||
| const char * | imuSensorName, | ||
| const char * | vehicleSensorName | ||
| ) |
Initialize egomotion parameters from a provided RigConfiguration.
This will read out vehicle as well as all relevant sensor parameters and apply them on top of default egomotion parameters.
| [out] | params | Structure to be filled out with vehicle and sensor parameters. |
| [in] | rigConfiguration | Handle to a rig configuration to retrieve parameters from. |
| [in] | imuSensorName | name of the IMU sensor to be used (optional, can be null). |
| [in] | vehicleSensorName | name of the vehicle sensor to be used (optional, can be null). |
params.dwEgomotionParameters.sensorParameters.velocityLatencydwEgomotionParameters.sensorParameters.velocityFactor IMU sensor:dwEgomotionParameters.gyroscopeBiasdwEgomotionParameters.imu2rig | 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 their names.
| [out] | params | Structure to be filled out with vehicle and sensor parameters. |
| [in] | rigConfiguration | Handle to a rig configuration to retrieve parameters from |
| [in] | imuSensorIdx | Index of the IMU sensor to be retrieved (optional, can be (uint32_t)-1) |
| [in] | vehicleSensorIdx | Index of the vehicle sensor to be retrieved (optional, can be (uint32_t)-1) |
params.| DW_API_PUBLIC dwStatus dwEgomotion_release | ( | dwEgomotionHandle_t | obj | ) |
Releases the egomotion module.
| [in] | obj | Egomotion handle to be released. |
| DW_API_PUBLIC dwStatus dwEgomotion_reset | ( | dwEgomotionHandle_t | obj | ) |
Resets the state estimate and all history of the egomotion module.
All consecutive motion estimates will be relative to the (new) origin.
| [in] | obj | Egomotion handle to be reset. |
| DW_API_PUBLIC dwStatus dwEgomotion_steeringAngleToSteeringWheelAngle | ( | float32_t * | steeringWheelAngle, |
| float32_t | steeringAngle, | ||
| dwEgomotionHandle_t | obj | ||
| ) |
Convert steering angle to steering wheel angle.
| [out] | steeringWheelAngle | Pointer to steering wheel angle to be set, in radians. |
| [in] | steeringAngle | Steering angle, in radians. |
| [in] | obj | Specifies the egomotion module handle. |
| DW_API_PUBLIC dwStatus dwEgomotion_steeringWheelAngleToSteeringAngle | ( | float32_t * | steeringAngle, |
| float32_t | steeringWheelAngle, | ||
| dwEgomotionHandle_t | obj | ||
| ) |
Convert steering wheel angle to steering angle.
| [out] | steeringAngle | Pointer to steering angle to be set, in radians. |
| [in] | steeringWheelAngle | Steering wheel angle, in radians. |
| [in] | obj | Specifies the egomotion module handle. |
| DW_API_PUBLIC dwStatus dwEgomotion_update | ( | dwTime_t | timestamp_us, |
| dwEgomotionHandle_t | obj | ||
| ) |
Runs the motion model estimation for a given timestamp.
The internal state is modified. The motion model advances to the given timestamp. To retrieve the result of the estimation, use dwEgomotion_getEstimation.
This method allows the user to update the egomotion filter when required, for a specific timestamp, using all sensor data available up to this timestamp.
When the automatic update period is active (automaticUpdate in dwEgomotionParameters is set), dwEgomotion_update will not update the filter state and throw a DW_NOT_SUPPORTED exception instead.
| [in] | timestamp_us | Timestamp for which to estimate vehicle state [us]. |
| [in] | obj | Egomotion handle. |
| 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 coordinate system.
Applies the given extrinsics to the BASE IMU.
| [in] | imuToRig | Transformation from the IMU coordinate system to the vehicle rig coordinate system. |
| [in] | obj | Egomotion handle. |
| DW_API_PUBLIC dwStatus dwEgomotion_updateVehicle | ( | const dwVehicle * | vehicle, |
| dwEgomotionHandle_t | obj | ||
| ) |
Use dwEgomotion2_updateWheelRadii to update wheel radii if needed.
This method updates the egomotion module with an updated vehicle.
| [in] | vehicle | Updated vehicle which may contain updated vehicle parameters. |
| [in] | obj | Egomotion handle. |
| DW_API_PUBLIC dwStatus dwEgomotionState2_createAndBindNvSciBufEmpty | ( | dwEgomotionStateHandle_t * | state, |
| size_t const | historySize, | ||
| NvSciBufObj | nvSciBufObj, | ||
| dwContextHandle_t | ctx | ||
| ) |
Create empty state for a given motion model type and bind the pose history buffer to a NvSciBufObj buffer.
The pose history buffer is pointing to a NvSciBufObj buffer.
| [out] | state | Handle to be set with pointer to created empty state. |
| [in] | historySize | State history size (maximum capacity). If 0, a default size of 1000 is used. |
| [in] | nvSciBufObj | NvSciBufObj for pose history to store |
| [in] | ctx | Handle of the context. |
| DW_API_PUBLIC dwStatus dwEgomotionState2_createAndBindRawBuffer | ( | dwEgomotionStateHandle_t * | state, |
| size_t const | historySize, | ||
| void * | dataPtr, | ||
| size_t | dataSize, | ||
| dwContextHandle_t | ctx | ||
| ) |
Create empty state for a given motion model type and bind the pose history buffer to a raw external buffer The pose history buffer is pointing to a raw external buffer.
| [out] | state | Handle to be set with pointer to created empty state. |
| [in] | historySize | State history size (maximum capacity). If 0, a default size of 1000 is used. |
| [in] | dataPtr | raw data pointer for pose history to store |
| [in] | dataSize | size of the raw memory region |
| [in] | ctx | Handle of the context. |
| DW_API_PUBLIC dwStatus dwEgomotionState2_fillNvSciBufAttrs | ( | NvSciBufAttrList * | outAttrs, |
| size_t const | historySize | ||
| ) |
Filling the NvSciBufAttrList with given motion model type and pose history size.
| [out] | outAttrs | Output NvSciBufAttrList |
| [in] | historySize | State history size (maximum capacity). If 0, a default size of 1000 is used. |
| DW_API_PUBLIC dwStatus dwEgomotionState2_getRawBufferSize | ( | size_t * | outSize, |
| size_t const | historySize | ||
| ) |
Get the raw buffer size required with given motion model type and pose history size.
| [out] | outSize | Output raw buffer size |
| [in] | historySize | State history size (maximum capacity). If 0, a default size of 1000 is used. |