A scenario defined by discrete ground-truth measurements over time.
This class stores time-stamped ground truth values for pose, angular velocity, linear velocity, and linear acceleration. When queried for a value at a specific time t, it performs linear interpolation for vector quantities and manifold interpolation for poses. If t is outside the range of the provided timestamps, the value at the nearest endpoint is returned (i.e., the data is clamped).
|
| | DiscreteScenario (const std::map< double, Pose3 > &poses, const std::map< double, Vector3 > &angularVelocities_b, const std::map< double, Vector3 > &velocities_n, const std::map< double, Vector3 > &accelerations_n) |
| | Constructor.
|
|
double | duration () const |
| | The duration of time between the first timestamp and the last.
|
| Pose3 | pose (double t) const override |
| | pose at time t
|
| Vector3 | omega_b (double t) const override |
| | angular velocity in body frame
|
| Vector3 | velocity_n (double t) const override |
| | velocity at time t, in nav frame
|
| Vector3 | acceleration_n (double t) const override |
| | acceleration in nav frame
|
|
virtual | ~Scenario () |
| | virtual destructor
|
|
Rot3 | rotation (double t) const |
|
NavState | navState (double t) const |
|
Gal3 | gal3 (double t) const |
|
Vector3 | velocity_b (double t) const |
|
Vector3 | acceleration_b (double t) const |
| DiscreteScenario gtsam::DiscreteScenario::FromCSV |
( |
const std::string & | csv_filepath | ) |
|
|
static |
Named constructor to create a scenario from a CSV file.
The CSV file should contain a header row followed by data rows. All timestamps will be normalized so that the first timestamp in the file corresponds to t=0 for the scenario.
CSV is expected to contain the following columns: t,q_w,q_x,q_y,q_z,v_x,v_y,v_z,p_x,p_y,p_z,w_x,w_y,w_z,a_x,a_y,a_z Other columns will be ignored.
- Parameters
-
| csv_filepath | Path to the CSV file. |
- Returns
- A constructed DiscreteScenario.
- Exceptions
-
| runtime_error | if file cannot be opened or is malformed. |