|
Robotran C Documentation
|
int mbs_run_part(MbsPart *mbs_part, MbsData *mbs_data)
Main function of the coordinate partitioning module.
Definition: mbs_part.c:494
void conc_ivec_0(int *vec1_src, int l_vec1, int *vec2_src, int l_vec2, int *vec_dest)
concatenate the first (l_v1 sized) vector and the second (l_v2 sized) vectors of integers into the th...
Definition: mbs_1D_array.c:752
int Ncons
Number of algebraic constraints.
Definition: mbs_data.h:218
int n_qv
Number of dependent variable needed.
Definition: mbs_part.h:41
int DonePart
Flag that indicates if the coordinate partitioning module has been executed (default: 0=not done; 1=d...
Definition: mbs_data.h:293
double tsim
The time value.
Definition: mbs_data.h:208
int nqrot
Number of rotational joint (R1, R2 or R3)
Definition: mbs_data.h:172
MbsPart * mbs_new_part(MbsData *mbs_data)
Allocate a new MbsPart structure for the given MbsData structure.
Definition: mbs_part.c:787
void mbs_error_msg(char *msg,...)
Send an error message.
Definition: mbs_message.c:102
void mbs_compute_sin_cos_q_all(MbsData *s)
Compute the sine and cosine of the q_sin and q_cos, for all the rotational joints.
Definition: mbs_trigo.c:94
int nqv
Number of dependent articulations.
Definition: mbs_data.h:170
int * qc
Array with the indices of driven (locked and driven) articulations.
Definition: mbs_data.h:175
int * ind_hu
Array with the indices of best choice for independent constraints.
Definition: mbs_part.h:45
int nqu
Number of independent articulations.
Definition: mbs_data.h:165
double * get_dvec_0(int l_v)
create (with memory allocation) a vector (length l_v) of doubles, starting at index 0
Definition: mbs_1D_array.c:880
int njoint
Number of joints in the system.
Definition: mbs_data.h:162
void free_ivec_0(int *vec)
release memory for a vector of integers, starting with index 0
Definition: mbs_1D_array.c:415
int mbs_Mred(MbsAux *mbs_aux, MbsData *s)
compute Mr, the reduced mass matrix [nqu x nqu] obtained after the 2 consecutive reductions (Robotran...
Definition: mbs_Mred.c:19
void free_dmat_0(double **mat)
release memory for a matrix of doubles, starting at index 0
Definition: mbs_matrix.c:293
MbsPartOptions * options
Structure containing the options for coordinate partitioning module.
Definition: mbs_part.h:36
void f0123_ivec_0(int *vec, int l_v)
Fill the (l_v sized) vector of integers as [0 1 2 3 ... l_v-1], starting with index 0.
Definition: mbs_1D_array.c:742
int mbs_run_part(MbsPart *mbs_part, MbsData *mbs_data)
Main function of the coordinate partitioning module.
Definition: mbs_part.c:494
double frand(void)
Definition: mbs_part.c:137
MbsPartOptions * mbs_new_part_options(void)
Allocate a new MbsPartOptions structure and intialize options with default values.
Definition: mbs_part.c:766
#define _MBS_ERR_LOW_NAN
Low Level error number Number is NaN (not a number) = -7.
Definition: mbs_errors_names.h:142
int visualize
In case of loop closure failing, set to 1 to plot the closing procedure iteration,...
Definition: mbs_part.h:16
int flag_optim_symb_sin_cos
allow the "optimisation" of the computation of the sine/cosine in the symbolic files....
Definition: mbs_data.h:198
void mbs_close_kin(MbsData *s, MbsAux *mbs_aux)
compute the dependent velocities that solves the constraints.
Definition: mbs_close_loops.c:140
int clearmbsglobal
Definition: mbs_part.h:20
int mbs_check_nhu_nqv(MbsData *mbs_data)
Check the coherence between the number of (independant) constraints and the number of dependant varia...
Definition: mbs_check.c:19
int * hu
Array with the indices of independent constraints.
Definition: mbs_data.h:183
void mbs_dirdyna(double **M, double *c, MbsData *s, double tsim)
Definition: mbs_project_fct_ptr.c:40
double ** get_dmat_0(int nb_r, int nb_c)
create (with memory allocation) a [nb_r times nb_c] matrix of doubles, starting at index 0
Definition: mbs_matrix.c:238
int n_hv
Number of redundant constraint.
Definition: mbs_part.h:47
int slct_ivec_0(int *vec_src, int l_vec1, int *vec_ind_src, int l_vec2, int *vec_dest)
fill the third (l_v2 sized) vector by slicing the first (l_v1 sized) vector of integers at the indexe...
Definition: mbs_1D_array.c:783
int * get_ivec_1(int l_v)
create (with memory allocation) a vector (length l_v) of integers, starting at index 1
Definition: mbs_1D_array.c:404
void mbs_delete_part_options(MbsPartOptions *part_option_strct)
Free the memory of the given MbsPartOptions structure.
Definition: mbs_part.c:782
void copy_ivec_1(int *vec_src, int *vec_dest, int l_v)
Copy the content of a vector (of size l_v) of integers to a second vector, starting with index 1.
Definition: mbs_1D_array.c:435
Main structure for the coordinate partitioning module.
Definition: mbs_part.h:34
#define _MBS_ERR_MOD_PART
Module error number module: Partionning = -100.
Definition: mbs_errors_names.h:43
int slct_dmat_0(double **tab_src, int nb_r1, int nb_c1, double **tab_out, int l2, int *vec)
fill the second [nb_r times l_vec] matrix by selecting the columns of the first [nb_r times nb_c] mat...
Definition: mbs_matrix.c:710
int flag_safety_checks
Flag to activate safety checks everywhere in mbsysc core. Faster computation if this flag is put to 0...
Definition: mbs_data.h:307
void mbs_msg(char *msg,...)
Send a message.
Definition: mbs_message.c:76
int Nuserc
Number of user constraints.
Definition: mbs_data.h:219
int * qu
Array with the indices of the independent articulations (free)
Definition: mbs_data.h:174
int * qv
Array with the indices of the dependent articulations .
Definition: mbs_data.h:182
void mbs_cons_hJ(double *h, double **Jac, MbsData *s, double tsim)
Definition: mbs_project_fct_ptr.c:48
int Nloopc
Number of loop constraints.
Definition: mbs_data.h:217
void PART_calc_hJ(MbsData *mbs_data, double *h, double **J)
Compute the current constraint error vector and its Jacobian.
Definition: mbs_part.c:149
void freeMbsAux(MbsAux *mbs_aux, MbsData *s)
Definition: mbs_aux.c:174
double * q
Array with the current values of the generalized coordinates.
Definition: mbs_data.h:187
void mbs_delete_part(MbsPart *mbs_part)
Free the memory of the given MbsPart structure.
Definition: mbs_part.c:812
void free_dvec_1(double *vec)
release memory for a vector of doubles, starting at index 1
Definition: mbs_1D_array.c:901
#define _MBS_ERR_MOD_SPEC_12
Generic error number Module specific errors range from -11 to -19 please read the error message a...
Definition: mbs_errors_names.h:168
int verbose
1 to get print indications related partitioning module; 0 otherwise, defaut = 1
Definition: mbs_part.h:19
double * q_closed
Array with the generalized coordinate in closed configuration (constraints solved)
Definition: mbs_part.h:50
This header defines the functions for trigonometric handling in MBsysC integrator in C.
void PART_vec_perm(int *a, int *ipm, int irk)
Definition: mbs_part.c:15
int PART_coord_part(MbsData *mbs_data, MbsPart *mbs_part, int *ind_u_des, int n_u_des, int *ind_c, int n_c, int first_partitioning)
Definition: mbs_part.c:190
void user_cons_hJ(double *h, double **Jac, MbsData *mbs_data, double tsim)
Definition: user_cons_hJ.c:15
int nqc
Number of driven articulations, it includes qlocked and qdriven.
Definition: mbs_data.h:166
int n_qu
Number of independent variable needed.
Definition: mbs_part.h:38
int mbs_close_geo(MbsData *s, MbsAux *mbs_aux)
compute a position of the multibody system which solves the constraints
Definition: mbs_close_loops.c:43
MbsAux * initMbsAux(MbsData *s)
Definition: mbs_aux.c:18
int * get_ivec_0(int l_v)
create (with memory allocation) a vector (length l_v) of integers, starting at index 0
Definition: mbs_1D_array.c:399
MbsPartOptions * mbs_new_part_options(void)
Allocate a new MbsPartOptions structure and intialize options with default values.
Definition: mbs_part.c:766
Definition: mbs_data.h:149
MbsPart * mbs_new_part(MbsData *mbs_data)
Allocate a new MbsPart structure for the given MbsData structure.
Definition: mbs_part.c:787
void mbs_compute_sin_cos_quc(MbsData *s, int *qrot_qu_indvec, int *qrot_qc_indvec)
Compute the sine and cosine of the q_sin and q_cos, only for the rotational joints that are independe...
Definition: mbs_trigo.c:65
void mbs_delete_part(MbsPart *mbs_part)
Free the memory of the given MbsPart structure.
Definition: mbs_part.c:812
void free_ivec_1(int *vec)
release memory for a vector of integers, starting with index 1
Definition: mbs_1D_array.c:420
int * ind_qu
Array with the indices of best choice for independent variables.
Definition: mbs_part.h:39
Structure defining the options of the coordinate partitioning module.
Definition: mbs_part.h:13
void copy_ivec_0(int *vec_src, int *vec_dest, int l_v)
Copy the content of a vector(of size l_v) of integers to a second vector, starting with index 0.
Definition: mbs_1D_array.c:425
double random_amplitude
Amplitude of the random troubleshoot added to the initial value of generalized coordinates.
Definition: mbs_part.h:21
double * get_dvec_1(int l_v)
create (with memory allocation) a vector (length l_v) of doubles, starting at index 1
Definition: mbs_1D_array.c:885
int * ind_hv
Array with the indices of best choice for redundant constraints.
Definition: mbs_part.h:48
void free_dmat_1(double **mat)
release memory for a matrix of doubles, starting at index 1
Definition: mbs_matrix.c:301
void copy_dvec_0(double *vec_src, double *vec_dest, int l_v)
Copy the content of a vector (of sizel_v) of doubles to a second vector, starting with index 0.
Definition: mbs_1D_array.c:906
int rowperm
1 to allow line permutation; 0 otherwise, defaut = 0
Definition: mbs_part.h:15
void free_dvec_0(double *vec)
release memory for a vector of doubles, starting at index 0
Definition: mbs_1D_array.c:896
void PART_lutot(double **a, int nl, int nc, int rowperm, int *irk, int *ierr, int *row_perm, int *col_perm)
Definition: mbs_part.c:31
void sort_ivec_0(int *vec_src, int *vec_dest, int l_v)
sort the first (l_v sized) vector of integers into the second vector, starting with index 0
Definition: mbs_1D_array.c:616
int drivers
Definition: mbs_part.h:18
double ** get_dmat_1(int nb_r, int nb_c)
create (with memory allocation) a [nb_r times nb_c] matrix of doubles, starting at index 1
Definition: mbs_matrix.c:255
void mbs_delete_part_options(MbsPartOptions *opt)
Free the memory of the given MbsPartOptions structure.
Definition: mbs_part.c:782
int n_hu
Number of independent constraint.
Definition: mbs_part.h:44
int mbs_rank_0(double **A, int m, int n)
Compute the rank of matrix_in.
Definition: rank_lapack.c:38
int * ind_qv
Array with the indices of best choice and order for dependent variables.
Definition: mbs_part.h:42
void print_ivec_0(int *vec, int l_v)
print a (l_v sized) vector of integers in console, starting with index 0
Definition: mbs_1D_array.c:494
int nhu
Number of independent constraints.
Definition: mbs_data.h:171
#define _MBS_ERR_MID_CLOSE_GEO
Mid Level error number Related to the closing geometry, i.e.
Definition: mbs_errors_names.h:87
void user_DrivenJoints(MbsData *mbs_data, double tsim)
Compute the positions, velocities and acceleration of driven joint.
Definition: user_DrivenJoints.c:15