|
Eigen::Matrix3d | compute_base_orientation_from_imu (const Eigen::Quaterniond &quat_imu_in_ars, const Eigen::Matrix3d &rotation_base_to_imu, const Eigen::Matrix3d &rotation_ars_to_world) |
| Get the orientation of the base frame with respect to the world frame. More...
|
|
double | compute_pitch_frame_in_parent (const Eigen::Matrix3d &orientation_frame_in_parent) |
| Get pitch angle of a given frame relative to the parent vertical. More...
|
|
double | compute_base_pitch_from_imu (const Eigen::Quaterniond &quat_imu_in_ars, const Eigen::Matrix3d &rotation_base_to_imu, const Eigen::Matrix3d &rotation_ars_to_world) |
| Get pitch angle of the base frame relative to the world frame. More...
|
|
Eigen::Vector3d | compute_base_angular_velocity_from_imu (const Eigen::Vector3d &angular_velocity_imu_in_imu, const Eigen::Matrix3d &rotation_base_to_imu) |
| Compute the body angular velocity of the base from IMU readings. More...
|
|
void | observe_servos (palimpsest::Dictionary &observation, const std::map< int, std::string > &servo_name_map, const std::vector< ServoReply > &servo_replies) |
| Observe servo measurements. More...
|
|
void | observe_time (Dictionary &observation) |
| Observe time since the epoch. More...
|
|
State observers available for Upkies.
State observation.
Eigen::Vector3d upkie::cpp::observers::compute_base_angular_velocity_from_imu |
( |
const Eigen::Vector3d & |
angular_velocity_imu_in_imu, |
|
|
const Eigen::Matrix3d & |
rotation_base_to_imu |
|
) |
| |
|
inline |
Compute the body angular velocity of the base from IMU readings.
- Parameters
-
[in] | angular_velocity_imu_in_imu | Angular velocity from the IMU. |
[in] | rotation_base_to_imu | Rotation matrix from base to IMU. |
- Returns
- Body angular velocity of the base frame.
Calculation checks:
- \(I\): IMU frame
- \(B\): base frame
- \(W\): world (inertial) frame
Our input is \({}_I \omega_{WI}\), we seek \({}_B \omega_{WB}\).
\(
\begin{align*}
\dot{R}_{WI} & = R_{WI} ({}_I \omega_{WI} \times) \\
R_{WB} & = R_{WI} R_{IB} \\
\dot{R}_{WB} & = \dot{R}_{WI} R_{IB} \\
& = R_{WI} ({}_I \omega_{WI} \times) R_{IB} \\
& = R_{WI} R_{IB} ({}_B \omega_{WI} \times) \\
& = R_{WB} ({}_B \omega_{WI} \times) = R_{WB} ({}_B \omega_{WB} \times)
\end{align*}
\)
Thus \({}_B \omega_{WB} = R_{BI} {}_I \omega_{WI}\).