Klamp't  0.9.0
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 
15 namespace Klampt {
16 
20 {
22 
25  void GetHold(Hold& h) const;
26 
30  void GetLocalFrame(RigidTransform& T) const;
31 
32  ContactFeature feature;
33  ContactPoint contact;
36  Real angle;
39  bool fixedWheel;
41  Real wheelRoll;
44  Vector3 localOffset;
45 };
46 
47 bool LoadContactFeatureMapping(istream& in,const vector<ContactFeature>& features,ContactFeatureMapping& m);
48 void SaveContactFeatureMapping(ostream& out,ContactFeatureMapping& m);
49 
58 bool FeatureMappingFromHold(const Hold& h,const vector<ContactFeature>& features, ContactFeatureMapping& m);
59 
61 Real BestFeatureMappingAngle(const ContactFeatureMapping& feature,const Matrix3& Rdes);
62 
64 void SetFeatureMappingOrientation(ContactFeatureMapping& feature,const Matrix3& Rdes);
65 
68 } //namespace Klampt
69 
70 #endif
Real BestFeatureMappingAngle(const ContactFeatureMapping &feature, const Matrix3 &Rdes)
Returns the angle parameter that makes the feature map to Rdes.
Real wheelRoll
for fixed wheels, this is the roll angle at which the wheel is fixed
Definition: ContactFeatureMapping.h:41
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...
Defines the ContactFeature structures and some routines for creating holds from features.
void SetFeatureMappingOrientation(ContactFeatureMapping &feature, const Matrix3 &Rdes)
Sets the angle parameters that make the feature map to Rdes.
Vector3 localOffset
Definition: ContactFeatureMapping.h:44
void GetHold(Hold &h) const
Real angle
Definition: ContactFeatureMapping.h:36
void GetLocalFrame(RigidTransform &T) const
std::shared_ptr< ContactFeatureBase > ContactFeature
Definition: ContactFeature.h:163
A single contact between the robot and the environment.
Definition: Hold.h:28
A mapping from a ContactFeature to a point on the environment.
Definition: ContactFeatureMapping.h:19
Structures defining the finalized contacts used in stances.
bool fixedWheel
Definition: ContactFeatureMapping.h:39
Definition: ContactDistance.h:6