Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00014 #ifndef OPENHRP_CONSTRAINT_FORCE_SOLVER_H_INCLUDED
00015 #define OPENHRP_CONSTRAINT_FORCE_SOLVER_H_INCLUDED
00016
00017 #include "Config.h"
00018
00019 namespace OpenHRP {
00020 class CollisionSequence;
00021 }
00022
00023 namespace hrp
00024 {
00025 class Link;
00026 class CFSImpl;
00027 class WorldBase;
00028
00029 class HRPMODEL_API ConstraintForceSolver
00030 {
00031 CFSImpl* impl;
00032
00033 public:
00034 ConstraintForceSolver(WorldBase& world);
00035 ~ConstraintForceSolver();
00036
00037 bool addCollisionCheckLinkPair
00038 (int bodyIndex1, Link* link1, int bodyIndex2, Link* link2, double muStatic, double muDynamic, double culling_thresh, double restitution, double epsilon);
00039 bool addExtraJoint(int bodyIndex1, Link* link1, int bodyIndex2, Link* link2, const double* link1LocalPos, const double* link2LocalPos, const short jointType, const double* jointAxis );
00040 void clearCollisionCheckLinkPairs();
00041
00042 void setGaussSeidelParameters(int maxNumIteration, int numInitialIteration, double maxRelError);
00043 void enableConstraintForceOutput(bool on);
00044 void useBuiltinCollisionDetector(bool on);
00045 void setNegativeVelocityRatioForPenetration(double ratio);
00046
00047 void initialize(void);
00048 void solve(OpenHRP::CollisionSequence& corbaCollisionSequence);
00049 void clearExternalForces();
00050 void setAllowedPenetrationDepth(double dVal);
00051 double getAllowedPenetrationDepth() const;
00052 };
00053 };
00054
00055
00056 #endif
00057