#include <problem.h>
◆ check_no_slippage() [1/2]
bool Problem::check_no_slippage |
( |
const Force & |
force | ) |
const |
Check if the force is within the friction cone.
- Parameters
-
force | is the 2D inward force. |
- Returns
- true if the check has passed.
◆ check_no_slippage() [2/2]
bool problem_ns::Problem::check_no_slippage |
( |
const std::vector< Force > & |
forces | ) |
const |
Check if the forces are within the friction cones.
- Parameters
-
forces | is the vector of 2D inward forces. |
- Returns
- true if the check has passed for all forces.
◆ compute_newton_law()
pair< Vector, double > Problem::compute_newton_law |
( |
const std::vector< Force > & |
forces | ) |
const |
Compute the total force and torque acting on the object due to F and input forces.
- Parameters
-
forces | is the 2D vector of the inward forces. |
- Returns
- a pair representing the total force and torque.
◆ configure()
bool Problem::configure |
( |
const std::vector< double > & |
shape, |
|
|
const double |
friction, |
|
|
const Force & |
F |
|
) |
| |
Configure the problem.
- Parameters
-
shape | is a 4D vector containing the coefficients of the object's perimeter. |
friction | is in range [0,1]. |
F | is the applied force.
|
- Returns
- true/false on success/failure.
◆ generate()
shared_ptr< Problem > Problem::generate |
( |
| ) |
|
|
static |
Generate a random problem.
- Returns
- the problem.
◆ get_COM()
const Vector & Problem::get_COM |
( |
| ) |
const |
Retrieve the COM of the object.
- Returns
- a YARP vector containing the x and y coordinates.
◆ get_dN()
Vector Problem::get_dN |
( |
const double |
t | ) |
const |
Retrieve the derivative of the inward normal N on the object's perimeter.
- Parameters
-
- Returns
- a YARP vector containing the x and y coordinates.
◆ get_dP()
Vector Problem::get_dP |
( |
const double |
t | ) |
const |
Retrieve the derivative of the point P on the object's perimeter.
- Parameters
-
- Returns
- a YARP vector containing the x and y coordinates.
◆ get_dT()
Vector Problem::get_dT |
( |
const double |
t | ) |
const |
Retrieve the derivative of the tangent T on the object's perimeter.
- Parameters
-
- Returns
- a YARP vector containing the x and y coordinates.
◆ get_F()
const Force & Problem::get_F |
( |
| ) |
const |
Retrieve the force applied to the object.
- Returns
- the force F.
◆ get_friction()
double Problem::get_friction |
( |
| ) |
const |
Retrieve the friction value.
- Returns
- the friction.
◆ get_N()
Vector Problem::get_N |
( |
const double |
t | ) |
const |
Retrieve the normal N on the object's perimeter.
- Parameters
-
- Returns
- a YARP vector containing the x and y coordinates.
- Note
- |N|≠1, i.e. N is not a unit vector.
-
(T×N)·z>0, i.e. N points inward.
◆ get_P()
Vector Problem::get_P |
( |
const double |
t | ) |
const |
Retrieve the point P on the object's perimeter.
- Parameters
-
- Returns
- a YARP vector containing the x and y coordinates.
◆ get_shape()
const vector< double > & Problem::get_shape |
( |
| ) |
const |
Retrieve the current vector of coefficients describing the object's perimeter.
- Returns
- the perimeter's coefficients.
◆ get_T()
Vector Problem::get_T |
( |
const double |
t | ) |
const |
Retrieve the tangent T on the object's perimeter.
- Parameters
-
- Returns
- a YARP vector containing the x and y coordinates.
- Note
- |T|≠1, i.e. T is not a unit vector.
-
T·dP>0, i.e. T is aligned w/ velocity.
◆ wrap_angle()
double Problem::wrap_angle |
( |
const double |
t | ) |
|
|
static |
Helper function that returns the parameter t within the interval [0, 2*PI].
- Parameters
-
- Returns
- the wrapped version of t.
The documentation for this class was generated from the following files:
- /home/runner/work/assignment_optimization-2Dgrasp/assignment_optimization-2Dgrasp/gh-pages/lib/problem.h
- /home/runner/work/assignment_optimization-2Dgrasp/assignment_optimization-2Dgrasp/gh-pages/lib/problem.cpp