DriveWorks SDK Reference
5.4.5418 Release
For Test and Development only

EgomotionState.h
Go to the documentation of this file.
1 //
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) 2019-2021 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 
78 #ifndef DW_EGOMOTION_PRODUCER_STATE_H_
79 #define DW_EGOMOTION_PRODUCER_STATE_H_
80 
81 #include "Egomotion.h"
82 
83 #ifdef __cplusplus
84 extern "C" {
85 #endif
86 
87 typedef struct dwEgomotionStateObject* dwEgomotionStateHandle_t;
88 typedef struct dwEgomotionStateObject const* dwConstEgomotionStateHandle_t;
89 
93 typedef struct dwEgomotionStateParams
94 {
97 
99  size_t historySize;
101 
116 dwStatus dwEgomotion_createEmptyState(dwEgomotionStateHandle_t* state, dwEgomotionHandle_t obj);
117 
132 dwStatus dwEgomotion_getState(dwEgomotionStateHandle_t state, dwEgomotionConstHandle_t obj);
133 
147 
148 // --------------------------------------------
149 // State
150 // --------------------------------------------
151 
157  dwEgomotionRelativeUncertainty* uncertainty,
158  dwTime_t timestamp_a, dwTime_t timestamp_b,
159  dwConstEgomotionStateHandle_t obj);
160 
165 dwStatus dwEgomotionState_getEstimationTimestamp(dwTime_t* timestamp, dwConstEgomotionStateHandle_t obj);
166 
171 dwStatus dwEgomotionState_getEstimation(dwEgomotionResult* result, dwConstEgomotionStateHandle_t obj);
172 
177 dwStatus dwEgomotionState_getUncertainty(dwEgomotionUncertainty* result, dwConstEgomotionStateHandle_t obj);
178 
183 dwStatus dwEgomotionState_getGyroscopeBias(dwVector3f* gyroBias, dwConstEgomotionStateHandle_t obj);
184 
189 dwStatus dwEgomotionState_getHistorySize(size_t* num, dwConstEgomotionStateHandle_t obj);
190 
195 dwStatus dwEgomotionState_getHistoryCapacity(size_t* capacity, dwConstEgomotionStateHandle_t obj);
196 
202  size_t index, dwConstEgomotionStateHandle_t obj);
203 
208 dwStatus dwEgomotionState_getMotionModel(dwMotionModel* model, dwConstEgomotionStateHandle_t obj);
209 
231 dwStatus dwEgomotionState_createEmpty(dwEgomotionStateHandle_t* state, dwEgomotionStateParams params, dwContextHandle_t ctx);
232 
242 dwStatus dwEgomotionState_release(dwEgomotionStateHandle_t state);
243 
255 dwStatus dwEgomotionState_getMaxNumBytes(size_t* bufferSize, dwConstEgomotionStateHandle_t state);
256 
271 dwStatus dwEgomotionState_serialize(size_t* numBytes, uint8_t* buffer, size_t bufferSize, dwConstEgomotionStateHandle_t state);
272 
288 dwStatus dwEgomotionState_deserialize(const uint8_t* buffer, size_t bufferSize, dwEgomotionStateHandle_t state);
289 
302 dwStatus dwEgomotionState_copy(dwEgomotionStateHandle_t state, dwConstEgomotionStateHandle_t source);
303 
304 #ifdef __cplusplus
305 }
306 #endif
307 
308 #endif // DW_EGOMOTION_PRODUCER_STATE_H_
DW_API_PUBLIC dwStatus dwEgomotionState_release(dwEgomotionStateHandle_t state)
Releases the egomotion state previously created with dwEgomotionState_createEmpty().
DW_API_PUBLIC dwStatus dwEgomotionState_getMaxNumBytes(size_t *bufferSize, dwConstEgomotionStateHandle_t state)
Get maximal number of bytes required for a buffer to contain serialized state.
NVIDIA DriveWorks API: Egomotion Methods
DW_API_PUBLIC dwStatus dwEgomotionState_getHistoryCapacity(size_t *capacity, dwConstEgomotionStateHandle_t obj)
DW_API_PUBLIC dwStatus dwEgomotionState_createEmpty(dwEgomotionStateHandle_t *state, dwEgomotionStateParams params, dwContextHandle_t ctx)
Create empty state for a given motion model type.
DW_API_PUBLIC dwStatus dwEgomotionState_getMotionModel(dwMotionModel *model, dwConstEgomotionStateHandle_t obj)
Defines a three-element floating-point vector.
Definition: Types.h:323
struct dwEgomotionStateObject * dwEgomotionStateHandle_t
DW_API_PUBLIC dwStatus dwEgomotionState_computeRelativeTransformation(dwTransformation3f *poseAtoB, dwEgomotionRelativeUncertainty *uncertainty, dwTime_t timestamp_a, dwTime_t timestamp_b, dwConstEgomotionStateHandle_t obj)
DW_API_PUBLIC dwStatus dwEgomotion_getHistoryCapacity(size_t *capacity, dwEgomotionConstHandle_t obj)
Returns the capacity of the history, i.e.
DW_API_PUBLIC dwStatus dwEgomotionState_getHistoryElement(dwEgomotionResult *pose, dwEgomotionUncertainty *uncertainty, size_t index, dwConstEgomotionStateHandle_t obj)
dwMotionModel type
Type of the motion model used to hold data by the state.
Holds egomotion uncertainty estimates for a relative motion estimate.
Definition: Egomotion.h:520
DW_API_PUBLIC dwStatus dwEgomotionState_serialize(size_t *numBytes, uint8_t *buffer, size_t bufferSize, dwConstEgomotionStateHandle_t state)
Serialize the state out into the provided buffer.
DW_API_PUBLIC dwStatus dwEgomotionState_copy(dwEgomotionStateHandle_t state, dwConstEgomotionStateHandle_t source)
Copy existing egomotion state to preallocated state handle.
DW_API_PUBLIC dwStatus dwEgomotionState_getEstimation(dwEgomotionResult *result, dwConstEgomotionStateHandle_t obj)
DW_API_PUBLIC dwStatus dwEgomotionState_getEstimationTimestamp(dwTime_t *timestamp, dwConstEgomotionStateHandle_t obj)
Specifies a 3D rigid transformation.
Definition: Types.h:467
size_t historySize
Maximal number of elements to keep in history.
struct dwEgomotionStateObject const * dwConstEgomotionStateHandle_t
DW_API_PUBLIC dwStatus dwEgomotion_createEmptyState(dwEgomotionStateHandle_t *state, dwEgomotionHandle_t obj)
Create empty state from the given egomotion module.
dwStatus
Status definition.
Definition: Status.h:180
struct dwEgomotionObject * dwEgomotionHandle_t
Definition: Egomotion.h:77
int64_t dwTime_t
Specifies a timestamp unit, in microseconds.
Definition: Types.h:82
dwMotionModel
Defines the motion models.
Definition: Egomotion.h:81
struct dwEgomotionObject const * dwEgomotionConstHandle_t
Definition: Egomotion.h:78
DW_API_PUBLIC dwStatus dwEgomotionState_getUncertainty(dwEgomotionUncertainty *result, dwConstEgomotionStateHandle_t obj)
DW_API_PUBLIC dwStatus dwEgomotionState_getGyroscopeBias(dwVector3f *gyroBias, dwConstEgomotionStateHandle_t obj)
Holds egomotion uncertainty estimates.
Definition: Egomotion.h:502
Holds egomotion state estimate.
Definition: Egomotion.h:470
struct dwContextObject * dwContextHandle_t
Context handle.
Definition: Context.h:79
DW_API_PUBLIC dwStatus dwEgomotionState_getHistorySize(size_t *num, dwConstEgomotionStateHandle_t obj)
DW_API_PUBLIC dwStatus dwEgomotionState_deserialize(const uint8_t *buffer, size_t bufferSize, dwEgomotionStateHandle_t state)
Deserialize the state from the provided buffer.
#define DW_API_PUBLIC
Definition: Exports.h:54
DW_API_PUBLIC dwStatus dwEgomotion_getState(dwEgomotionStateHandle_t state, dwEgomotionConstHandle_t obj)
Fills out already preallocated state handle.
Defines egomotion state initialization parameters.