11 LinearizedCoulombFunction::LinearizedCoulombFunction(
Variable& f,
double frictionCoeff,
12 int numberOfFaces,
double margin)
19 , _R_cone(Matrix3d::Identity())
24 ss <<
"[ocra::LinearizedCoulombFunction::LinearizedCoulombFunction] Size of the variable is not 3 but " << f.
getSize();
25 throw std::runtime_error(ss.str());
28 if (numberOfFaces < 3)
29 throw std::runtime_error(
"[ocra::LinearizedCoulombFunction::LinearizedCoulombFunction] Number of faces is less than 3");
31 checkCoeff(frictionCoeff);
74 void LinearizedCoulombFunction::buildA()
79 v1[0] =
_mu * cos(angle);
80 v1[1] =
_mu * sin(angle);
82 for (
int i=0; i<
_dim; ++i)
85 v2[0] =
_mu * cos(angle);
86 v2[1] =
_mu * sin(angle);
101 void LinearizedCoulombFunction::buildb()
106 void LinearizedCoulombFunction::checkCoeff(
real mu)
109 throw std::runtime_error(
"[ocra::LinearizedCoulombFunction::] Invalid (negative) input for a friction coefficient");
124 std::cout << coul.
getA() << std::endl;
125 std::cout << coul.
getb() << std::endl;
130 std::cin >> v[0] >> v[1] >> v[2];
132 std::cout << coul.
getValue() << std::endl;
133 if (v[0] == -2.71828)
static const double ANGLE_OFFSET
void setMargin(double margin)
const Matrix3d & getConeOrientation() const
void setValue(const VectorXd &value)
LinearizedCoulombFunction class.
void setConeOrientation(const Matrix3d &R)
void testLinearCoulomb(void)
Optimization-based Robot Controller namespace. a library of classes to write and solve optimization p...
const VectorXd & getb() const
This class represents a variable in a mathematical sense.
const VectorXd & getValue() const
Declaration file of the LinearizedCoulombFunction class.
const MatrixXd & getA() const
void setFrictionCoeff(double coeff)
double getFrictionCoeff() const
Implements a basic variable.