add navState method
parent
ac6fb495a6
commit
8126e6b51d
|
@ -17,7 +17,7 @@
|
|||
|
||||
#pragma once
|
||||
#include <gtsam/linear/NoiseModel.h>
|
||||
#include <gtsam/geometry/Pose3.h>
|
||||
#include <gtsam/navigation/NavState.h>
|
||||
|
||||
namespace gtsam {
|
||||
|
||||
|
@ -34,6 +34,7 @@ class Scenario {
|
|||
// Derived quantities:
|
||||
|
||||
Rot3 rotation(double t) const { return pose(t).rotation(); }
|
||||
NavState navState(double t) const { return NavState(pose(t), velocity_n(t)); }
|
||||
|
||||
Vector3 velocity_b(double t) const {
|
||||
const Rot3 nRb = rotation(t);
|
||||
|
|
|
@ -40,6 +40,7 @@ void exportScenario() {
|
|||
.def("omega_b", &Scenario::omega_b)
|
||||
.def("velocity_n", &Scenario::velocity_n)
|
||||
.def("acceleration_n", &Scenario::acceleration_n)
|
||||
.def("navState", &Scenario::navState)
|
||||
.def("rotation", &Scenario::rotation)
|
||||
.def("velocity_b", &Scenario::velocity_b)
|
||||
.def("acceleration_b", &Scenario::acceleration_b);
|
||||
|
|
Loading…
Reference in New Issue