upkie 9.0.0
Open-source wheeled biped robots
Loading...
Searching...
No Matches

◆ compute_base_pitch_from_imu()

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 
)
inline

Get pitch angle of the base frame relative to the world frame.

Parameters
[in]quat_imu_in_arsQuaternion representing the rotation matrix from the IMU frame to the attitude reference system (ARS) frame.
[in]rotation_base_to_imuRotation matrix from the base frame to the IMU frame. When not specified, the default Upkie mounting orientation is used.
rotation_ars_to_worldRotation from the attitude reference system (ARS) frame to the world frame.
Returns
Angle from the world z-axis (unit vector opposite to gravity) to the base z-axis. This angle is positive when the base leans forward.