Classes |
class | gpSAHandInfo |
Functions |
int | gpSAHfinger_forward_kinematics (double length1, double length2, double length3, double q1, double q2, double q3, p3d_vector3 position, p3d_vector3 normal) |
int | gpSAHfinger_outer_workspace (gpSAHandInfo data, double dq, std::vector< gpVector3D > &points, std::vector< gpVector3D > &normals) |
int | gpDraw_SAHfinger_outer_workspace (gpSAHandInfo data, double dq) |
int | gpSAHfinger_workspace (gpSAHandInfo data, double dq, std::vector< gpVector3D > &points) |
int | gpSAHfinger_workspace_approximation (gpSAHandInfo data, double dq, double dr, unsigned int nb_spheres_max, std::vector< gpSphere > &spheres) |
Detailed Description
This module implements some structures and functions to compute the approximation of the workspace of a finger of the Schunk Anthropomorphic Hand. The workspace is approximated as a set of spheres striclty included inside it.
Function Documentation
int gpDraw_SAHfinger_outer_workspace |
( |
gpSAHandInfo |
data, |
|
|
double |
dq |
|
) |
| |
Draws the outer envelope of the workspace of a SAHand finger as a point cloud.
- Parameters:
-
data | geometrical info about the finger |
dq | discretization step of the joint parameters (in radians) |
- Returns:
- GP_OK in case of success, GP_ERROR otherwise
int gpSAHfinger_forward_kinematics |
( |
double |
length1, |
|
|
double |
length2, |
|
|
double |
length3, |
|
|
double |
q1, |
|
|
double |
q2, |
|
|
double |
q3, |
|
|
p3d_vector3 |
position, |
|
|
p3d_vector3 |
normal |
|
) |
| |
Computes the position of the fingertip center point of the Schunk Anthropomorphic Hand finger. NB: The coupling between the 3rd and 4th joints is taken into account in the computation.
- Parameters:
-
length1 | length of the first phalanx |
length2 | length of the second phalanx |
length3 | length of the third phalanx |
q1 | first joint parameter (controls the (palm)-(proximal phalanx) joint first DOF (abduction)) |
q2 | second joint (controls the (palm)-(proximal phalanx) joint second DOF (subduction)) |
q3 | third joint parameter (controls the DOFs of the last two joints that are coupled) |
position | the computed position of the fingertip center |
normal | a vector giving the direction of the fingertip contact surface (orthogonal to the medial axis of the distal phalanx and directed towards the inside of the hand) |
- Returns:
- GP_OK in case of success, GP_ERROR otherwise
Computes the outer envelope of the workspace of a SAHand finger as a point cloud.
- Parameters:
-
data | geometrical info about the finger |
dq | discretization step of the joint parameters (in radians) |
points | computed point cloud |
normal | fingertip surface normal at each point of the workspace |
- Returns:
- GP_OK in case of success, GP_ERROR otherwise
Computes the workspace of a SAHand finger as a point cloud.
- Parameters:
-
data | geometrical info about the finger |
dq | discretization step of the joint parameters (in radians) |
points | computed point cloud |
- Returns:
- GP_OK in case of success, GP_ERROR otherwise
int gpSAHfinger_workspace_approximation |
( |
gpSAHandInfo |
data, |
|
|
double |
dq, |
|
|
double |
dr, |
|
|
unsigned int |
nb_spheres_max, |
|
|
std::vector< gpSphere > & |
spheres |
|
) |
| |
Computes an approximation of the SAHand finger workspace as a set of spheres. All the spheres are completely included in the real workspace. The function builds a set of points inside the workspace (inner points) and a set of points on the workspace boundary (boundary points). The minimal distance from each inner point to the boundary points is computed. The first sphere center is the inner point with the maximal distance (that will be the sphere radius). All the inner points that are inside the sphere are removed. The new distance of each remaining points is the minimum of the old distance and the distance from the point to the sphere. The new sphere center is the inner point with the maximal distance and the algorithm continues with the same principle until the maximal number is reached ro the last computed sphere radius is smaller than the given threshold.
- Parameters:
-
data | geometrical info about the finger |
dq | discretization step of the joint parameters (in radians). Do not use less than ~2 degrees (pi/180 rads) to avoid memory overload and excessive computation time. |
dr | the algorithm will end when it has found a sphere with radius < dr |
nb_spheres_max | maximal number of spheres that will be computed |
spheres | computed sphere set |
- Returns:
- GP_OK in case of success, GP_ERROR otherwise