1 #ifndef _POSE_ESTIMATION_BODY_STATE_MEASUREMENT_HPP 2 #define _POSE_ESTIMATION_BODY_STATE_MEASUREMENT_HPP 4 #include <base/Time.hpp> 5 #include <base/samples/RigidBodyState.hpp> 14 static void fromRigidBodyState(
const base::samples::RigidBodyState &body_state, PoseWithVelocity &filter_state, PoseWithVelocityCovariance &filter_state_cov)
17 filter_state.orientation =
RotationType(MTK::SO3<double>(body_state.orientation));
18 filter_state.velocity =
VelocityType(body_state.velocity);
19 filter_state.angular_velocity =
VelocityType(body_state.angular_velocity);
21 filter_state_cov.setZero();
22 filter_state_cov.block(0, 0, 3, 3) = body_state.cov_position;
23 filter_state_cov.block(3, 3, 3, 3) = body_state.cov_orientation;
24 filter_state_cov.block(6, 6, 3, 3) = body_state.cov_velocity;
25 filter_state_cov.block(9, 9, 3, 3) = body_state.cov_angular_velocity;
28 static void toRigidBodyState(
const PoseWithVelocity &filter_state,
const PoseWithVelocityCovariance &filter_state_cov, base::samples::RigidBodyState &body_state)
30 body_state.position = filter_state.position;
31 body_state.orientation = filter_state.orientation;
32 body_state.velocity = body_state.orientation * filter_state.velocity;
33 body_state.angular_velocity = filter_state.angular_velocity;
35 body_state.cov_position = filter_state_cov.block(0, 0, 3, 3);
36 body_state.cov_orientation = filter_state_cov.block(3, 3, 3, 3);
37 body_state.cov_velocity = filter_state_cov.block(6, 6, 3, 3);
38 body_state.cov_angular_velocity = filter_state_cov.block(9, 9, 3, 3);
ukfom::mtkwrap< MTK::SO3< double > > RotationType
Definition: OrientationState.hpp:15
static void toRigidBodyState(const PoseWithVelocity &filter_state, const PoseWithVelocityCovariance &filter_state_cov, base::samples::RigidBodyState &body_state)
Definition: BodyStateMeasurement.hpp:28
static void fromRigidBodyState(const base::samples::RigidBodyState &body_state, PoseWithVelocity &filter_state, PoseWithVelocityCovariance &filter_state_cov)
Definition: BodyStateMeasurement.hpp:14
Definition: GeographicProjection.hpp:9
Definition: BodyStateMeasurement.hpp:12
ukfom::mtkwrap< RotationType::vect_type > VelocityType
Definition: OrientationState.hpp:16
ukfom::mtkwrap< RotationType::vect_type > TranslationType
Definition: PoseWithVelocity.hpp:15