lipm_walking::FloatingBaseObserver Struct Reference

Kinematics-only floating-base observer. More...

#include <lipm_walking/FloatingBaseObserver.h>

Public Member Functions

EIGEN_MAKE_ALIGNED_OPERATOR_NEW FloatingBaseObserver (const mc_rbdyn::Robot &controlRobot)
 Initialize floating base observer. More...
 
sva::PTransformd getAnchorFrame (const mc_rbdyn::Robot &robot)
 Get anchor frame of a robot for a given contact state. More...
 
void reset (const sva::PTransformd &X_0_fb)
 Reset floating base estimate. More...
 
void run (const mc_rbdyn::Robot &realRobot)
 Update floating-base transform of real robot. More...
 
void updateRobot (mc_rbdyn::Robot &robot)
 Write observed floating-base transform to the robot's configuration. More...
 
const Eigen::Quaterniond & imuOrientation ()
 Get the orientation of the IMU with respect to the inertial frame. More...
 
void leftFootRatio (double ratio)
 Set fraction of total weight sustained by the left foot. More...
 

Detailed Description

Kinematics-only floating-base observer.

See https://scaron.info/robot-locomotion/floating-base-estimation.html for technical details on the derivation of this simple estimator.

Definition at line 43 of file FloatingBaseObserver.h.

Constructor & Destructor Documentation

lipm_walking::FloatingBaseObserver::FloatingBaseObserver ( const mc_rbdyn::Robot &  controlRobot)

Initialize floating base observer.

Parameters
controlRobotRobot reference.

Definition at line 36 of file FloatingBaseObserver.cpp.

Member Function Documentation

sva::PTransformd lipm_walking::FloatingBaseObserver::getAnchorFrame ( const mc_rbdyn::Robot &  robot)

Get anchor frame of a robot for a given contact state.

Parameters
robotRobot state to read frames from.

The anchor frame is a weighted average of foot frames ("LeftFoot" or "RightFoot") over the feet currently in contact. In single support, in thus coincides with the foot frame. In double support, it interpolates from one support foot to the next following the left foot ratio.

See also
leftFootRatio

Definition at line 78 of file FloatingBaseObserver.cpp.

const Eigen::Quaterniond& lipm_walking::FloatingBaseObserver::imuOrientation ( )
inline

Get the orientation of the IMU with respect to the inertial frame.

Note
Although this estimation is currently stored in the body sensor of the control robot, it is an actual sensor reading.

Definition at line 93 of file FloatingBaseObserver.h.

void lipm_walking::FloatingBaseObserver::leftFootRatio ( double  ratio)
inline

Set fraction of total weight sustained by the left foot.

Note
This field is used in anchor frame computations.

Definition at line 103 of file FloatingBaseObserver.h.

void lipm_walking::FloatingBaseObserver::reset ( const sva::PTransformd &  X_0_fb)

Reset floating base estimate.

Parameters
X_0_fbNew floating-base transform.

Definition at line 38 of file FloatingBaseObserver.cpp.

void lipm_walking::FloatingBaseObserver::run ( const mc_rbdyn::Robot &  realRobot)

Update floating-base transform of real robot.

Parameters
realRobotMeasured robot state, to be updated.

Definition at line 44 of file FloatingBaseObserver.cpp.

void lipm_walking::FloatingBaseObserver::updateRobot ( mc_rbdyn::Robot &  robot)

Write observed floating-base transform to the robot's configuration.

Parameters
robotRobot state to write to.

Definition at line 85 of file FloatingBaseObserver.cpp.