61 #ifndef DW_EGOMOTION_EGOMOTION_H_ 62 #define DW_EGOMOTION_EGOMOTION_H_ 64 #include <dw/core/Config.h> 166 DW_EGOMOTION_MEASURMENT_STEERINGANGLE
DW_DEPRECATED_ENUM(
"Use DW_EGOMOTION_MEASUREMENT_STEERINGANGLE") = 1,
168 DW_EGOMOTION_MEASURMENT_STEERINGWHEELANGLE
DW_DEPRECATED_ENUM(
"Use DW_EGOMOTION_MEASUREMENT_STEERINGWHEELANGLE") = 2,
232 typedef struct dwEgomotionLinearAccelFilterParams
235 dwEgomotionLinearAccelerationFilterMode
mode;
502 const char* imuSensorName,
const char* canSensorName);
520 uint32_t imuSensorIdx, uint32_t canSensorIdx);
584 dwEgomotionHandle_t obj);
702 dwTime_t timestamp_us, dwEgomotionConstHandle_t obj);
726 dwEgomotionConstHandle_t obj);
814 size_t index, dwEgomotionConstHandle_t obj);
871 dwEgomotionConstHandle_t obj);
890 dwEgomotionHandle_t obj);
909 dwEgomotionHandle_t obj);
915 #endif // DW_EGOMOTION_EGOMOTION_H_ DW_API_PUBLIC dwStatus dwEgomotion_getUncertainty(dwEgomotionUncertainty *result, dwEgomotionConstHandle_t obj)
Gets the latest state estimate uncertainties.
float32_t imuSamplingRateHz
If known this entry shall indicate expected sampling rate in [Hz] of the IMU sensor.
Suspension model type and parameters.
DW_API_PUBLIC dwStatus dwEgomotion_initParamsFromRig(dwEgomotionParameters *params, dwConstRigHandle_t rigConfiguration, const char *imuSensorName, const char *canSensorName)
Initialize egomotion parameters from a provided RigConfiguration.
NVIDIA DriveWorks API: Core Types
float float32_t
Specifies POD types.
indicates validity of linearVelocity[0]
NVIDIA DriveWorks API: Rig Configuration
indicates validity of linearVelocity[2]
Fuses odometry model with IMU measurements to estimate motion of the vehicle.
indicates validity of linearAcceleration[1]
indicates validity of linearAcceleration[0]
dwEgomotionDataField
Defines flags that indicate validity of corresponding data in dwEgomotionResult and dwEgomotionUncert...
float32_t measurementNoiseStdevAcceleration
Standard deviation of measurement noise in acceleration [m/s^2].
DW_API_PUBLIC dwStatus dwEgomotion_addOdometry(dwMotionModelMeasurement measuredType, float32_t measuredValue, dwTime_t timestamp, dwEgomotionHandle_t obj)
Notifies the egomotion module of a new odometry measurement.
float32_t velocityFactor
CAN velocity correction factor which is read from can properties in rig file.
Models suspension as single-axis damped torsional spring.
bool valid
indicates whether uncertainty estimates are valid or not
DW_API_PUBLIC dwStatus dwEgomotion_addIMUMeasurement(const dwIMUFrame *imu, dwEgomotionHandle_t obj)
Adds an IMU frame to the egomotion module.
indicates validity of angularVelocity[0]
NVIDIA DriveWorks API: VehicleIO car controller
DW_API_PUBLIC dwStatus dwEgomotion_initParamsFromRigByIndex(dwEgomotionParameters *params, dwConstRigHandle_t rigConfiguration, uint32_t imuSensorIdx, uint32_t canSensorIdx)
Same as dwEgomotion_initParamsFromRig however uses sensor indices in rigConfiguration instead of thei...
indicates validity of angularVelocity[2]
Defines a single-precision quaternion.
DW_API_PUBLIC dwStatus dwEgomotion_getEstimation(dwEgomotionResult *result, dwEgomotionConstHandle_t obj)
Gets the latest state estimate.
float32_t processNoiseStdevAcceleration
Square root of continuous time process noise covariance in acceleration [m/s^2 * 1/sqrt(s)].
dwEgomotionSpeedMeasurementType speedMeasurementType
Defines which velocity readings from dwVehicleIOState shall be used for egomotion estimation...
bool estimateInitialOrientation
When enabled, initial rotation will be estimated from accelerometer measurements. ...
DW_API_PUBLIC dwStatus dwEgomotion_addVehicleState(const dwVehicleIOState *state, dwEgomotionHandle_t obj)
Notifies the egomotion module of a changed vehicle state.
dwTime_t timeInterval
relative motion time interval [us]
int32_t validFlags
Bitwise combination of dwEgomotionDataField flags.
Holds egomotion uncertainty estimates for a relative motion estimate.
dwEgomotionLinearAccelerationFilterParams linearAccelerationFilterParameters
Linear acceleration filter parameters.
float32_t accNoiseDensityMicroG
Expected zero mean measurement noise of the linear accelerometer, also known as Noise Density [ug/sqr...
dwMatrix3f rotation
a 3x3 covariance of the rotation (order: roll, pitch, yaw) [rad]
NVIDIA DriveWorks API: Core Methods
float32_t measurementNoiseStdevSpeed
Standard deviation of measurement noise in speed [m/s].
float32_t lateralSlipCoefficient
Lateral slip coefficient [rad*s^2/m].
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.
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...
float32_t gyroBiasRange
If known this value in [rad/s] shall indicate standard deviation of the expected bias range of the gy...
dwEgomotionSuspensionParameters suspension
Suspension model parameters.
indicates validity of rotation,
Sensor measurement noise characteristics.
DW_API_PUBLIC dwStatus dwEgomotion_update(dwTime_t timestamp_us, dwEgomotionHandle_t obj)
Runs the motion model estimation for a given timestamp.
dwMotionModel motionModel
Specifies the motion model to be used for pose estimation.
uint32_t historySize
Number of state estimates to keep in the history (if 0 specified default of 1000 is used)...
dwStatus
Status definition.
float32_t accelerationFilterTimeConst
Time constant of the IMU acceleration measurements.
struct dwEgomotionObject * dwEgomotionHandle_t
DW_API_PUBLIC dwStatus dwEgomotion_release(dwEgomotionHandle_t obj)
Releases the egomotion module.
DW_API_PUBLIC dwStatus dwEgomotion_getHistorySize(size_t *num, dwEgomotionConstHandle_t obj)
Returns the number of elements currently stored in the history.
indicates validity of linearVelocity[1]
DW_API_PUBLIC dwStatus dwEgomotion_getEstimationTimestamp(dwTime_t *timestamp, dwEgomotionConstHandle_t obj)
Gets the timestamp of the latest state estimate.
int64_t dwTime_t
Specifies a timestamp unit, in microseconds.
dwMotionModel
Defines the motion models.
DW_API_PUBLIC dwStatus dwEgomotion_estimate(dwEgomotionResult *pose, dwEgomotionUncertainty *uncertainty, dwTime_t timestamp_us, dwEgomotionConstHandle_t obj)
Estimates the state for a given timestamp.
DW_API_PUBLIC dwStatus dwEgomotion_reset(dwEgomotionHandle_t obj)
Resets the state estimate and all history of the egomotion module.
no filtering of the output linear acceleration
float32_t torsionalSpringPitchDampingRatio
Level of damping relative to critical damping around the pitch axis of the vehicle [dimensionless]...
float32_t processNoiseStdevSpeed
Square root of continuous time process noise covariance in speed [m/s * 1/sqrt(s)].
dwTime_t timestamp
Timestamp of egomotion state estimate [us].
DW_API_PUBLIC dwStatus dwEgomotion_computeRelativeTransformation(dwTransformation3f *poseAtoB, dwEgomotionRelativeUncertainty *uncertainty, dwTime_t timestamp_a, dwTime_t timestamp_b, dwEgomotionConstHandle_t obj)
Computes the relative transformation between two timestamps and the uncertainty of this transform...
dwEgomotionSuspensionModel model
Suspension model to use.
An IMU frame containing sensor readings from the IMU sensor.
struct dwEgomotionObject const * dwEgomotionConstHandle_t
dwTime_t velocityLatency
CAN velocity latency in microseconds which is read from can properties in rig file.
struct dwRigObject const * dwConstRigHandle_t
dwTransformation3f imu2rig
IMU extrinsics.
Defines a 3x3 matrix of floating point numbers.
float32_t gyroNoiseDensityDeg
Expected zero mean measurement noise of the gyroscope, also known as Noise Density [deg/s/sqrt(Hz)] A...
bool automaticUpdate
Automatically update state estimation.
DW_API_PUBLIC dwStatus dwEgomotion_hasEstimation(bool *result, dwEgomotionConstHandle_t obj)
Check whether has state estimate.
dwEgomotionLinearAccelerationFilterMode
Defines egomotion linear acceleration filter mode.
Defines egomotion linear acceleration filter parameters.
DW_API_PUBLIC dwStatus dwEgomotion_getHistoryElement(const dwEgomotionResult **pose, const dwEgomotionUncertainty **uncertainty, size_t index, dwEgomotionConstHandle_t obj)
Returns an element from the motion history that is currently available.
DW_API_PUBLIC dwStatus dwEgomotion_steeringWheelAngleToSteeringAngle(float32_t *steeringAngle, float32_t steeringWheelAngle, dwEgomotionHandle_t obj)
Convert steering wheel angle to steering angle.
dwVehicle vehicle
Vehicle parameters to setup the model.
Holds egomotion uncertainty estimates.
Indicates that speeds are angular speeds [rad/s] measured at rear wheels.
Holds egomotion state estimate.
dwTime_t timestamp
Timestamp of egomotion uncertainty estimate [us].
struct dwContextObject * dwContextHandle_t
Context handle.
dwMatrix3f translation
a 3x3 covariance of the translation (x,y,z) [m]
dwEgomotionSpeedMeasurementType
Defines speed measurement types.
dwEgomotionLinearAccelerationFilterMode mode
Linear acceleration filter mode. Default (0): no filtering.
No suspension model. Equivalent to perfectly rigid suspension.
DW_API_PUBLIC dwStatus dwEgomotion_getMotionModel(dwMotionModel *model, dwEgomotionConstHandle_t obj)
Returns the type of the motion model used.
DW_API_PUBLIC dwStatus dwEgomotion_initialize(dwEgomotionHandle_t *obj, const dwEgomotionParameters *params, dwContextHandle_t ctx)
Initializes the egomotion module.
Steering wheel angle [rad].
Holds initialization parameters for the Egomotion module.
NVIDIA DriveWorks API: Core Exports
Indicates that speed is linear speed [m/s] measured at front wheels (along steering direction)...
DW_API_PUBLIC dwStatus dwEgomotion_steeringAngleToSteeringWheelAngle(float32_t *steeringWheelAngle, float32_t steeringAngle, dwEgomotionHandle_t obj)
Convert steering angle to steering wheel angle.
float32_t gyroDriftRate
Expected gyroscope drift rate in [deg/s].
indicates validity of linearAcceleration[2]
simple low-pass filtering of the acceleration
dwMotionModelMeasurement
Defines motion measurements.
dwEgomotionSuspensionModel
Defines egomotion suspension model.
NVIDIA DriveWorks API: IMU
Given odometry information, estimates motion of the vehicle using a bicycle model.
dwQuaternionf rotation
Rotation represented as quaternion (x,y,z,w).
dwEgomotionSensorCharacteristics sensorParameters
Sensor parameters, containing information about sensor characteristics.
float32_t torsionalSpringPitchNaturalFrequency
Torsional spring model parameters.
DEPRECATED: Properties of a passenger car vehicle.
indicates validity of angularVelocity[1]
DW_API_PUBLIC dwStatus dwEgomotion_updateVehicle(const dwVehicle *vehicle, dwEgomotionHandle_t obj)
This method updates the egomotion module with an updated vehicle.
DW_API_PUBLIC dwStatus dwEgomotion_applyRelativeTransformation(dwTransformation3f *newVehicle2World, const dwTransformation3f *poseOld2New, const dwTransformation3f *oldVehicle2World)
Applies the estimated relative motion as returned by dwEgomotion_computeRelativeTransformation() to a...