Klamp't  0.8.1
ContactFeatureMapping.h
Go to the documentation of this file.
1 #ifndef CONTACT_FEATURE_MAPPING_H
2 #define CONTACT_FEATURE_MAPPING_H
3 
4 #include "Hold.h"
5 #include "ContactFeature.h"
6 
14 
18 {
20 
23  void GetHold(Hold& h) const;
24 
28  void GetLocalFrame(RigidTransform& T) const;
29 
30  ContactFeature feature;
31  ContactPoint contact;
34  Real angle;
37  bool fixedWheel;
39  Real wheelRoll;
42  Vector3 localOffset;
43 };
44 
45 bool LoadContactFeatureMapping(istream& in,const vector<ContactFeature>& features,ContactFeatureMapping& m);
46 void SaveContactFeatureMapping(ostream& out,ContactFeatureMapping& m);
47 
56 bool FeatureMappingFromHold(const Hold& h,const vector<ContactFeature>& features, ContactFeatureMapping& m);
57 
59 Real BestFeatureMappingAngle(const ContactFeatureMapping& feature,const Matrix3& Rdes);
60 
62 void SetFeatureMappingOrientation(ContactFeatureMapping& feature,const Matrix3& Rdes);
63 
66 #endif
A single contact between the robot and the environment.
Definition: Hold.h:26
void GetLocalFrame(RigidTransform &T) const
bool fixedWheel
Definition: ContactFeatureMapping.h:37
Real wheelRoll
for fixed wheels, this is the roll angle at which the wheel is fixed
Definition: ContactFeatureMapping.h:39
Real BestFeatureMappingAngle(const ContactFeatureMapping &feature, const Matrix3 &Rdes)
Returns the angle parameter that makes the feature map to Rdes.
std::shared_ptr< ContactFeatureBase > ContactFeature
Definition: ContactFeature.h:161
Defines the ContactFeature structures and some routines for creating holds from features.
A mapping from a ContactFeature to a point on the environment.
Definition: ContactFeatureMapping.h:17
void SetFeatureMappingOrientation(ContactFeatureMapping &feature, const Matrix3 &Rdes)
Sets the angle parameters that make the feature map to Rdes.
bool FeatureMappingFromHold(const Hold &h, const vector< ContactFeature > &features, ContactFeatureMapping &m)
Constructs a contact feature mapping from a hold by trying to match contact features to the hold...
Vector3 localOffset
Definition: ContactFeatureMapping.h:42
Structures defining the finalized contacts used in stances.
Real angle
Definition: ContactFeatureMapping.h:34
void GetHold(Hold &h) const