DriveWorks SDK Reference
5.16.65 Release
For Test and Development only

Egomotion.h
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) 2015-2023 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
59#ifndef DW_EGOMOTION_BASE_EGOMOTION_H_
60#define DW_EGOMOTION_BASE_EGOMOTION_H_
61
62#include <dw/core/base/Config.h>
65#include <dw/core/base/Types.h>
66
68
69#include <dw/sensors/imu/IMU.h>
70
71#include <dw/rig/Rig.h>
73
74#include "EgomotionTypes.h"
75
76#ifdef __cplusplus
77extern "C" {
78#endif
79
83typedef struct dwEgomotionObject* dwEgomotionHandle_t;
84
88typedef struct dwEgomotionObject const* dwEgomotionConstHandle_t;
89
95
127 const char* imuSensorName, const char* vehicleSensorName);
128
148 uint32_t imuSensorIdx, uint32_t vehicleSensorIdx);
149
166
178
191
217DW_DEPRECATED("Use dwEgomotion_addVehicleState instead.")
219 float32_t measuredValue, dwTime_t timestamp,
221
255
292 dwVehicleIONonSafetyState const* nonSafeState,
293 dwVehicleIOActuationFeedback const* actuationFeedback,
295
309
329
344
376
400 dwTime_t timestamp_us, dwEgomotionConstHandle_t obj);
401
423 dwTime_t timestamp_a, dwTime_t timestamp_b,
425
451 dwTime_t const timestamp,
452 dwCoordinateSystem const coordinateSystemA,
453 dwCoordinateSystem const coordinateSystemB,
454 dwEgomotionConstHandle_t const obj);
455
470
483
497
513
528
543
561 size_t index, dwEgomotionConstHandle_t obj);
562
575
576//-----------------------------
577// utility functions
578
593 const dwTransformation3f* vehicleAToB,
594 const dwTransformation3f* vehicleToWorldAtA);
595
615DW_DEPRECATED("dwEgomotion_computeSteeringAngleFromIMU() is deprecated and will be removed soon. ")
617 float32_t* inverseSteeringR,
618 const dwIMUFrame* imuMeasurement,
620
639
658
659#ifdef __cplusplus
660}
661#endif
663#endif // DW_EGOMOTION_BASE_EGOMOTION_H_
NVIDIA DriveWorks API: Core Methods
NVIDIA DriveWorks API: Coordinate Systems
dwMotionModelMeasurement
Defines motion measurements.
dwMotionModel
Defines the motion models.
Holds initialization parameters for the Egomotion module.
Instantaneous state estimate.
Relative transformation validity and uncertainty.
Instantaneous state uncertainty estimates.
dwStatus
Status definition.
Definition: ErrorDefs.h:44
This structure contains one frame of data from a IMU sensor.
Definition: IMUTypes.h:369
NVIDIA DriveWorks API: IMU
Defines a three-element floating-point vector.
Definition: MatrixTypes.h:76
NVIDIA DriveWorks API: Rig Configuration
NVIDIA DriveWorks API: Core Types
NVIDIA DriveWorks API: VehicleIO car controller
NVIDIA DriveWorks API: Core Exports
Non-safety critical RoV state.
Safety critical VIO state.
The vehicle IO state data.
dwCoordinateSystem
Coordinate systems.
float float32_t
Specifies POD types.
Definition: BasicTypes.h:59
int64_t dwTime_t
Specifies a timestamp unit, in microseconds.
Definition: BasicTypes.h:65
struct dwContextObject * dwContextHandle_t
Context handle.
Definition: Context.h:86
#define DW_DEPRECATED(msg)
Definition: Exports.h:68
#define DW_API_PUBLIC
Definition: Exports.h:56
DW_API_PUBLIC dwStatus dwEgomotion_getEstimation(dwEgomotionResult *result, dwEgomotionConstHandle_t obj)
Gets the latest state estimate.
DW_API_PUBLIC dwStatus dwEgomotion_getMotionModel(dwMotionModel *model, dwEgomotionConstHandle_t obj)
Returns the type of the motion model used.
DW_API_PUBLIC dwStatus dwEgomotion_getGyroscopeBias(dwVector3f *gyroBias, dwEgomotionConstHandle_t obj)
Get estimated gyroscope bias.
DW_API_PUBLIC dwStatus dwEgomotion_getUncertainty(dwEgomotionUncertainty *result, dwEgomotionConstHandle_t obj)
Gets the latest state estimate uncertainties.
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_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.
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...
DW_API_PUBLIC dwStatus dwEgomotion_hasEstimation(bool *result, dwEgomotionConstHandle_t obj)
Check whether estimation is available.
struct dwEgomotionObject const * dwEgomotionConstHandle_t
Const Egomotion Handle.
Definition: Egomotion.h:88
dwEgomotionTransformationQuality dwEgomotionRelativeUncertainty
Backwards compatibility between dwEgomotionRelativeUncertainty (old) and dwEgomotionTransformationQua...
Definition: Egomotion.h:94
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_getHistoryElement(dwEgomotionResult *pose, dwEgomotionUncertainty *uncertainty, size_t index, dwEgomotionConstHandle_t obj)
Returns an element from the motion history that is currently available.
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.
DW_API_PUBLIC dwStatus dwEgomotion_reset(dwEgomotionHandle_t obj)
Resets the state estimate and all history of the egomotion module.
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_getEstimationTimestamp(dwTime_t *timestamp, dwEgomotionConstHandle_t obj)
Gets the timestamp of the latest state estimate.
DW_API_PUBLIC dwStatus dwEgomotion_initialize(dwEgomotionHandle_t *obj, const dwEgomotionParameters *params, dwContextHandle_t ctx)
Initializes the egomotion module.
DW_API_PUBLIC dwStatus dwEgomotion_getHistorySize(size_t *size, dwEgomotionConstHandle_t obj)
Returns the number of elements currently stored in the history.
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...
DW_API_PUBLIC dwStatus dwEgomotion_steeringWheelAngleToSteeringAngle(float32_t *steeringAngle, float32_t steeringWheelAngle, dwEgomotionHandle_t obj)
Convert steering wheel angle to steering angle.
DW_API_PUBLIC dwStatus dwEgomotion_addVehicleState(const dwVehicleIOState *state, dwEgomotionHandle_t obj)
Notifies the egomotion module of a changed vehicle state.
DW_API_PUBLIC dwStatus dwEgomotion_initParamsFromRig(dwEgomotionParameters *params, dwConstRigHandle_t rigConfiguration, const char *imuSensorName, const char *vehicleSensorName)
Initialize egomotion parameters from a provided RigConfiguration.
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.
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...
struct dwEgomotionObject * dwEgomotionHandle_t
Egomotion Handle.
Definition: Egomotion.h:83
DW_API_PUBLIC dwStatus dwEgomotion_release(dwEgomotionHandle_t obj)
Releases the egomotion module.
DW_API_PUBLIC dwStatus dwEgomotion_update(dwTime_t timestamp_us, dwEgomotionHandle_t obj)
Runs the motion model estimation for a given timestamp.
DW_API_PUBLIC dwStatus dwEgomotion_addIMUMeasurement(const dwIMUFrame *imu, dwEgomotionHandle_t obj)
Adds an IMU frame to the egomotion module.
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_estimate(dwEgomotionResult *pose, dwEgomotionUncertainty *uncertainty, dwTime_t timestamp_us, dwEgomotionConstHandle_t obj)
Estimates the state for a given timestamp.
struct dwRigObject const * dwConstRigHandle_t
Handle representing the const Rig interface.
Definition: Rig.h:74
DEPRECATED: Properties of a passenger car vehicle.
Definition: Vehicle.h:354
Specifies a 3D rigid transformation.
Definition: MatrixTypes.h:182