libmove3d  3.13.0
Functions
/home/slemaign/softs-local/BioMove3D-git/p3d/p3d_jnt_base.c File Reference

Description of the ::P3D_BASE joint. More...

#include "P3d-pkg.h"
#include "Util-pkg.h"

Functions

const char * p3d_jnt_base_get_dof_name (int i_dof)
 Get the name of a degree of freedom for a base joint.
void p3d_jnt_base_set_dof (p3d_jnt *jntPt, int i_dof, double val)
 Change the value of a degree of freedom for the given joint.
void p3d_jnt_base_set_dof_bounds (p3d_jnt *jntPt, int i_dof, double vmin, double vmax)
 Change the value of the bounds for a given joint and degree of freedom.
void p3d_jnt_base_stay_within_dist (p3d_stay_within_dist_data *prev_data, p3d_jnt *jntPt, p3d_stay_within_dist_data *data, double *distance, configPt q_init, configPt q_max_param, double max_param, double *reach_param)
 Compute the distance and the speed that the joint could reach.
void p3d_jnt_base_calc_dof (p3d_jnt *jntPt)
 Compute the position matrix of the joint.
p3d_jntp3d_jnt_base_create (p3d_matrix4 pos, double *v, double *vmin, double *vmax, double *vmin_rand, double *vmax_rand, double *velocity_max, double *acceleration_max, double *jerk_max, double *param)
 Create a new joint ::P3D_BASE with angle in radian.
p3d_jntp3d_jnt_base_create_deg (p3d_matrix4 pos, double *v, double *vmin, double *vmax, double *vmin_rand, double *vmax_rand, double *velocity_max, double *acceleration_max, double *jerk_max, double *param)
 Create a new joint ::P3D_BASE with angle in degree.
void p3d_jnt_base_stay_within_sphere (p3d_stay_within_dist_data *prev_data, p3d_jnt *jntPt, p3d_stay_within_dist_data *data, double *distance, double *reach_param)
 Compute the distance and the speed that the joint could reach.

Detailed Description

Description of the ::P3D_BASE joint.

It's the first complex joint in Move3D. It's a freeflyer joint: 3 translations (x, y, z), 3 rotations (Rx, Ry, Rz). It is used for compatibility resons. With it the joint 0 could be used as a classical complex joint and doesn't need specific treatement. This joint is bound to become a placement joint. It's default orientation couldn't be change (pos in p3d_jnt_base_create() as no effect on the orrientation).


Function Documentation

void p3d_jnt_base_calc_dof ( p3d_jnt jntPt)

Compute the position matrix of the joint.

This function use the value for the degree of freedom set in the joint by p3d_jnt_set_dof() and the position matrix of the previous joint. This is the implementation of p3d_jnt_calc_mat_pos() for ::P3D_BASE joint.

Parameters:
jntPt,:the joint
p3d_jnt* p3d_jnt_base_create ( p3d_matrix4  pos,
double *  v,
double *  vmin,
double *  vmax,
double *  vmin_rand,
double *  vmax_rand,
double *  velocity_max,
double *  acceleration_max,
double *  jerk_max,
double *  param 
)

Create a new joint ::P3D_BASE with angle in radian.

Note: For compatibility reason the orientation of the joint couldn't be change by pos.

Parameters:
pos,:the position matrix of the joint
v,:the values of the degree of freedom for the joint (with angle in radian)
vmin& vmax: the bounds values of the degree of freedom for the joint (with angle in radian)
vmin_rand& vmax_rand: the random (or user) bounds values of the degree of freedom for the joint (with angle in radian)
param,:the array of the parameters for the joint (NULL here)
Returns:
the new joint.
p3d_jnt* p3d_jnt_base_create_deg ( p3d_matrix4  pos,
double *  v,
double *  vmin,
double *  vmax,
double *  vmin_rand,
double *  vmax_rand,
double *  velocity_max,
double *  acceleration_max,
double *  jerk_max,
double *  param 
)

