Provides global location and orientation estimation functionality.
|
| DW_API_PUBLIC dwStatus | dwGlobalEgomotion_initParamsFromRig (dwGlobalEgomotionParameters *params, dwConstRigHandle_t rigConfiguration, const char *gpsSensorName) |
| | Initialize global egomotion parameters from a provided RigConfiguration. More...
|
| |
| DW_API_PUBLIC dwStatus | dwGlobalEgomotion_initialize (dwGlobalEgomotionHandle_t *handle, const dwGlobalEgomotionParameters *params, dwContextHandle_t ctx) |
| | Initializes the global egomotion module. More...
|
| |
| DW_API_PUBLIC dwStatus | dwGlobalEgomotion_reset (dwGlobalEgomotionHandle_t handle) |
| | Resets the state estimate and all history of the global egomotion module. More...
|
| |
| DW_API_PUBLIC dwStatus | dwGlobalEgomotion_release (dwGlobalEgomotionHandle_t handle) |
| | Releases the global egomotion module. More...
|
| |
| DW_API_PUBLIC dwStatus | dwGlobalEgomotion_addRelativeMotion (const dwEgomotionResult *egomotionResult, const dwEgomotionUncertainty *egomotionUncertainty, dwGlobalEgomotionHandle_t handle) |
| |
| DW_API_PUBLIC dwStatus | dwGlobalEgomotion_addGPSMeasurement (const dwGPSFrame *measurement, dwGlobalEgomotionHandle_t handle) |
| | Adds GPS measurement to the global egomotion module. More...
|
| |
| DW_API_PUBLIC dwStatus | dwGlobalEgomotion_getTimestamp (dwTime_t *timestamp, dwGlobalEgomotionConstHandle_t handle) |
| | Get timestamp of current filter estimate. More...
|
| |
| DW_API_PUBLIC dwStatus | dwGlobalEgomotion_getEstimate (dwGlobalEgomotionResult *result, dwGlobalEgomotionUncertainty *uncertainty, dwGlobalEgomotionConstHandle_t handle) |
| | Get current filter state estimate. More...
|
| |
| DW_API_PUBLIC dwStatus | dwGlobalEgomotion_computeEstimate (dwGlobalEgomotionResult *result, dwGlobalEgomotionUncertainty *uncertainty, dwTime_t timestamp, dwGlobalEgomotionConstHandle_t handle) |
| | Computes global state estimate at given timestamp, if necessary by linear interpolation between available history entries. More...
|
| |
| DW_API_PUBLIC dwStatus | dwGlobalEgomotion_getHistorySize (size_t *num, dwGlobalEgomotionConstHandle_t handle) |
| | Returns the number of estimates currently stored in the history. More...
|
| |
| DW_API_PUBLIC dwStatus | dwGlobalEgomotion_getHistoryEntry (dwGlobalEgomotionResult *result, dwGlobalEgomotionUncertainty *uncertainty, size_t index, dwGlobalEgomotionConstHandle_t handle) |
| | Returns an entry from the history array. More...
|
| |
| DW_API_PUBLIC dwStatus | dwGlobalEgomotion_addRelativeMotionState (dwConstEgomotionStateHandle_t relativeEgomotionStateHandle, dwGlobalEgomotionHandle_t handle) |
| | Adds relative egomotion estimate to the global egomotion module. More...
|
| |
◆ dwGlobalEgomotionConstHandle_t
◆ dwGlobalEgomotionHandle_t
◆ dwGNSSCharacteristics
◆ dwGlobalEgomotion_addGPSMeasurement()
Adds GPS measurement to the global egomotion module.
Valid GPS measurements must contain longitude, latitude and altitude signals. When present, the data is further monitored with e.g. timestamp monotonicity checks.
- Parameters
-
| [in] | measurement | GPS measurement. |
| [in] | handle | Global Egomotion handle. |
- Note
- providing GPS measurements only isn't sufficient to generate a state estimate, call
dwGlobalEgomotion_addRelativeMotionState() to provide the relative egomotion state estimate and generate new estimates.
- Returns
- DW_INVALID_HANDLE - if the provided handle is invalid
DW_INVALID_ARGUMENT - if the provided GPS frame is an invalid pointer
DW_SUCCESS - GPS data was passed into global egomotion.
DW_NOT_SUPPORTED - if the provided global egomotion handle doesn't support this functionality
- API Group
- Init: Yes
- Runtime: Yes
- De-Init: Yes
◆ dwGlobalEgomotion_addRelativeMotion()
- Deprecated:
- Use dwGlobalEgomotion_addRelativeMotionState with relative egomotion state handle instead.
Adds relative egomotion estimate to the global egomotion module.
- Parameters
-
| [in] | egomotionResult | State estimate provided by relative egomotion. |
| [in] | egomotionUncertainty | Uncertainty estimate provided by relative egomotion. |
| [in] | handle | Global Egomotion handle. |
- Note
- the state and state uncertainty estimates are required to at least have the following flags set:
- DW_EGOMOTION_ROTATION
- DW_EGOMOTION_LIN_VEL_X
- DW_EGOMOTION_ANG_VEL_Z If any of those flags isn't set, the provided estimate will be ignored and this method will return DW_INVALID_ARGUMENT.
- Returns
- DW_INVALID_ARGUMENT - if any input arguments are invalid, or if the relative egomotion estimates are missing required flags or the timestamp isn't more recent that previous
DW_INVALID_HANDLE - if the provided handle is invalid
DW_NOT_SUPPORTED - if the global egomotion handle doesn't support this functionality
DW_NOT_READY - no new estimate was added to history; filter missing GPS data or estimate timestamp isn't more recent than current estimate timestamp.
DW_SUCCESS - a new estimate has been added to the history
- API Group
- Init: Yes
- Runtime: Yes
- De-Init: Yes
◆ dwGlobalEgomotion_addRelativeMotionState()
Adds relative egomotion estimate to the global egomotion module.
Adds the relative egomotion state, steps the filter up to the most recent relative egomotion estimate, and processes monitoring results if the filter stepped.
- Parameters
-
| [in] | relativeEgomotionStateHandle | Handle to the relative egomotion state. |
| [in] | handle | Global Egomotion handle. |
- Note
- the state and state uncertainty estimates computed from the relative egomotion state handle are required to at least have the following flags set:
- DW_EGOMOTION_ROTATION
- DW_EGOMOTION_LIN_VEL_X
- DW_EGOMOTION_ANG_VEL_Z If any of those flags isn't set, the provided estimate will be ignored and this method will return DW_INVALID_ARGUMENT.
- Returns
- DW_INVALID_ARGUMENT - if any input arguments are invalid, or if the relative egomotion estimates are missing required flags or the timestamp isn't more recent that previous
DW_INVALID_HANDLE - if the provided egomotion state handle or the global egomotion handle is invalid
DW_NOT_SUPPORTED - if the relative egomotion rotation estimate is not relative to local frame
DW_NOT_READY - no new estimate was added to history; filter missing GPS data or estimate timestamp isn't more recent than current estimate timestamp.
DW_SUCCESS - a new estimate has been added to the history
- API Group
- Init: Yes
- Runtime: Yes
- De-Init: Yes
◆ dwGlobalEgomotion_computeEstimate()
Computes global state estimate at given timestamp, if necessary by linear interpolation between available history entries.
This API currently supports linear extrapolation, limited to 1 second. The uncertainty estimates are not extrapolated and held constant.
This method does not modify the filter state.
- Parameters
-
| [out] | result | Global state estimate. |
| [out] | uncertainty | Global state uncertainty estimate (optional, can be null). |
| [in] | timestamp | Timestamp for which to provide position estimate [us]. |
| [in] | handle | Global Egomotion module handle. |
- Returns
- DW_INVALID_ARGUMENT - if provided pointers are invalid
DW_INVALID_HANDLE - if the provided handle is invalid
DW_NOT_AVAILABLE - no state estimate available yet
DW_SUCCESS - estimates successfully returned
- API Group
- Init: Yes
- Runtime: Yes
- De-Init: Yes
◆ dwGlobalEgomotion_getEstimate()
Get current filter state estimate.
- Parameters
-
| [out] | result | Current filter state estimate. |
| [out] | uncertainty | Current global state uncertainty estimate (optional, can be null). |
| [in] | handle | Global Egomotion module handle. |
- Returns
- DW_INVALID_ARGUMENT - if provided pointers are invalid
DW_INVALID_HANDLE - if the provided handle is invalid
DW_NOT_AVAILABLE - no state estimate available yet
DW_SUCCESS - estimates successfully returned
- API Group
- Init: Yes
- Runtime: Yes
- De-Init: Yes
◆ dwGlobalEgomotion_getHistoryEntry()
Returns an entry from the history array.
- Parameters
-
| [out] | result | Global state estimate. |
| [out] | uncertainty | Global state uncertainty estimate (optional, can be null). |
| [in] | index | Index into the history, in the range [0, dwGlobalEgomotion_getHistorySize), with 0 being most recent estimate and last element pointing to oldest estimate. |
| [in] | handle | Global Egomotion module handle. |
- Returns
- DW_NOT_AVAILABLE - no state estimate available yet, or the requested index is outside of the available history range
DW_INVALID_ARGUMENT - if the provided pointer is invalid
DW_INVALID_HANDLE - if the provided handle is invalid
DW_SUCCESS - history entry successfully returned
- API Group
- Init: Yes
- Runtime: Yes
- De-Init: Yes
◆ dwGlobalEgomotion_getHistorySize()
Returns the number of estimates currently stored in the history.
- Parameters
-
| [out] | num | A pointer to the number of estimates in the history. |
| [in] | handle | Global Egomotion module handle. |
- Returns
- DW_INVALID_ARGUMENT - if the provided pointer is invalid
DW_INVALID_HANDLE - if the provided handle is invalid
DW_SUCCESS - state history successfully returned
- API Group
- Init: Yes
- Runtime: Yes
- De-Init: Yes
◆ dwGlobalEgomotion_getTimestamp()
Get timestamp of current filter estimate.
- Parameters
-
| [out] | timestamp | Timestamp of current filter estimate [us]. |
| [in] | handle | Global Egomotion module handle. |
- Returns
- DW_INVALID_ARGUMENT - if provided timestamp pointer is invalid
DW_INVALID_HANDLE - if the provided handle is invalid
DW_NOT_AVAILABLE - no state estimate available yet
DW_SUCCESS - timestamp successfully returned
- API Group
- Init: Yes
- Runtime: Yes
- De-Init: Yes
◆ dwGlobalEgomotion_initialize()
Initializes the global egomotion module.
- Parameters
-
| [out] | handle | A pointer to the handle for the created module. |
| [in] | params | A pointer to the configuration parameters of the module. |
| [in] | ctx | Specifies the handler to the context under which the module is created. |
- Returns
- DW_INVALID_ARGUMENT - if provided parameters are invalid
DW_INVALID_HANDLE - if the provided handle is invalid
DW_SUCCESS - if initialization succeeded
- API Group
- Init: Yes
- Runtime: No
- De-Init: No
◆ dwGlobalEgomotion_initParamsFromRig()
Initialize global egomotion parameters from a provided RigConfiguration.
This will read out relevant sensor parameters and apply them on top of default parameters.
- Parameters
-
| [out] | params | Pointer to a parameter struct to be filled out with sensor parameters |
| [in] | rigConfiguration | Handle to a rig configuration to retrieve parameters from |
| [in] | gpsSensorName | name of the GPS sensor to be used |
- Returns
- DW_INVALID_ARGUMENT - if provided params pointer or rig handle are invalid
DW_FILE_INVALID - if provided sensor could not be found in the rig config
DW_SUCCESS - if initialization of parameters succeeded
- Note
- Clears any existing parameters set in
params.
-
Following parameters are extracted from the rig configuration: GPS sensor:
- Position of the sensor ->
dwGlobalEgomotionParameters.sensorCharacteristics.antennaPosition
- API Group
- Init: Yes
- Runtime: No
- De-Init: No
◆ dwGlobalEgomotion_release()
Releases the global egomotion module.
- Note
- This method renders the handle unusable.
- Parameters
-
| [in] | handle | Global Egomotion handle to be released. |
- Returns
- DW_INVALID_HANDLE - if the provided egomotion handle is invalid.
DW_SUCCESS - if release succeeded
- API Group
- Init: Yes
- Runtime: No
- De-Init: Yes
◆ dwGlobalEgomotion_reset()
Resets the state estimate and all history of the global egomotion module.
- Parameters
-
| [in] | handle | Global Egomotion handle to be reset. |
- Returns
- DW_INVALID_HANDLE - if the provided handle is invalid.
DW_SUCCESS - if reset succeeded
- API Group
- Init: Yes
- Runtime: Yes
- De-Init: Yes