ocra-recipes
Doxygen documentation for the ocra-recipes repository
LinearizedCoulombFunction.h
Go to the documentation of this file.
1 
13 #ifndef _OCRABASE_LINEARIZED_COULOMB_FUNCTION_H
14 #define _OCRABASE_LINEARIZED_COULOMB_FUNCTION_H
15 
16 // ocra includes
18 
24 namespace ocra
25 {
35  {
36  // ------------------------ structures --------------------------------------
37  public:
38  typedef LinearFunction functionType_t; //< alias on the type of the mother class. Needed to duplicate the function tree.
39 
40  // ------------------------ constructors ------------------------------------
41  private:
47 
48  public:
63  LinearizedCoulombFunction(Variable& f, double frictionCoeff, int numberOfFaces=4, double margin=0);
64 
65  // ------------------------ public interface --------------------------------
66  public:
69  double getFrictionCoeff() const;
70  double getMargin() const;
71  void setFrictionCoeff(double coeff);
72  void setMargin(double margin);
73  void setConeOrientation(const Matrix3d& R);
74  const Matrix3d& getConeOrientation() const;
76 
77  // ------------------------ private methods ---------------------------------
78  private:
79  void buildA();
80  void buildb();
81 
82  // ------------------------ private static methods --------------------------
83  private:
84  static void checkCoeff(double mu);
85 
86  // ------------------------ protected members -------------------------------
87  protected:
88  double _mu; //< the friction coefficient
89  double _margin; //< margin on the cone. Positive means tighter
90  Matrix3d _R_cone; //< orientation of the cone
91  MatrixXd _J_cache;
92 
93  // ------------------------ protected static members ------------------------
94  protected:
95  static const double ANGLE_OFFSET; //< offset for the orientation of the plane
96  };
97 
98  void testLinearCoulomb(void);
99 }
100 
101 #endif //_OCRABASE_LINEARIZED_COULOMB_FUNCTION_H
102 
103 // cmake:sourcegroup=Function
const Matrix3d & getConeOrientation() const
LinearizedCoulombFunction class.
void testLinearCoulomb(void)
LinearFunction class.
Optimization-based Robot Controller namespace. a library of classes to write and solve optimization p...
Declaration file of the LinearFunction class.
This class represents a variable in a mathematical sense.
Definition: Variable.h:105