59 #ifndef DW_EGOMOTION_EGOMOTION_H_ 60 #define DW_EGOMOTION_EGOMOTION_H_ 256 typedef struct dwEgomotionLinearAccelFilterParams
259 dwEgomotionLinearAccelerationFilterMode
mode;
362 DW_DEPRECATED(
"Deriving lateral slip coefficient from vehicle parameters, unless this parameter is non-zero.")
370 dwMotionModel motionModel;
375 bool estimateInitialOrientation;
386 bool automaticUpdate;
390 uint32_t historySize;
534 const char* imuSensorName,
const char* vehicleSensorName);
555 uint32_t imuSensorIdx, uint32_t vehicleSensorIdx);
620 dwEgomotionHandle_t obj);
739 dwTime_t timestamp_us, dwEgomotionConstHandle_t obj);
763 dwEgomotionConstHandle_t obj);
851 size_t index, dwEgomotionConstHandle_t obj);
908 dwEgomotionConstHandle_t obj);
927 dwEgomotionHandle_t obj);
946 dwEgomotionHandle_t obj);
952 #endif // DW_EGOMOTION_EGOMOTION_H_ NVIDIA DriveWorks API: Core Types
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.
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.
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.
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
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)].
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.
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]
float32_t measurementNoiseStdevSpeed
Standard deviation of measurement noise in speed [m/s].
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...
dwEgomotionSteeringMeasurementType
Defines steering measurement types.
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.
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
#define DW_DEPRECATED(msg)
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
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...
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...
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_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]
NVIDIA DriveWorks API: Core Methods
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.
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.
DW_API_PUBLIC dwStatus dwEgomotion_initParamsFromRig(dwEgomotionParameters *params, dwConstRigHandle_t rigConfiguration, const char *imuSensorName, const char *vehicleSensorName)
Initialize egomotion parameters from a provided RigConfiguration.
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).
float32_t torsionalSpringPitchNaturalFrequency
Torsional spring model parameters.
DEPRECATED: Properties of a passenger car vehicle.
Indicates that speed is linear speed [m/s] measured at rear axle center (along steering direction)...
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.
NVIDIA DriveWorks API: Core Exports
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...