DriveWorks SDK Reference
5.14.77 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
121 const char* imuSensorName, const char* vehicleSensorName);
122
142 uint32_t imuSensorIdx, uint32_t vehicleSensorIdx);
143
160
172
185
211DW_DEPRECATED("Use dwEgomotion_addVehicleState instead.")
213 float32_t measuredValue, dwTime_t timestamp,
215
249
286 dwVehicleIONonSafetyState const* nonSafeState,
287 dwVehicleIOActuationFeedback const* actuationFeedback,
289
303
323
338
370
394 dwTime_t timestamp_us, dwEgomotionConstHandle_t obj);
395
417 dwTime_t timestamp_a, dwTime_t timestamp_b,
419
444 dwEgomotionRelativeUncertainty* const uncertainty,
445 dwTime_t const timestamp,
446 dwCoordinateSystem const coordinateSystemA,
447 dwCoordinateSystem const coordinateSystemB,
448 dwEgomotionConstHandle_t const obj);
449
464
477
491
507
522
537
555 size_t index, dwEgomotionConstHandle_t obj);
556
569
570//-----------------------------
571// utility functions
572
587 const dwTransformation3f* vehicleAToB,
588 const dwTransformation3f* vehicleToWorldAtA);
589
609DW_DEPRECATED("dwEgomotion_computeSteeringAngleFromIMU() is deprecated and will be removed soon. ")
611 float32_t* inverseSteeringR,
612 const dwIMUFrame* imuMeasurement,
614
633
652
653#ifdef __cplusplus
654}
655#endif
657#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.
Holds egomotion uncertainty estimates for a relative motion estimate.
Holds egomotion state estimate.
Holds egomotion uncertainty estimates.
dwStatus
Status definition.
Definition: ErrorDefs.h:45
This structure contains one frame of data from a IMU sensor.
Definition: IMUTypes.h:366
NVIDIA DriveWorks API: IMU
Defines a three-element floating-point vector.
Definition: MatrixTypes.h:79
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. Fields only set if supported by VehicleIO driver.
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:66
#define DW_API_PUBLIC
Definition: Exports.h:54
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_hasEstimation(bool *result, dwEgomotionConstHandle_t obj)
Check whether estimation is available.
struct dwEgomotionObject const * dwEgomotionConstHandle_t
Const Egomotion Handle.
Definition: Egomotion.h:88
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_computeBodyTransformation(dwTransformation3f *const transformationAToB, dwEgomotionRelativeUncertainty *const uncertainty, 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_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.
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
Definition: Rig.h:73
DEPRECATED: Properties of a passenger car vehicle.
Definition: Vehicle.h:354
Specifies a 3D rigid transformation.
Definition: MatrixTypes.h:186