#include <mc_observers/KinematicInertialPoseObserver.h>
Public Member Functions | |
KinematicInertialPoseObserver (const std::string &type, double dt) | |
void | configure (const mc_control::MCController &ctl, const mc_rtc::Configuration &config) override |
void | reset (const mc_control::MCController &ctl) override |
bool | run (const mc_control::MCController &ctl) override |
void | update (mc_control::MCController &ctl) override |
const sva::PTransformd & | posW () const |
Get floating-base pose in the world frame. More... | |
Public Member Functions inherited from mc_observers::Observer | |
Observer (const std::string &type, double dt) | |
virtual | ~Observer ()=default |
void | name (const std::string &name) |
Set the observer's name. More... | |
const std::string & | name () const noexcept |
Returns the observer's name. More... | |
void | addToLogger_ (const mc_control::MCController &ctl, mc_rtc::Logger &logger, const std::string &category="") |
Add observer entries to the logger under the categrory "category + name()". More... | |
void | removeFromLogger_ (mc_rtc::Logger &logger, const std::string &category="") |
Remove observer from logger. More... | |
void | addToGUI_ (const mc_control::MCController &ctl, mc_rtc::gui::StateBuilder &gui, std::vector< std::string > category={}) |
Add observer to the gui under category {category, name()}. More... | |
void | removeFromGUI_ (mc_rtc::gui::StateBuilder &gui, std::vector< std::string > category={}) |
Remove observer from gui. More... | |
const std::string & | desc () const noexcept |
Short description of the observer. More... | |
const std::string | type () const noexcept |
const std::string & | error () const noexcept |
double | dt () const noexcept |
Protected Member Functions | |
void | addToLogger (const mc_control::MCController &ctl, mc_rtc::Logger &, const std::string &category) override |
Add observer from logger. More... | |
void | addToGUI (const mc_control::MCController &, mc_rtc::gui::StateBuilder &, const std::vector< std::string > &category) override |
Add observer information the GUI. More... | |
void | estimateOrientation (const mc_rbdyn::Robot &robot, const mc_rbdyn::Robot &realRobot) |
void | estimatePosition (const mc_control::MCController &ctl) |
Protected Member Functions inherited from mc_observers::Observer | |
virtual void | removeFromLogger (mc_rtc::Logger &, const std::string &) |
Remove observer from logger. More... | |
virtual void | removeFromGUI (mc_rtc::gui::StateBuilder &, const std::vector< std::string > &category) |
Remove observer from GUI. More... | |
Protected Attributes | |
std::string | robot_ |
std::string | realRobot_ |
std::string | imuSensor_ |
std::string | anchorFrameFunction_ = "" |
Name of datastore entry for the anchor frame function. More... | |
sva::PTransformd | X_0_anchorFrame_ |
Control anchor frame (provided through the datastore) More... | |
sva::PTransformd | X_0_anchorFrameReal_ |
Real anchor frame (provided through the datastore) More... | |
double | maxAnchorFrameDiscontinuity_ |
Threshold (norm) above wich the anchor frame is considered to have had a discontinuity. More... | |
bool | anchorFrameJumped_ = false |
bool | firstIter_ = true |
Protected Attributes inherited from mc_observers::Observer | |
std::string | name_ |
Observer name. More... | |
std::string | type_ |
Observer type. More... | |
std::string | desc_ |
Short description of the observer and its configuration. More... | |
std::string | error_ |
Descriptive error message to show if the observer failed. More... | |
double | dt_ |
Timestep. More... | |
Kinematics-inertial observer of the floating base position.
This estimator relies on the feet contact location and the IMU orientation to estimate the floating base position and orientation. Note that this is a very simple kinematic inertial estimator that does not take advantage of closed-loop kinematic chains. As a result, the estimate using the left foot contact as an anchor point and the one using the right foot might differ slightly.
See https://scaron.info/teaching/floating-base-estimation.html for technical details on the derivation of this simple estimator.
and for comparison between simple kinematic-inertial estimators the paper
"Experimental Evaluation of Simple Estimators for Humanoid Robots" by Thomas Flayols, Andrea Del Prete, Patrick Wensing, Alexis Mifsud, Mehdi Benallegue, Olivier Stasse https://hal.archives-ouvertes.fr/hal-01574819/document
|
inline |
Initialize floating base observer
|
overrideprotectedvirtual |
Add observer information the GUI.
Default implementation does nothing, each observer implementation is responsible for adding its own elements to the GUI.
category | Category in which to add this observer |
Reimplemented from mc_observers::Observer.
|
overrideprotectedvirtual |
Add observer from logger.
Default implementation does nothing, each observer implementation is responsible for adding its own log entries
category | Category in which to log this observer |
Reimplemented from mc_observers::Observer.
|
overridevirtual |
Configure observer
Reimplemented from mc_observers::Observer.
|
protected |
Compute floating-base orientation based on new observed gravity vector.
robot | Control robot model. |
realRobot | Measured robot state. |
|
protected |
Compute floating-base position from the estimated orientation and a kinematic anchor frame
robot | Control robot model. |
realRobot | Measurements robot model. |
The new position is chosen so that the origin of the real anchor frame coincides with the control anchor frame.
|
inline |
Get floating-base pose in the world frame.
|
overridevirtual |
Reset floating base estimate from the current real robot state
Implements mc_observers::Observer.
|
overridevirtual |
Update floating-base estimation of real robot (IMU + kinematics)
Requires an anchor frame to be provided as a datastore callback. This should be a frame in-between the robot contacts, and its trajectory should be continuous. See https://jrl-umi3218.github.io/mc_rtc/tutorials/recipes/observers.html for futher information.
Example:
Implements mc_observers::Observer.
|
overridevirtual |
Write observed floating-base transform to the robot's configuration
Implements mc_observers::Observer.
|
protected |
Name of datastore entry for the anchor frame function.
|
protected |
|
protected |
Detects whether the anchor frame had a discontinuity
|
protected |
BodySensor containting IMU readings
|
protected |
Threshold (norm) above wich the anchor frame is considered to have had a discontinuity.
|
protected |
Corresponding real robot (default main real robot)
|
protected |
Robot to observe (default main robot)
|
protected |
Control anchor frame (provided through the datastore)
|
protected |
Real anchor frame (provided through the datastore)