|
Robotran C Documentation
|
int mbs_run_part(MbsPart *mbs_part, MbsData *mbs_data)
Main function of the coordinate partitioning module.
Definition: mbs_part.c:532
void mbs_msg(const char *msg,...)
Send a message.
Definition: mbs_message.c:87
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:827
int Ncons
Number of algebraic constraints.
Definition: mbs_data.h:317
int n_qv
Number of dependent variable needed.
Definition: mbs_part.h:71
int DonePart
Flag that indicates if the coordinate partitioning module has been executed (default: 0=not done; 1=d...
Definition: mbs_data.h:392
double tsim
The time value.
Definition: mbs_data.h:305
int nqrot
Number of rotational joint (R1, R2 or R3)
Definition: mbs_data.h:269
MbsPart * mbs_new_part(MbsData *mbs_data)
Allocate a new MbsPart structure for the given MbsData structure.
Definition: mbs_part.c:868
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:267
double random_amplitude_rank
Amplitude of the random troubleshoot of generalized coordinates for rank.
Definition: mbs_part.h:39
int * qc
Array with the indices of driven (locked and driven) articulations.
Definition: mbs_data.h:272
int * ind_hu
Array with the indices of best choice for independent constraints.
Definition: mbs_part.h:75
int nqu
Number of independent articulations.
Definition: mbs_data.h:262
void mbs_error_msg(int err, const char *msg,...)
Send an error message.
Definition: mbs_message.c:131
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:955
int njoint
Number of joints in the system.
Definition: mbs_data.h:259
Declaration of functions that are project dependent.
void free_ivec_0(int *vec)
release memory for a vector of integers, starting with index 0
Definition: mbs_1D_array.c:490
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:22
void free_dmat_0(double **mat)
release memory for a matrix of doubles, starting at index 0
Definition: mbs_matrix.c:332
MbsPartOptions * options
Structure containing the options for coordinate partitioning module.
Definition: mbs_part.h:66
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:817
int mbs_run_part(MbsPart *mbs_part, MbsData *mbs_data)
Main function of the coordinate partitioning module.
Definition: mbs_part.c:532
double frand(void)
Definition: mbs_part.c:140
MbsPartOptions * mbs_new_part_options(void)
Allocate a new MbsPartOptions structure and intialize options with default values.
Definition: mbs_part.c:845
#define _MBS_ERR_LOW_NAN
Low Level error number Number is NaN (not a number) = -7.
Definition: mbs_errors_names.h:147
int visualize
Flag to generate loop closure animation file when partitionning fails.
Definition: mbs_part.h:22
int flag_optim_symb_sin_cos
allow the "optimisation" of the computation of the sine/cosine in the symbolic files....
Definition: mbs_data.h:295
void mbs_close_kin(MbsData *s, MbsAux *mbs_aux)
compute the dependent velocities that solves the constraints.
Definition: mbs_close_loops.c:146
int clearmbsglobal
DEPRECATED OPTION.
Definition: mbs_part.h:33
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:20
int * hu
Array with the indices of independent constraints.
Definition: mbs_data.h:280
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:277
int n_hv
Number of redundant constraint.
Definition: mbs_part.h:77
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:858
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:479
void mbs_delete_part_options(MbsPartOptions *part_option_strct)
Free the memory of the given MbsPartOptions structure.
Definition: mbs_part.c:863
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:510
Main structure for the coordinate partitioning module.
Definition: mbs_part.h:64
#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:828
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:406
int Nuserc
Number of user constraints.
Definition: mbs_data.h:318
#define _MBS_ERR_MID_MRED
Mid Level error number Related to the computation of the Mred matrix.
Definition: mbs_errors_names.h:107
int * qu
Array with the indices of the independent articulations (free)
Definition: mbs_data.h:271
int * qv
Array with the indices of the dependent articulations .
Definition: mbs_data.h:279
int Nloopc
Number of loop constraints.
Definition: mbs_data.h:316
unsigned int set_seed
Flag to prevent the partitionning to set a constant seed number.
Definition: mbs_part.h:52
void freeMbsAux(MbsAux *mbs_aux, MbsData *s)
Definition: mbs_aux.c:174
int mbs_call_cons_hJ(double *h, double **Jac, MbsData *s, double tsim)
Symbolic constraints function declaration.
Definition: mbs_project_fct_ptr.c:94
double * q
Array with the current values of the generalized coordinates.
Definition: mbs_data.h:284
void mbs_delete_part(MbsPart *mbs_part)
Free the memory of the given MbsPart structure.
Definition: mbs_part.c:893
void free_dvec_1(double *vec)
release memory for a vector of doubles, starting at index 1
Definition: mbs_1D_array.c:976
#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:178
int verbose
Verbosity level of the module, defined in file mbs_define.h.
Definition: mbs_part.h:31
double * q_closed
Array with the generalized coordinate in closed configuration (constraints solved)
Definition: mbs_part.h:80
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:18
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:215
int nqc
Number of driven articulations, it includes qlocked and qdriven.
Definition: mbs_data.h:263
int n_qu
Number of independent variable needed.
Definition: mbs_part.h:68
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:474
MbsPartOptions * mbs_new_part_options(void)
Allocate a new MbsPartOptions structure and intialize options with default values.
Definition: mbs_part.c:845
Definition: mbs_data.h:246
int user_call_cons_hJ(double *h, double **Jac, MbsData *s, double tsim)
Module redirection for user joint force function, see user_cons_hJ() however the return differs.
Definition: mbs_project_fct_ptr.c:269
MbsPart * mbs_new_part(MbsData *mbs_data)
Allocate a new MbsPart structure for the given MbsData structure.
Definition: mbs_part.c:868
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:893
int PART_calc_hJ(MbsData *mbs_data, double *h, double **J)
Compute the current constraint error vector and its Jacobian.
Definition: mbs_part.c:154
void free_ivec_1(int *vec)
release memory for a vector of integers, starting with index 1
Definition: mbs_1D_array.c:495
int * ind_qu
Array with the indices of best choice for independent variables.
Definition: mbs_part.h:69
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:500
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:960
int * ind_hv
Array with the indices of best choice for redundant constraints.
Definition: mbs_part.h:78
void free_dmat_1(double **mat)
release memory for a matrix of doubles, starting at index 1
Definition: mbs_matrix.c:340
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:981
int rowperm
Flag to allow lines permutations: 0 no permutation (default).
Definition: mbs_part.h:18
void free_dvec_0(double *vec)
release memory for a vector of doubles, starting at index 0
Definition: mbs_1D_array.c:971
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:34
int mbs_call_dirdyna(double **M, double *c, MbsData *s, double tsim)
Symbolic direct dynamic function declaration.
Definition: mbs_project_fct_ptr.c:72
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:691
#define MBS_INFO_SUCCESS
Definition: mbs_define.h:29
int drivers
DEPRECATED OPTION.
Definition: mbs_part.h:26
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:294
void mbs_delete_part_options(MbsPartOptions *opt)
Free the memory of the given MbsPartOptions structure.
Definition: mbs_part.c:863
int n_hu
Number of independent constraint.
Definition: mbs_part.h:74
int mbs_rank_0(double **A, int m, int n)
Compute the rank of matrix_in.
Definition: rank_lapack.c:38
int user_call_DrivenJoints(MbsData *s, double tsim)
Module redirection for the computation of driven joints, see user_DrivenJoints() however the return d...
Definition: mbs_project_fct_ptr.c:258
int * ind_qv
Array with the indices of best choice and order for dependent variables.
Definition: mbs_part.h:72
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:569
int nhu
Number of independent constraints.
Definition: mbs_data.h:268
#define _MBS_ERR_MID_CLOSE_GEO
Mid Level error number Related to the closing geometry, i.e.
Definition: mbs_errors_names.h:87
#define MBS_VERBOSE_ALL
Definition: mbs_define.h:46
double random_amplitude_singul
Amplitude of the random troubleshoot of generalized coordinates for solving constaints.
Definition: mbs_part.h:45