Create a new joint ::P3D_BASE with angle in degree.

Note: For compatibility reason the orientation of the joint couldn't be change by pos.

Parameters:
pos,:the position matrix of the joint
v,:the values of the degree of freedom for the joint (with angle in degree)
vmin& vmax: the bounds values of the degree of freedom for the joint (with angle in degree)
vmin_rand& vmax_rand: the random (or user) bounds values of the degree of freedom for the joint (with angle in degree)
param,:the array of the parameters for the joint (NULL here)
Returns:
the new joint.
const char* p3d_jnt_base_get_dof_name ( int  i_dof)

Get the name of a degree of freedom for a base joint.

This is the implementation of p3d_jnt_get_dof_name() for the joint ::P3D_BASE.

Parameters:
i_dof,:the index of the degree of freedom
Returns:
The name of the degree of freedom
void p3d_jnt_base_set_dof ( p3d_jnt jntPt,
int  i_dof,
double  val 
)

Change the value of a degree of freedom for the given joint.

Note: this function doesn't check if the value is valid (between the bounds).

This is the implementation of p3d_jnt_set_dof() for the joint ::P3D_BASE. It allows compatibilities with previous definition of joint 0.

Parameters:
jntPt,:the joint
i_dof,:the index of the degree of freedom
val,:the new value for this degree of freedom (expressed in radian for angles)
void p3d_jnt_base_set_dof_bounds ( p3d_jnt jntPt,
int  i_dof,
double  vmin,
double  vmax 
)

Change the value of the bounds for a given joint and degree of freedom.

Note: this function doesn't check if the values are valid (vmin<vmax).

This is the implementation of p3d_jnt_set_dof_bounds() for the joint ::P3D_BASE. This allows compatibility with previous definition of joint 0.

Parameters:
jntPt,:the joint
i_dof,:the index of the degree of freedom
vmin,:the new minimum bound for this degree of freedom (expressed in radian for angles)
vmax,:the new maximum bound for this degree of freedom (expressed in radian for angles)
void p3d_jnt_base_stay_within_dist ( p3d_stay_within_dist_data prev_data,
p3d_jnt jntPt,
p3d_stay_within_dist_data data,
double *  distance,
configPt  q_init,
configPt  q_max_param,
double  max_param,
double *  reach_param 
)

Compute the distance and the speed that the joint could reach.

From the configuration q_init of the joint to q_max_param, this function computes an interval of parameter which all the points of the joint move by less than the distance given as input. This is the implementation of p3d_jnt_stay_within_dist() for the joint ::P3D_BASE.

Note: The joint looks directly in the robot configurations the degree of freedom that it needs.

Parameters:
prev_data,:speed of the previous joint
jntPt,:the joint
distance,:the maximal distance
qinit,:the initial configuration
q_max_param,:the final configuration
max_param,:the value of the delta parameter in the final configuration (it gives the range param needed to reach the final configuration)
reach_param,:the actual maximal parameter that could be reach (previous joint can limits the range parameter)
Return values:
data,:speed of the joint distance: the distance that the joint couldn't cross reach_param: the new maximal range parameter that could be reach
void p3d_jnt_base_stay_within_sphere ( p3d_stay_within_dist_data prev_data,
p3d_jnt jntPt,
p3d_stay_within_dist_data data,
double *  distance,
double *  reach_param 
)

Compute the distance and the speed that the joint could reach.

This function computes an interval of parameter which all the points of the joint move by less than the distance given as input. This is the implementation of p3d_jnt_stay_within_sphere() for the joint ::P3D_BASE.

Note: The joint looks directly in the robot configurations the degree of freedom that it needs.

Parameters:
prev_data,:speed of the previous joint
jntPt,:the joint
distance,:the maximal distance
Return values:
data,:speed of the joint distance: the distance that the joint couldn't cross reach_param: the new maximal range parameter that could be reach
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines