Robotran C Documentation
mbs_loader.h
Go to the documentation of this file.
1 /*
2  This header includes the structure and functions used for MbsData loading through the mbs file
3  @Date Nov 2022 (modification)
4  @Author Robotran Team
5 */
6 
7 #ifndef MBS_LOADER_h
8 #define MBS_LOADER_h
9 
10 #include "mbs_binder_public.h"
11 #include "mbs_data.h"
12 
13 
14 typedef struct MbsLoadOptions
15 {
18 
21 
23 
25 
26 
38 
39 typedef struct MbsLoader
40 {
43 
44 } MbsLoader;
45 
46 #ifdef __cplusplus
47 extern "C" {
48 #endif
49 
55 
63 MbsData* mbs_load(const char* mbs_filename, const char* build_name);
64 
77 MbsData* mbs_load_with_loader(const char* mbs_filename, const char* build_path, MbsLoader *mbs_loader);
78 
85 
93 
101 
108 void mbs_delete_loader(MbsLoader* loader);
109 
115 
121 
127 void mbs_delete_data(MbsData *s);
128 
129 
130 
134 void mbs_load_user_model(MbsInfos* mbs_infos, UserModel* ums);
135 
139 void mbs_bind_user_model(MbsInfos* mbs_infos, UserModel* ums);
140 
147 MbsData* mbs_info_to_data(MbsInfos* mbs_infos, MbsData* s);
148 
149 void mbs_info_structurer(MbsInfos* mbs_infos);
150 
151 
152 #ifdef __cplusplus
153 }
154 #endif
155 
156 #endif
MbsData::qrot
int * qrot
Array with the indices of the rotational articulations (incremental values)
Definition: mbs_data.h:184
mbs_load
MbsData * mbs_load(const char *mbs_filename, const char *build_name)
Load the data from the given *.mbs file (data in the xml format).
Definition: mbs_loader.c:36
MbsLoader::opts
MbsLoadOptions * opts
Definition: mbs_loader.h:41
MbsInfoBodytree::qdriven
int * qdriven
Definition: mbs_binder_public.h:190
mbs_new_user_model
#define mbs_new_user_model()
Definition: mbs_loader.c:18
MDS_translate_q
int * MDS_translate_q(int *q_mds, int nq, int nj)
return a (nj sized) vector (starting at index 1) of integer which is a copy of the provided (nq sized...
Definition: mbs_loader.c:458
MbsInfoCuts::n_rod
int n_rod
Definition: mbs_binder_public.h:241
mbs_load_with_loader
MbsData * mbs_load_with_loader(const char *mbs_filename, const char *build_path, MbsLoader *mbs_loader)
Load the data from the given MbsInfos.
Definition: mbs_loader.c:54
MbsInfos::cuts
MbsInfoCuts * cuts
Definition: mbs_binder_public.h:388
MbsInfoPoint::pt
double * pt
Array with the coordinates (x, y, z) of the point relative to the origin of the body expressed in the...
Definition: mbs_binder_public.h:98
MbsInfos::n_state
int n_state
Definition: mbs_binder_public.h:409
MbsData::xfidpt
int * xfidpt
Array of the points defined as force application points.
Definition: mbs_data.h:264
mbs_load_user_functions
int mbs_load_user_functions(MbsData *mbs_data, const char *userfctLib_path, const char *userfctLib_name)
specific functions
Definition: mbs_load_libraries.c:204
get_char_cpy
char * get_char_cpy(const char *fmt,...)
Copy the provided formatted string into a newly allocated memory.
Definition: useful_functions.c:191
MbsInfoBodytree::n_qv
int n_qv
Definition: mbs_binder_public.h:180
MbsData::Ncons
int Ncons
Number of algebraic constraints.
Definition: mbs_data.h:218
UserModel
Definition: user_model.h:24
MbsInfoParameter::value_list
double * value_list
Vector (index starting at 1) containing the values retrieved from the multibody file.
Definition: mbs_binder_public.h:289
MbsData::qd
double * qd
Array with the current values of the generalized velocities.
Definition: mbs_data.h:188
MbsData::qa
int * qa
Array with the indices of actuated articulations (only for inverse dynamic).
Definition: mbs_data.h:180
MbsData::dt0
double dt0
Initial value of the integration step size [s]. For dirdyn and invdyn only. This parameter is set fro...
Definition: mbs_data.h:212
UserIoInfo::size_out
int * size_out
size_out[i] = size of i-th user output
Definition: mbs_user_interface.h:48
MbsData::m
double * m
Array containing the mass of each body.
Definition: mbs_data.h:155
MbsData::DonePart
int DonePart
Flag that indicates if the coordinate partitioning module has been executed (default: 0=not done; 1=d...
Definition: mbs_data.h:293
mbs_load_libraries.h
MbsData::user_IO
UserIO * user_IO
Definition: mbs_data.h:279
useful_functions.h
MbsInfos::state_list
MbsInfoParameter ** state_list
Definition: mbs_binder_public.h:411
MbsInfoUserIOs::n_out
int n_out
Definition: mbs_binder_public.h:360
Functions::mbs_cons_hJ
mbs_cons_hJ_ptr mbs_cons_hJ
Definition: mbs_data.h:76
Functions::user_equil_finish
user_equil_finish_ptr user_equil_finish
Definition: mbs_data.h:99
MbsInfoJoint::qdd0
double qdd0
Initial acceleration of the joint.
Definition: mbs_binder_public.h:130
MbsData::tsim
double tsim
The time value.
Definition: mbs_data.h:208
mbs_info_structurer
void mbs_info_structurer(MbsInfos *mbs_infos)
Definition: mbs_loader_public.c:90
MbsData::nqrot
int nqrot
Number of rotational joint (R1, R2 or R3)
Definition: mbs_data.h:172
MbsData::Nlink3D
int Nlink3D
Number of 3D links.
Definition: mbs_data.h:238
UserIoInfo
Contains information about UserIO.
Definition: mbs_user_interface.h:44
MbsData::mbs_filename
char * mbs_filename
Path to mbs file including the file with the extension (.mbs)
Definition: mbs_data.h:310
MbsInfos::base
MbsInfoBase * base
Definition: mbs_binder_public.h:386
mbs_delete_data
void mbs_delete_data(MbsData *s)
Free the memory used by the given MbsData structure.
Definition: mbs_loader.c:985
mbs_error_msg
void mbs_error_msg(char *msg,...)
Send an error message.
Definition: mbs_message.c:102
MbsData::nqv
int nqv
Number of dependent articulations.
Definition: mbs_data.h:170
Functions::mbs_link
mbs_link_ptr mbs_link
Definition: mbs_data.h:70
Functions::mbs_new_user_model
mbs_new_user_model_ptr mbs_new_user_model
Definition: mbs_data.h:112
MbsData::DoneEquil
int DoneEquil
Flag that indicates if the equilibrium module has been executed (default: 0=not done; 1=done).
Definition: mbs_data.h:294
mbs_data.h
MbsData::qc
int * qc
Array with the indices of driven (locked and driven) articulations.
Definition: mbs_data.h:175
MbsData::ux0
double * ux0
Array with the initial values of the user variables.
Definition: mbs_data.h:287
Functions::mbs_invdyna
mbs_invdyna_ptr mbs_invdyna
Definition: mbs_data.h:75
_MBS_ERR_MOD_LOAD
#define _MBS_ERR_MOD_LOAD
Module error number module: Loading = -900.
Definition: mbs_errors_names.h:73
MbsData::nqu
int nqu
Number of independent articulations.
Definition: mbs_data.h:165
_MBS_ERR_LOW_FILES
#define _MBS_ERR_LOW_FILES
Low Level error number Error during opening/writing files = -9.
Definition: mbs_errors_names.h:147
MbsInfoUserIOs::user_IO_list
MbsInfoUserIO ** user_IO_list
Definition: mbs_binder_public.h:361
MbsLoadOptions::userfctLib_name
char * userfctLib_name
Definition: mbs_loader.h:19
mbs_new_loader
MbsLoader * mbs_new_loader()
Create a new structure loader used for the loading with options.
Definition: mbs_loader.c:283
MbsInfoDData::MBSdata_d_ptr
double * MBSdata_d_ptr
link in the creation of mbs_data
Definition: mbs_binder_public.h:40
MbsData::njoint
int njoint
Number of joints in the system.
Definition: mbs_data.h:162
mbs_project_interface.h
Functions::symb
struct Functions::@7 symb
MbsData::tf
double tf
Final time of the simulation [s]. For dirdyn and invdyn only. This parameter is set from dirdyn/invyn...
Definition: mbs_data.h:211
MbsData::npt
int npt
Number of anchor points.
Definition: mbs_data.h:152
Functions::mbs_delete_user_model
mbs_delete_user_model_ptr mbs_delete_user_model
Definition: mbs_data.h:113
mbs_binder_private.h
Functions::user_equil_init
user_equil_init_ptr user_equil_init
Definition: mbs_data.h:97
MbsInfoBodytree::n_qrot
int n_qrot
Definition: mbs_binder_public.h:195
Functions::user_dirdyn_init
user_dirdyn_init_ptr user_dirdyn_init
Definition: mbs_data.h:89
Functions::user_equil_loop
user_equil_loop_ptr user_equil_loop
Definition: mbs_data.h:98
MbsInfoBase::gravity
double * gravity
Array with the component (x, y, z) of the gravity vector expressed in the inertial frame.
Definition: mbs_binder_public.h:114
UserIoInfo::n_in
int n_in
number of user input port
Definition: mbs_user_interface.h:45
MbsInfoCuts::n_ball
int n_ball
Definition: mbs_binder_public.h:240
Functions::mbs_save_um
mbs_save_um_ptr mbs_save_um
Definition: mbs_data.h:121
mbs_set_user_fun_null
void mbs_set_user_fun_null(MbsData *s)
Set the pointer to project user functions to NULL.
Definition: mbs_loader.c:315
MbsInfoBody::mass
double mass
Mass of the body.
Definition: mbs_binder_public.h:160
mbs_new_load_options
MbsLoadOptions * mbs_new_load_options()
Create a new structure with options for the loading.
Definition: mbs_loader.c:265
MbsInfoBodytree::qu
int * qu
Definition: mbs_binder_public.h:178
Functions::user_dirdyn_loop
user_dirdyn_loop_ptr user_dirdyn_loop
Definition: mbs_data.h:90
MbsInfoBodytree::n_joint
int n_joint
Definition: mbs_binder_public.h:174
mbs_load_user_model
#define mbs_load_user_model(mbs_infos, um)
Definition: mbs_loader.c:19
MbsInfoUserIO::size
int size
type=1: in ; type=2
Definition: mbs_binder_public.h:353
LOAD_ALL
@ LOAD_ALL
Definition: mbs_loader.h:37
MbsInfos
Definition: mbs_binder_public.h:384
MbsData::Nux
int Nux
Number of user variable.
Definition: mbs_data.h:288
mbs_load_user_model
void mbs_load_user_model(MbsInfos *mbs_infos, UserModel *ums)
Load the user model data.
Definition: user_model.c:35
copy_dvec_1
void copy_dvec_1(double *vec_src, double *vec_dest)
Copy the content of a vector (of size specified in vec_src[0]) of doubles to a second vector,...
Definition: mbs_1D_array.c:916
MbsData::flag_jac_position
int flag_jac_position
Flag to compute the Jacobian of the constraint for position or velocity solution.
Definition: mbs_data.h:299
MbsData::jac_user
double ** jac_user
Jacobian of constraints [nqv x njoint] (starting at 1), only used in symbolic accelred,...
Definition: mbs_data.h:229
MbsData::zero_division_thrs
double zero_division_thrs
Value from which a warning is raised if a division by zero (or close to) occurs. Default=1....
Definition: mbs_data.h:308
Functions::user_ExtForces
user_ExtForces_ptr user_ExtForces
Definition: mbs_data.h:109
mbs_check_user_model_list
int mbs_check_user_model_list(int *user_model_list_mbs, int Nuser_model, int *user_model_list_c)
Check the coherence between the number of user_model between MBS data file and user_model....
Definition: mbs_check.c:60
MbsInfoUserIO::type
int type
Definition: mbs_binder_public.h:352
MbsData::DoneModal
int DoneModal
Flag that indicates if the modal module has been executed (default: 0=not done; 1=done).
Definition: mbs_data.h:295
Functions::mbs_dirdyna
mbs_dirdyna_ptr mbs_dirdyna
Definition: mbs_data.h:74
MbsData::flag_optim_symb_sin_cos
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
mbs_get_user_model_size
#define mbs_get_user_model_size(n_usr_model)
Definition: mbs_loader.c:22
MbsData::SWr
double ** SWr
Array of Swr vector for each external forces.
Definition: mbs_data.h:265
mbs_delete_load_options
void mbs_delete_load_options(MbsLoadOptions *opts)
Free the memory associated to the given MbsLoadOptions.
Definition: mbs_loader.c:279
Functions::mbs_link3D
mbs_link3D_ptr mbs_link3D
Definition: mbs_data.h:71
MbsData::q_cos
double * q_cos
Array with the cosine values of the generalized coordinates, if rotational (if translational,...
Definition: mbs_data.h:197
Functions::user_Link3DForces
user_Link3DForces_ptr user_Link3DForces
Definition: mbs_data.h:108
MbsData::hu
int * hu
Array with the indices of independent constraints.
Definition: mbs_data.h:183
MbsInfoBodytree::qv
int * qv
Definition: mbs_binder_public.h:181
MbsData::Nxfrc
int Nxfrc
Number of points where an external force is applied into a body.
Definition: mbs_data.h:263
MbsInfoCuts::rod_list
MbsInfoRod ** rod_list
Definition: mbs_binder_public.h:245
mbs_delete_user_IO
#define mbs_delete_user_IO(uio)
Definition: mbs_loader.c:25
MbsInfoBodytree::qa
int * qa
Definition: mbs_binder_public.h:193
get_ivec_1
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
MbsInfos::extforce_point_list
int * extforce_point_list
Definition: mbs_binder_public.h:407
MbsData::qd0
double * qd0
Array with the initial values of the generalized velocities.
Definition: mbs_data.h:192
mbs_binder_public.h
MbsInfoBodytree::qc
int * qc
Definition: mbs_binder_public.h:184
Functions::mbs_get_user_model_list
mbs_get_user_model_list_ptr mbs_get_user_model_list
Definition: mbs_data.h:120
mbs_new_data
MbsData * mbs_new_data()
Allocate an MbsData structure with default field values (NULL, 0).
Definition: mbs_loader.c:897
Functions::mbs_print_user_IO
mbs_print_user_IO_ptr mbs_print_user_IO
Definition: mbs_data.h:122
MbsData::Nlink
int Nlink
Number of forces acting between two points of the system (force law implemented in user_LinkForces())...
Definition: mbs_data.h:237
Functions::mbs_load_user_model
mbs_load_user_model_ptr mbs_load_user_model
Definition: mbs_data.h:116
MbsInfoBody::inertia
double * inertia
Array with the inertia tensor (Ixx, Ixy, Ixz, Iyy, Iyz, Izz) of the body relative to the center of ma...
Definition: mbs_binder_public.h:162
MbsData::flag_safety_checks
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
Functions::user_free
user_free_ptr user_free
Definition: mbs_data.h:87
mbs_msg
void mbs_msg(char *msg,...)
Send a message.
Definition: mbs_message.c:76
LOAD_NONE
@ LOAD_NONE
Definition: mbs_loader.h:37
mbs_delete_infos
void mbs_delete_infos(MbsInfos *mbs_infos)
Definition: mbs_loader_public.c:1163
MbsData::__user_IO_info
UserIoInfo * __user_IO_info
Definition: mbs_data.h:280
MbsInfoJoint::d_qf
MbsInfoDData * d_qf
d_data for the forced q
Definition: mbs_binder_public.h:134
MbsInfoBodytree::qlocked
int * qlocked
Definition: mbs_binder_public.h:187
MbsInfoBodytree::n_qa
int n_qa
Definition: mbs_binder_public.h:192
Functions::mbs_sensor
mbs_sensor_ptr mbs_sensor
Definition: mbs_data.h:78
MbsData::MAX_NR_ITER
int MAX_NR_ITER
Maximal number of iterations for NR procedure, default 100.
Definition: mbs_data.h:221
MbsData::Nuserc
int Nuserc
Number of user constraints.
Definition: mbs_data.h:219
Functions::user_equil_fxe
user_equil_fxe_ptr user_equil_fxe
Definition: mbs_data.h:100
MbsData::Fl
double * Fl
Array with the current values of the forces on each link (see: user_LinkForces()).
Definition: mbs_data.h:241
MbsInfoJoint::qd0
double qd0
Initial velocity of the joint.
Definition: mbs_binder_public.h:129
MbsData::qu
int * qu
Array with the indices of the independent articulations (free)
Definition: mbs_data.h:174
MbsInfos::user_IOs
MbsInfoUserIOs * user_IOs
Definition: mbs_binder_public.h:391
MbsData::NRerr
double NRerr
Maximal error on constraint allowed in Newton-Raphson algorithm, default 1.0e-9.
Definition: mbs_data.h:220
mbs_new_load_options
MbsLoadOptions * mbs_new_load_options()
Create a new structure with options for the loading.
Definition: mbs_loader.c:265
MbsLoader
Definition: mbs_loader.h:39
MbsData::trq
double ** trq
Matrix with the components of the resultant external torques (pure torque and couple produced by forc...
Definition: mbs_data.h:203
MbsData::qv
int * qv
Array with the indices of the dependent articulations .
Definition: mbs_data.h:182
MbsData::Qc
double * Qc
Array with the value of joint force introduced in driven joint to respect the user function.
Definition: mbs_data.h:233
MbsData::Nloopc
int Nloopc
Number of loop constraints.
Definition: mbs_data.h:217
MbsInfoUserModel::n_parameter
int n_parameter
Definition: mbs_binder_public.h:337
UserIoInfo::ptr_in
double ** ptr_in
ptr_in[i][0] = pointer to the 1st element of the i-th input must be copied
Definition: mbs_user_interface.h:49
Functions::mbs_extforces
mbs_extforces_ptr mbs_extforces
Definition: mbs_data.h:72
Functions::user_cons_hJ
user_cons_hJ_ptr user_cons_hJ
Definition: mbs_data.h:104
MbsData::Zd
double * Zd
Array with the current values of the speed (spreading) between of the points of a link (see: user_Lin...
Definition: mbs_data.h:240
Functions::user_LinkForces
user_LinkForces_ptr user_LinkForces
Definition: mbs_data.h:107
mbs_info_to_data
MbsData * mbs_info_to_data(MbsInfos *mbs_infos, MbsData *s)
Retrieve a MbsData structure from the given MbsInfos.
Definition: mbs_loader.c:474
MbsData::Qq
double * Qq
Array with the values of the joint forces.
Definition: mbs_data.h:204
MbsLoadOptions::userfctLib_path
char * userfctLib_path
Definition: mbs_loader.h:20
MbsInfoUserIOs
Definition: mbs_binder_public.h:357
MbsData::q
double * q
Array with the current values of the generalized coordinates.
Definition: mbs_data.h:187
free_dvec_1
void free_dvec_1(double *vec)
release memory for a vector of doubles, starting at index 1
Definition: mbs_1D_array.c:901
MbsInfoUserIOs::n_user_IO
int n_user_IO
Definition: mbs_binder_public.h:359
MbsInfos::n_state_value
int n_state_value
Definition: mbs_binder_public.h:410
MbsData::In
double ** In
Array containing the inertia tensor component of each body (in the body fixed frame,...
Definition: mbs_data.h:156
LOAD_SYMBOLIC
@ LOAD_SYMBOLIC
Definition: mbs_loader.h:37
MbsData::Nsensor
int Nsensor
< Array of l3DWr vector for each 3D link forces.
Definition: mbs_data.h:260
MbsData::project_path
char * project_path
Path to the mbs project folder.
Definition: mbs_data.h:312
mbs_delete_user_model
#define mbs_delete_user_model(um)
Definition: mbs_loader.c:21
MbsInfoBodytree::n_qc
int n_qc
Definition: mbs_binder_public.h:183
mbs_delete_load_options
void mbs_delete_load_options(MbsLoadOptions *opts)
Free the memory associated to the given MbsLoadOptions.
Definition: mbs_loader.c:279
Functions::symbolicLibHandle
MbsDataLibInfo * symbolicLibHandle
Definition: mbs_data.h:62
find_project_path
int find_project_path(const char *mbsfile, char *prjpath)
Find the project directory (containing dataR, symbolicR, ...).
Definition: mbs_path.c:36
MbsData::nqdriven
int nqdriven
Number of driven articulations.
Definition: mbs_data.h:168
mbs_set_symb_fun_null
void mbs_set_symb_fun_null(MbsData *s)
Set the pointer to project symbolic functions to NULL.
Definition: mbs_loader.c:300
MbsInfos::n_sensor
int n_sensor
Definition: mbs_binder_public.h:403
MbsInfoBodytree::body_list
MbsInfoBody ** body_list
Definition: mbs_binder_public.h:172
Functions::user_realtime_options
user_realtime_options_ptr user_realtime_options
Definition: mbs_data.h:126
MbsData::fct
Functions fct
Structure to store the pointer to the project-specific functions.
Definition: mbs_data.h:316
Functions::user_Derivative
user_Derivative_ptr user_Derivative
Definition: mbs_data.h:102
mbs_delete_loader
void mbs_delete_loader(MbsLoader *loader)
Free the memory associated to the given MbsLoader.
Definition: mbs_loader.c:294
MbsLoadOptions::load_symb_user
int load_symb_user
Definition: mbs_loader.h:22
mbs_xml_create_user_IO_info
UserIoInfo * mbs_xml_create_user_IO_info(MbsInfos *mbs_infos, MbsData *s)
Definition: mbs_loader.c:396
Functions::mbs_get_user_model_size
mbs_get_user_model_size_ptr mbs_get_user_model_size
Definition: mbs_data.h:119
MbsData::frc
double ** frc
Matrix with the components of the resultant external forces (in the body fixed frame) applied to the ...
Definition: mbs_data.h:202
mbs_info_reader
MbsInfos * mbs_info_reader(const char *mbs_filename)
Read the mbs file to retrieve size informations (number of joints...).
Definition: mbs_loader_public.c:12
MbsInfoBodytree::n_qu
int n_qu
Definition: mbs_binder_public.h:177
MbsInfoBodytree::n_qdriven
int n_qdriven
Definition: mbs_binder_public.h:189
MbsLoader::mbs_infos
MbsInfos * mbs_infos
Definition: mbs_loader.h:42
mbs_set_user_fun_null
void mbs_set_user_fun_null(MbsData *s)
Set the pointer to project user functions to NULL.
Definition: mbs_loader.c:315
UserIoInfo::size_in
int * size_in
size_in[i] = size of i-th user input
Definition: mbs_user_interface.h:47
MbsData::nqc
int nqc
Number of driven articulations, it includes qlocked and qdriven.
Definition: mbs_data.h:166
MbsData::l3DWr
double ** l3DWr
Definition: mbs_data.h:243
MbsInfos::links
MbsInfoLinks * links
Definition: mbs_binder_public.h:389
MbsData::user_model
UserModel * user_model
Structure containing all user model, this structure is specific for each project.
Definition: mbs_data.h:276
MbsLoadOptions::symbolicLib_name
char * symbolicLib_name
Definition: mbs_loader.h:16
mbs_bind_user_model
#define mbs_bind_user_model(mbs_infos, um)
Definition: mbs_loader.c:20
mbs_message.h
MbsInfoPoint::d_pt
MbsInfoDData ** d_pt
Definition: mbs_binder_public.h:103
Functions::mbs_print_user_model
mbs_print_user_model_ptr mbs_print_user_model
Definition: mbs_data.h:118
Functions::mbs_accelred
mbs_accelred_ptr mbs_accelred
Definition: mbs_data.h:73
MbsData::dpt
double ** dpt
Array containing the coordinate of all anchor points (3+1 lines, npt+1 columns).
Definition: mbs_data.h:153
mbs_loader.h
mbs_new_user_IO
#define mbs_new_user_IO(a)
Definition: mbs_loader.c:24
mbs_get_user_IO_size
#define mbs_get_user_IO_size(n_in, n_out, n_user_IO)
Definition: mbs_loader.c:26
MbsInfoCuts::n_solid
int n_solid
Definition: mbs_binder_public.h:242
MbsInfoParameter::n_value
int n_value
Number of values in the parameter.
Definition: mbs_binder_public.h:287
MbsData::mbs_name
char * mbs_name
Name of the mbs project as it is stored in the xml file.
Definition: mbs_data.h:313
MbsInfoUserModels::n_user_model
int n_user_model
Definition: mbs_binder_public.h:344
MbsInfoBody::com
double * com
Array with the coordinate (x, y, z) of the center of mass of the body relative to the origin of the b...
Definition: mbs_binder_public.h:161
MbsData::q0
double * q0
Array with the initial values of the generalized coordinates.
Definition: mbs_data.h:191
MbsLoadOptions::symbolicLib_path
char * symbolicLib_path
Definition: mbs_loader.h:17
mbs_get_user_model_list
#define mbs_get_user_model_list(user_model_list)
Definition: mbs_loader.c:23
mbs_delete_user_IO_info
void mbs_delete_user_IO_info(UserIoInfo *ioInfo)
Definition: mbs_loader.c:435
MbsData
Definition: mbs_data.h:149
MbsInfoBodytree::n_qlocked
int n_qlocked
Definition: mbs_binder_public.h:186
Functions::mbs_get_user_IO_size
mbs_get_user_IO_size_ptr mbs_get_user_IO_size
Definition: mbs_data.h:115
Functions::mbs_gensensor
mbs_gensensor_ptr mbs_gensensor
Definition: mbs_data.h:79
MbsInfos::point_list
MbsInfoPoint ** point_list
Definition: mbs_binder_public.h:398
mbs_delete_data
void mbs_delete_data(MbsData *s)
Free the memory used by the given MbsData structure.
Definition: mbs_loader.c:985
MbsData::n_rod
int n_rod
Number of rod constraint in the system.
Definition: mbs_data.h:215
Functions::user_cons_J_accelred
user_cons_J_accelred_ptr user_cons_J_accelred
Definition: mbs_data.h:106
mbs_set_user_IO
void mbs_set_user_IO(UserIoInfo *ioInfo, double val)
Implementation of utility function for user_IO ==> should be moved (see def in mbs_user_interface....
Definition: mbs_loader.c:375
Functions::userfctLibHandle
MbsDataLibInfo * userfctLibHandle
Definition: mbs_data.h:63
MbsData::qlocked
int * qlocked
Array with the indices of locked articulations.
Definition: mbs_data.h:176
MbsData::Qa
double * Qa
Array of active joint forces (in case of simulink,invdyna,equil,linearization,...)
Definition: mbs_data.h:205
Functions::user_load_post
user_load_post_ptr user_load_post
Definition: mbs_data.h:86
Functions::user
struct Functions::@8 user
MbsData::Nuser_model
int Nuser_model
Number of declared user models in MBsysPad.
Definition: mbs_data.h:275
MbsData::build_path
char * build_path
Path to the build folder.
Definition: mbs_data.h:311
Functions::mbs_new_user_IO
mbs_new_user_IO_ptr mbs_new_user_IO
Definition: mbs_data.h:111
MbsInfoBodytree::qrot
int * qrot
Definition: mbs_binder_public.h:196
MbsData::process
int process
Flag that indicate which module is currently running (1=partitioning, 2=equilibrium,...
Definition: mbs_data.h:297
MbsInfos::bodytree
MbsInfoBodytree * bodytree
Definition: mbs_binder_public.h:387
mbs_check_n_user_model
int mbs_check_n_user_model(int Nuser_model, int n_usr_model)
Check the coherence between the number of user_model between MBS data file and user_model....
Definition: mbs_check.c:50
MbsData::nbody
int nbody
Number of bodies in the system.
Definition: mbs_data.h:160
MbsData::l
double ** l
Array containing the center of mass coordinates (in the body fixed frame, one column per body includi...
Definition: mbs_data.h:154
user_free
#define user_free(data)
Definition: mbs_loader.c:28
UserIoInfo::ptr_out
double ** ptr_out
ptr_out[i][0] = pointer to the 1st element of the i-th output must be copied
Definition: mbs_user_interface.h:50
MbsData::t0
double t0
Initial time of the simulation [s]. For dirdyn and invdyn only. This parameter is set from dirdyn/inv...
Definition: mbs_data.h:210
mbs_load_with_loader
MbsData * mbs_load_with_loader(const char *mbs_filename, const char *build_path, MbsLoader *mbs_loader)
Load the data from the given MbsInfos.
Definition: mbs_loader.c:54
MbsInfoRod::length
double length
Definition: mbs_binder_public.h:218
free_ivec_1
void free_ivec_1(int *vec)
release memory for a vector of integers, starting with index 1
Definition: mbs_1D_array.c:420
Functions::user_cons_jdqd
user_cons_jdqd_ptr user_cons_jdqd
Definition: mbs_data.h:105
MbsInfoUserModels::user_model_list
MbsInfoUserModel ** user_model_list
Definition: mbs_binder_public.h:345
Functions::user_DrivenJoints
user_DrivenJoints_ptr user_DrivenJoints
Definition: mbs_data.h:103
mbs_load_symbolic_functions
int mbs_load_symbolic_functions(MbsData *mbs_data, const char *symbolicLib_path, const char *symbolicLib_name)
Loads the symbolic functions from library into MbsData structure.
Definition: mbs_load_libraries.c:159
MbsData::Z
double * Z
Array with the current values of the distances between of the points of a link (see: user_LinkForces(...
Definition: mbs_data.h:239
MbsData::g
double g[3+1]
The 3 gravity components.
Definition: mbs_data.h:158
MbsData::flag_stop
int flag_stop
stop the simulation. For dirdyn, equil, invdyn and solvekin only.
Definition: mbs_data.h:298
get_dvec_1
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
mbs_path.h
mbs_delete_loader
void mbs_delete_loader(MbsLoader *loader)
Free the memory associated to the given MbsLoader.
Definition: mbs_loader.c:294
Functions::mbs_bind_user_model
mbs_bind_user_model_ptr mbs_bind_user_model
Definition: mbs_data.h:117
MbsInfoBodytree::n_body
int n_body
Definition: mbs_binder_public.h:171
free_dmat_1
void free_dmat_1(double **mat)
release memory for a matrix of doubles, starting at index 1
Definition: mbs_matrix.c:301
copy_dvec_0
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
mbs_bind_user_model
void mbs_bind_user_model(MbsInfos *mbs_infos, UserModel *ums)
Bind the user model data to the MbsInfos memory pointers.
Definition: user_model.c:40
MbsData::qdriven
int * qdriven
Array with the indices of driven articulations.
Definition: mbs_data.h:178
MbsInfos::user_models
MbsInfoUserModels * user_models
Definition: mbs_binder_public.h:390
MbsInfoJoint::q0
double q0
Initial position of the joint.
Definition: mbs_binder_public.h:128
user_load_post
#define user_load_post(data)
Definition: mbs_loader.c:27
MbsData::lambda
double * lambda
Array with the values of the Lagrange Multipliers related to the constraints.
Definition: mbs_data.h:222
get_dmat_1
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
MbsData::uxd
double * uxd
Array with the values of the time derivatives of the user variables.
Definition: mbs_data.h:286
MbsData::q_sin
double * q_sin
Array with the sine values of the generalized coordinates, if rotational (if translational,...
Definition: mbs_data.h:196
MbsData::qdd0
double * qdd0
Array with the initial values of the generalized acceleration.
Definition: mbs_data.h:193
UserIoInfo::n_out
int n_out
number of user output port
Definition: mbs_user_interface.h:46
MbsData::nqa
int nqa
Number of actuated articulations.
Definition: mbs_data.h:169
Functions::mbs_delete_user_IO
mbs_delete_user_IO_ptr mbs_delete_user_IO
Definition: mbs_data.h:114
MbsData::nqlocked
int nqlocked
Number of locked articulations.
Definition: mbs_data.h:167
Functions::mbs_save_user_IO
mbs_save_user_IO_ptr mbs_save_user_IO
Definition: mbs_data.h:123
MbsData::qdd
double * qdd
Array with the current values of the generalized acceleration.
Definition: mbs_data.h:189
mbs_load
MbsData * mbs_load(const char *mbs_filename, const char *build_path)
Load the data from the given *.mbs file (data in the xml format).
Definition: mbs_loader.c:36
Functions::mbs_cons_jdqd
mbs_cons_jdqd_ptr mbs_cons_jdqd
Definition: mbs_data.h:77
mbs_check.h
MbsInfoBodytree::joint_list
MbsInfoJoint ** joint_list
Definition: mbs_binder_public.h:175
MbsInfoRod::d_length
MbsInfoDData * d_length
Definition: mbs_binder_public.h:220
MbsData::jdqd_user
double * jdqd_user
Vector of jdqd for user constraints [nqv] (starting at 1), only used in symbolic accelred,...
Definition: mbs_data.h:230
MbsInfos::mbsname
char * mbsname
Definition: mbs_binder_public.h:394
mbs_info_to_data
MbsData * mbs_info_to_data(MbsInfos *mbs_infos, MbsData *s)
Retrieve a MbsData structure from the given MbsInfos.
Definition: mbs_loader.c:474
MbsInfos::n_extforce
int n_extforce
Definition: mbs_binder_public.h:406
MbsInfos::n_point
int n_point
Definition: mbs_binder_public.h:397
MbsInfoUserIOs::n_in
int n_in
Definition: mbs_binder_public.h:360
MbsData::udd
double * udd
For axelle red: array with the values of the acceleration of independent coordinate.
Definition: mbs_data.h:291
MbsData::ux
double * ux
Array with the values of the user variables.
Definition: mbs_data.h:285
mbs_new_loader
MbsLoader * mbs_new_loader()
Create a new structure loader used for the loading with options.
Definition: mbs_loader.c:283
mbs_close_libraries
void mbs_close_libraries(MbsData *mbs_data)
Close the symbolic and userfct libraries associated to the given MbsData.
Definition: mbs_load_libraries.c:290
Functions::user_JointForces
user_JointForces_ptr user_JointForces
Definition: mbs_data.h:84
MbsData::nhu
int nhu
Number of independent constraints.
Definition: mbs_data.h:171
MbsData::lrod
double * lrod
Array with the length of each rod.
Definition: mbs_data.h:216
mbs_new_data
MbsData * mbs_new_data()
Allocate an MbsData structure with default field values (NULL, 0).
Definition: mbs_loader.c:897
MbsData::n_user_IO
int n_user_IO
Definition: mbs_data.h:278
mbs_check_n_IO
int mbs_check_n_IO(UserIoInfo *user_IO_info, int n_in, int n_out, int n_user_IO)
Check the coherence between the number of user_IO ports between .mbs and user_IO.c files.
Definition: mbs_check.c:30
mbs_errors_names.h
mbs_set_symb_fun_null
void mbs_set_symb_fun_null(MbsData *s)
Set the pointer to project symbolic functions to NULL.
Definition: mbs_loader.c:300
MbsLoadOptions
Definition: mbs_loader.h:14
Functions::user_dirdyn_finish
user_dirdyn_finish_ptr user_dirdyn_finish
Definition: mbs_data.h:91
MbsInfoBody::n_joint
int n_joint
Number of joints leaving the body.
Definition: mbs_binder_public.h:157