|
Robotran C Documentation
|
Go to the documentation of this file.
18 #define LOADER_PRE_1 ">> LOAD>> "
19 #define LOADER_PRE_N " >> "
62 const char* config_filepath);
147 const char *exe_path,
const char* config_path,
148 const char* config_name,
const char * symbolicLib_name,
149 const char * symbolicLib_path,
const char * userfctLib_name,
150 const char * userfctLib_path,
int load_symb_user,
int verbose,
int * qrot
Array with the indices of the rotational articulations (incremental values)
Definition: mbs_data.h:281
MbsLoadOptions * opts
Contains the options that must be used when loading the project.
Definition: mbs_load_struct.h:78
int * qdriven
Definition: mbs_binder_public.h:201
user_LinkForces_d_ptr user_LinkForces_dq
Definition: mbs_data.h:167
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:1487
int n_rod
Definition: mbs_binder_public.h:252
MbsInfoCuts * cuts
Definition: mbs_binder_public.h:432
MbsData * mbs_load_from_path(const char *mbs_filename, const char *prj_path)
Load the multibody file considering the provided project path.
Definition: mbs_loader.c:75
void mbs_delete_dp(MbsDp *mbs_dp)
free a MbsDp structure.
Definition: mbs_loader.c:1159
double *** dSWr_dq
The derivative matrices of each external force MbsData::SWr vector according to the independent joint...
Definition: mbs_data.h:223
int mbs_unix_separator(char *path)
In-place replacement of windows-style path separator (\) by Unix separator (/).
Definition: mbs_path.c:34
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:108
mbs_checksymb_ptr mbs_check_symbolic
Definition: mbs_data.h:79
#define MBS_INFO_FAILURE
Definition: mbs_define.h:31
int n_state
Number of different named user state variable in the model.
Definition: mbs_binder_public.h:462
#define LOADER_PRE_1
Definition: mbs_loader.h:18
void mbs_msg(const char *msg,...)
Send a message.
Definition: mbs_message.c:87
int * xfidpt
Array of the points defined as force application points.
Definition: mbs_data.h:363
void free_d3Darray_1(double ***array3D)
Definition: useful_functions.c:374
mbs_invdynared_d_ptr mbs_invdynared_dqdd
Definition: mbs_data.h:82
int mbs_load_user_functions(MbsData *mbs_data, const char *userfctLib_path, const char *userfctLib_name)
mbs_load_function: dynamic loading of a function from a given library.
Definition: mbs_load_libraries.c:278
void * loaded_structure
Pointer to the loaded mbs file specific structure (related to file format).
Definition: mbs_load_struct.h:103
char * get_char_cpy(const char *fmt,...)
Copy the provided formatted string into a newly allocated memory.
Definition: useful_functions.c:196
int n_qv
Definition: mbs_binder_public.h:191
int Ncons
Number of algebraic constraints.
Definition: mbs_data.h:317
double ** M
Tangent matrix to acceleration of size [njoint+1, njoint+1].
Definition: mbs_data.h:202
mbs_invdynared_d_ptr mbs_invdynared_dqd
Definition: mbs_data.h:81
Definition: user_model.h:24
double * value_list
Vector (index starting at 1) containing the values retrieved from the multibody file.
Definition: mbs_binder_public.h:302
user_realtime_visu_ptr user_realtime_visu
Definition: mbs_data.h:188
struct Functions::@5 user
double * qd
Array with the current values of the generalized velocities.
Definition: mbs_data.h:285
double *** dSWr_link3d_dqd
The derivative matrices of each link3d MbsData::SWr vector according to the independent joint velocit...
Definition: mbs_data.h:235
double ** dQq_dqd
The derivative matrix of the joint force vector according to the independent joint velocities: .
Definition: mbs_data.h:215
int * qa
Array with the indices of actuated articulations (only for inverse dynamic).
Definition: mbs_data.h:277
double dt0
Initial value of the integration step size [s]. For dirdyn and invdyn only. This parameter is set fro...
Definition: mbs_data.h:309
int * size_out
The size of each output port.
Definition: mbs_user_interface.h:46
double * m
Array containing the mass of each body.
Definition: mbs_data.h:252
int DonePart
Flag that indicates if the coordinate partitioning module has been executed (default: 0=not done; 1=d...
Definition: mbs_data.h:392
UserIO * user_IO
Definition: mbs_data.h:378
MbsInfoParameter ** state_list
List of the user state variables, there are MbsInfos::n_state elements.
Definition: mbs_binder_public.h:466
int n_out
Number of OUTPUT user IO in the system.
Definition: mbs_binder_public.h:395
double * dq_dp
derivative of joint position q w.r.t. param p, vector size of [njoint+1].
Definition: mbs_data.h:205
mbs_cons_hJ_ptr mbs_cons_hJ
Definition: mbs_data.h:75
double *** dSWr_dqd
The derivative matrices of each external force MbsData::SWr vector according to the independent joint...
Definition: mbs_data.h:225
user_equil_finish_ptr user_equil_finish
Definition: mbs_data.h:103
double qdd0
Initial acceleration of the joint.
Definition: mbs_binder_public.h:141
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
int Nlink3D
Number of 3D links.
Definition: mbs_data.h:337
Contains information about UserIO.
Definition: mbs_user_interface.h:32
char * mbs_filename
Path to mbs file including the file with the extension (.mbs)
Definition: mbs_data.h:409
MbsData * mbs_info_to_data(MbsLoader *mbs_loader, MbsData *s)
Retrieve a MbsData structure from the given MbsInfos.
Definition: mbs_loader.c:1503
MbsInfoBase * base
Definition: mbs_binder_public.h:430
void mbs_delete_data(MbsData *s)
Free the memory used by the given MbsData structure.
Definition: mbs_loader.c:2089
mbs_invdynared_d_ptr mbs_invdynared_dp
Definition: mbs_data.h:83
MbsData * mbs_load_with_loader(const char *mbs_filename, MbsLoader *mbs_loader)
Load the data from the given multibody file using the provided MbsLoader.
Definition: mbs_loader.c:30
int nqv
Number of dependent articulations.
Definition: mbs_data.h:267
mbs_link_ptr mbs_link
Definition: mbs_data.h:69
mbs_new_user_model_ptr mbs_new_user_model
Definition: mbs_data.h:124
int DoneEquil
Flag that indicates if the equilibrium module has been executed (default: 0=not done; 1=done).
Definition: mbs_data.h:393
int * qc
Array with the indices of driven (locked and driven) articulations.
Definition: mbs_data.h:272
double * ux0
Array with the initial values of the user variables.
Definition: mbs_data.h:386
mbs_invdyna_ptr mbs_invdyna
Definition: mbs_data.h:74
#define _MBS_ERR_MOD_LOAD
Module error number module: Loading = -900.
Definition: mbs_errors_names.h:73
int nqu
Number of independent articulations.
Definition: mbs_data.h:262
char * prj_path
Folder containing the project root folder (by default it contains the folders "animationR",...
Definition: mbs_load_struct.h:49
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
@ LOAD_NONE
Definition: mbs_load_struct.h:64
#define _MBS_ERR_LOW_FILES
Low Level error number Error during opening/writing files = -9.
Definition: mbs_errors_names.h:157
MbsInfoUserIO ** user_IO_list
The detail of each user IO in the system.
Definition: mbs_binder_public.h:397
char * userfctLib_name
Definition: mbs_load_struct.h:25
MbsLoader * mbs_new_loader()
Create a new structure loader used for the loading with options.
Definition: mbs_loader.c:940
double * MBSdata_d_ptr
link in the creation of mbs_data
Definition: mbs_binder_public.h:46
int njoint
Number of joints in the system.
Definition: mbs_data.h:259
MbsData * mbs_loader_load(const char *mbs_filepath, MbsLoader *mbs_loader)
Load the data with the specified loader.
Definition: mbs_loader.c:730
Declaration of functions that are project dependent.
int mbs_info_structurer(MbsInfos *mbs_infos)
mbs_info_structurer
Definition: mbs_loader_public.c:166
double tf
Final time of the simulation [s]. For dirdyn and invdyn only. This parameter is set from dirdyn/invyn...
Definition: mbs_data.h:308
double ** G
Damping matrix of size [njoint+1, njoint+1].
Definition: mbs_data.h:201
int npt
Number of anchor points.
Definition: mbs_data.h:249
double *** dSWr_link3d_dq
The derivative matrices of each link3d MbsData::SWr vector according to the independent joint coordin...
Definition: mbs_data.h:233
mbs_delete_user_model_ptr mbs_delete_user_model
Definition: mbs_data.h:125
user_equil_init_ptr user_equil_init
Definition: mbs_data.h:101
int n_qrot
Definition: mbs_binder_public.h:206
user_dirdyn_init_ptr user_dirdyn_init
Definition: mbs_data.h:93
int n_ball
Number of ball constraint in the system.
Definition: mbs_data.h:313
user_equil_loop_ptr user_equil_loop
Definition: mbs_data.h:102
double * gravity
Array with the component (x, y, z) of the gravity vector expressed in the inertial frame.
Definition: mbs_binder_public.h:124
set_mbs_to_output_ptr user_synch_outputs
Definition: mbs_data.h:191
int n_in
Number of user input port.
Definition: mbs_user_interface.h:35
int n_ball
Definition: mbs_binder_public.h:251
mbs_save_um_ptr mbs_save_um
Definition: mbs_data.h:146
void mbs_set_user_fun_null(MbsData *s)
Set the pointer to project user functions to NULL.
Definition: mbs_loader.c:1033
int mbs_print_load_options(MbsLoadOptions *opts, const char *indentation)
Print the provided loader options.
Definition: mbs_loader.c:892
double mass
Mass of the body.
Definition: mbs_binder_public.h:171
MbsLoadOptions * mbs_new_load_options()
Create a new structure with options for the loading.
Definition: mbs_loader.c:875
MbsData * mbs_load_with_exec(const char *mbs_filename, const char *exe_filepath)
Load the multibody file using executable filepath to find project path.
Definition: mbs_loader.c:69
int * qu
Definition: mbs_binder_public.h:189
MbsData * mbs_full_loader(const char *mbs_filename, const char *prj_path, const char *exe_filepath, const char *config_path, const char *config_name, const char *symbolicLib_name, const char *symbolicLib_path, const char *userfctLib_name, const char *userfctLib_path, int load_symb_user, int verbose, MbsLoader *loader)
Fully configurable loading function.
Definition: mbs_loader.c:105
MbsData * mbs_load_from_path(const char *mbs_filename, const char *prj_path)
Load the multibody file considering the provided project path.
Definition: mbs_loader.c:75
user_dirdyn_loop_ptr user_dirdyn_loop
Definition: mbs_data.h:94
MbsData * mbs_load(const char *mbs_filename)
Load the data from the given multibody file.
Definition: mbs_loader.c:24
MbsData * mbs_load_with_config_filepath(const char *mbs_filename, const char *config_filepath)
Load the data from the given multibody file and configuration filename.
Definition: mbs_loader.c:42
int n_joint
Definition: mbs_binder_public.h:185
user_invdyn_finish_ptr user_invdyn_finish
Definition: mbs_data.h:99
int size
Number of values in the user IO.
Definition: mbs_binder_public.h:378
Definition: mbs_binder_public.h:428
int Nux
Number of user variable.
Definition: mbs_data.h:387
void mbs_load_user_model(MbsInfos *mbs_infos, UserModel *ums)
Load the user model data.
Definition: user_model.c:35
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:991
int flag_jac_position
Flag to compute the Jacobian of the constraint for position or velocity solution.
Definition: mbs_data.h:398
int mbs_load_symbolic_functions(MbsData *mbs_data, const char *symbolicLib_path, const char *symbolicLib_name, int nb_loop, int nb_link, int nb_3d_link, int nb_ext_forces, int nb_sensors)
Loads the symbolic functions from library into MbsData structure.
Definition: mbs_load_libraries.c:166
double ** jac_user
Jacobian of constraints [nqv x njoint] (starting at 1), only used in symbolic accelred,...
Definition: mbs_data.h:328
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:407
user_JointForces_d_ptr user_JointForces_dqdd
Definition: mbs_data.h:164
user_ExtForces_ptr user_ExtForces
Definition: mbs_data.h:115
MbsDp * mbs_dp
Structure to store the matrix of tangent analysis (symbolic).
Definition: mbs_data.h:416
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:61
int type
Nature of the user IO:
Definition: mbs_binder_public.h:376
int DoneModal
Flag that indicates if the modal module has been executed (default: 0=not done; 1=done).
Definition: mbs_data.h:394
mbs_dirdyna_ptr mbs_dirdyna
Definition: mbs_data.h:73
UserIoInfo * mbs_create_user_IO_info(MbsInfos *mbs_infos, MbsData *s)
Fill the user io information for the MbsData structure.
Definition: mbs_loader.c:1372
user_joystick_axes_ptr user_joystick_axes
Definition: mbs_data.h:186
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
@ LOAD_ALL
Definition: mbs_load_struct.h:64
double ** SWr
Array of Swr vector for each external forces.
Definition: mbs_data.h:364
double *** get_d3Darray_1(int x, int y, int z)
create (with memory allocation) a [x times y times z] 3D array of doubles, starting at index 1
Definition: useful_functions.c:344
int mbs_print_loader(MbsLoader *loader, const char *indentation)
Print the provided loader.
Definition: mbs_loader.c:955
void mbs_delete_load_options(MbsLoadOptions *opts)
Free the memory associated to the given MbsLoadOptions.
Definition: mbs_loader.c:930
void * mbs_xml_free_clean(xmlDocPtr doc)
Free the xml document and clean the xml library parser.
Definition: mbs_xml_binder.c:2732
mbs_link3D_ptr mbs_link3D
Definition: mbs_data.h:70
char * mbsysc_path
Installation directory of MBsysC.
Definition: mbs_data.h:424
double * q_cos
Array with the cosine values of the generalized coordinates, if rotational (if translational,...
Definition: mbs_data.h:294
user_Link3DForces_ptr user_Link3DForces
Definition: mbs_data.h:114
int * hu
Array with the indices of independent constraints.
Definition: mbs_data.h:280
char * mbs_dirname(const char *path, int verbose)
mbs_dirname returns the leading part of the path (UNIX and MAC).
Definition: mbs_path.c:407
double ** dSWr_link3d_dp
The derivative matrices of each link3d MbsData::SWr vector according to the specified parameter: .
Definition: mbs_data.h:239
double ** dSWr_dp
The derivative matrices of each external force MbsData::SWr vector according to the specified paramet...
Definition: mbs_data.h:229
int * qv
Definition: mbs_binder_public.h:192
int Nxfrc
Number of points where an external force is applied into a body.
Definition: mbs_data.h:362
MbsData * mbs_load_with_loader(const char *mbs_filename, MbsLoader *mbs_loader)
Load the data from the given multibody file using the provided MbsLoader.
Definition: mbs_loader.c:30
MbsInfoRod ** rod_list
Definition: mbs_binder_public.h:256
double *** dSWr_dqdd
The derivative matrices of each external force MbsData::SWr vector according to the independent joint...
Definition: mbs_data.h:227
int * qa
Definition: mbs_binder_public.h:204
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
int * extforce_point_list
List of the point index (in MbsInfos::point_list) that has a external force.
Definition: mbs_binder_public.h:458
user_joystick_buttons_ptr user_joystick_buttons
Definition: mbs_data.h:187
char * config_file
Configuration file at json format.
Definition: mbs_load_struct.h:35
double * qd0
Array with the initial values of the generalized velocities.
Definition: mbs_data.h:289
This header defines MbsInfos (and its substructures) as well as the loading/deleting functions.
int * qc
Definition: mbs_binder_public.h:195
mbs_get_user_model_list_ptr mbs_get_user_model_list
Definition: mbs_data.h:145
JsonNode * mbs_config
Pointer to the configuration file contents.
Definition: mbs_load_struct.h:88
MbsData * mbs_new_data()
Allocate an MbsData structure with default field values (NULL, 0).
Definition: mbs_loader.c:1961
mbs_print_user_IO_ptr mbs_print_user_IO
Print the current UserIO values.
Definition: mbs_data.h:152
int Nlink
Number of forces acting between two points of the system (force law implemented in user_LinkForces())...
Definition: mbs_data.h:336
double * dQq_dp
The derivative vector of the joint force vector according to the specified parameter: .
Definition: mbs_data.h:219
mbs_load_user_model_ptr mbs_load_user_model
Definition: mbs_data.h:141
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:173
user_keyboard_ptr user_keyboard
Definition: mbs_data.h:184
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
user_free_ptr user_free
Definition: mbs_data.h:91
UserIoInfo * __user_IO_info
Definition: mbs_data.h:379
MbsInfoDData * d_qf
d_data for the forced q
Definition: mbs_binder_public.h:145
int * qlocked
Definition: mbs_binder_public.h:198
int n_qa
Definition: mbs_binder_public.h:203
char * mbs_getcwd()
Return the Current Working Directory (cwd).
Definition: mbs_path.c:131
mbs_sensor_ptr mbs_sensor
Definition: mbs_data.h:77
int MAX_NR_ITER
Maximal number of iterations for NR procedure, default 100.
Definition: mbs_data.h:320
MbsData * mbs_full_loader(const char *mbs_filename, const char *prj_path, const char *exe_path, const char *config_path, const char *config_name, const char *symbolicLib_name, const char *symbolicLib_path, const char *userfctLib_name, const char *userfctLib_path, int load_symb_user, int verbose, MbsLoader *loader)
Fully configurable loading function.
Definition: mbs_loader.c:105
int Nuserc
Number of user constraints.
Definition: mbs_data.h:318
user_equil_fxe_ptr user_equil_fxe
Definition: mbs_data.h:104
double * Fl
Array with the current values of the forces on each link (see: user_LinkForces()).
Definition: mbs_data.h:340
double qd0
Initial velocity of the joint.
Definition: mbs_binder_public.h:140
int * qu
Array with the indices of the independent articulations (free)
Definition: mbs_data.h:271
MbsInfoUserIOs * user_IOs
Definition: mbs_binder_public.h:435
double NRerr
Maximal error on constraint allowed in Newton-Raphson algorithm, default 1.0e-9.
Definition: mbs_data.h:319
double ** dQq_dq
The derivative matrix of the joint force vector according to the independent joint coordinates: .
Definition: mbs_data.h:213
MbsLoadOptions * mbs_new_load_options()
Create a new structure with options for the loading.
Definition: mbs_loader.c:875
MbsData * mbs_load_with_exec(const char *mbs_filename, const char *exe_filepath)
Load the multibody file using executable filepath to find project path.
Definition: mbs_loader.c:69
void mbs_msg_v(int v_opt, int v_lvl, const char *msg,...)
Send a message only of the message level is lower than the verbosity option.
Definition: mbs_message.c:143
Definition: mbs_load_struct.h:76
void mbs_delete_infos(MbsInfos *mbs_infos)
Definition: mbs_loader_public.c:1371
double ** trq
Matrix with the components of the resultant external torques (pure torque and couple produced by forc...
Definition: mbs_data.h:300
int * qv
Array with the indices of the dependent articulations .
Definition: mbs_data.h:279
double * Qc
Array with the value of joint force introduced in driven joint to respect the user function.
Definition: mbs_data.h:332
int Nloopc
Number of loop constraints.
Definition: mbs_data.h:316
int n_parameter
Definition: mbs_binder_public.h:354
double ** ptr_in
List of pointers to each user input values.
Definition: mbs_user_interface.h:54
char ** name_out
Name of each user output port.
Definition: mbs_user_interface.h:66
mbs_extforces_ptr mbs_extforces
Definition: mbs_data.h:71
user_cons_hJ_ptr user_cons_hJ
Definition: mbs_data.h:109
void mbs_print_full_loader(const char *mbs_filename, const char *prj_path, const char *exe_path, const char *config_path, const char *config_name, const char *symbolicLib_name, const char *symbolicLib_path, const char *userfctLib_name, const char *userfctLib_path, int load_symb_user, int verbose, MbsLoader *loader)
Definition: mbs_loader.c:81
#define _MBS_ERR_LOW_NULL_PTR
Low Level error number A called symbolic or user function is set to NULL;.
Definition: mbs_errors_names.h:142
@ LOAD_SYMBOLIC
Definition: mbs_load_struct.h:64
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:339
user_LinkForces_ptr user_LinkForces
Definition: mbs_data.h:113
double * Qq
Array with the values of the joint forces.
Definition: mbs_data.h:301
char * userfctLib_path
Definition: mbs_load_struct.h:26
MbsData * mbs_load_with_config_name(const char *mbs_filename, const char *config_name)
Load the data from the given multibody file and configuration filename.
Definition: mbs_loader.c:36
UserIoInfo * mbs_new_user_IO_info()
Allocate an empty UserIoInfo structure.
Definition: mbs_loader.c:1340
Definition: mbs_binder_public.h:388
double * q
Array with the current values of the generalized coordinates.
Definition: mbs_data.h:284
char * name
Name of the user IO.
Definition: mbs_binder_public.h:372
void free_dvec_1(double *vec)
release memory for a vector of doubles, starting at index 1
Definition: mbs_1D_array.c:976
int n_user_IO
Number of user IO in the system.
Definition: mbs_binder_public.h:391
int n_state_value
Number of user state values.
Definition: mbs_binder_public.h:464
double ** In
Array containing the inertia tensor component of each body (in the body fixed frame,...
Definition: mbs_data.h:253
int Nsensor
< Array of l3DWr vector for each 3D link forces.
Definition: mbs_data.h:359
MbsDp * mbs_new_dp(MbsData *mbs_data)
Allocate and initialize a MbsDp structure in MbsData::mbs_dp.
Definition: mbs_loader.c:1105
user_ExtForces_dp_ptr user_ExtForces_dp
Definition: mbs_data.h:180
#define MBS_VERBOSE_DEBUG
Definition: mbs_define.h:47
char * project_path
Path to the mbs project folder.
Definition: mbs_data.h:411
int n_qc
Definition: mbs_binder_public.h:194
void mbs_delete_load_options(MbsLoadOptions *opts)
Free the memory associated to the given MbsLoadOptions.
Definition: mbs_loader.c:930
MbsDataLibInfo * symbolicLibHandle
Definition: mbs_data.h:61
#define MBS_VERBOSE_ERROR
Definition: mbs_define.h:44
user_realtime_plot_ptr user_realtime_plot
Definition: mbs_data.h:185
int nqdriven
Number of driven articulations.
Definition: mbs_data.h:265
user_JointForces_d_ptr user_JointForces_dqd
Definition: mbs_data.h:163
void mbs_set_symb_fun_null(MbsData *s)
Set the pointer to project symbolic functions to NULL.
Definition: mbs_loader.c:1013
int n_sensor
Number of sensor in the model.
Definition: mbs_binder_public.h:451
MbsInfoBody ** body_list
Definition: mbs_binder_public.h:183
user_realtime_options_ptr user_realtime_options
Definition: mbs_data.h:183
Functions fct
Structure to store the pointer to the project-specific functions.
Definition: mbs_data.h:414
user_Derivative_ptr user_Derivative
Definition: mbs_data.h:106
MbsData * mbs_loader_load(const char *mbs_filepath, MbsLoader *mbs_loader)
Load the data with the specified loader.
Definition: mbs_loader.c:730
void mbs_delete_loader(MbsLoader *loader)
Free the memory associated to the given MbsLoader.
Definition: mbs_loader.c:985
int load_symb_user
Specify the project libraries to be loaded, an enumeration gives possible values:
Definition: mbs_load_struct.h:33
user_invdyn_loop_ptr user_invdyn_loop
Definition: mbs_data.h:98
mbs_get_user_model_size_ptr mbs_get_user_model_size
Definition: mbs_data.h:144
double ** frc
Matrix with the components of the resultant external forces (in the body fixed frame) applied to the ...
Definition: mbs_data.h:299
double ** dQq_dqdd
The derivative matrix of the joint force vector according to the independent joint accelerations: .
Definition: mbs_data.h:217
int n_qu
Definition: mbs_binder_public.h:188
int n_qdriven
Definition: mbs_binder_public.h:200
#define LOADER_PRE_N
Definition: mbs_loader.h:19
MbsInfos * mbs_infos
Contains the multibody structure with more informations than used by computation.
Definition: mbs_load_struct.h:80
void mbs_set_user_fun_null(MbsData *s)
Set the pointer to project user functions to NULL.
Definition: mbs_loader.c:1033
int * size_in
The size of each input port.
Definition: mbs_user_interface.h:42
int nqc
Number of driven articulations, it includes qlocked and qdriven.
Definition: mbs_data.h:263
double * dQc_dp
Derivative of Q driven w.r.t. param p, vector size of [njoint+1].
Definition: mbs_data.h:210
double ** l3DWr
Definition: mbs_data.h:342
MbsInfoLinks * links
Definition: mbs_binder_public.h:433
UserModel * user_model
Structure containing all user model, this structure is specific for each project.
Definition: mbs_data.h:375
char * symbolicLib_name
Definition: mbs_load_struct.h:22
user_LinkForces_dp_ptr user_LinkForces_dp
Definition: mbs_data.h:170
void * realtime
Pointer to Simu_realtime structure.
Definition: mbs_data.h:418
MbsInfoDData ** d_pt
Definition: mbs_binder_public.h:113
mbs_print_user_model_ptr mbs_print_user_model
Definition: mbs_data.h:143
MbsData * mbs_load(const char *mbs_filename)
Load the data from the given multibody file.
Definition: mbs_loader.c:24
mbs_accelred_ptr mbs_accelred
Definition: mbs_data.h:72
double ** dpt
Array containing the coordinate of all anchor points (3+1 lines, npt+1 columns).
Definition: mbs_data.h:250
int n_solid
Definition: mbs_binder_public.h:253
Definition: mbs_binder_public.h:369
double ** K
Stiffness matrix of size [njoint+1, njoint+1].
Definition: mbs_data.h:200
int n_value
Number of values in the parameter.
Definition: mbs_binder_public.h:300
char * mbs_name
Name of the mbs project as it is stored in the xml file.
Definition: mbs_data.h:412
double *** dSWr_link3d_dqdd
The derivative matrices of each link3d MbsData::SWr vector according to the independent joint acceler...
Definition: mbs_data.h:237
int n_user_model
Definition: mbs_binder_public.h:361
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:172
char ** name_in
Name of each user input port.
Definition: mbs_user_interface.h:64
double * q0
Array with the initial values of the generalized coordinates.
Definition: mbs_data.h:288
char * symbolicLib_path
Definition: mbs_load_struct.h:23
void mbs_delete_user_IO_info(UserIoInfo *ioInfo)
Definition: mbs_loader.c:1449
Definition: mbs_data.h:246
int n_qlocked
Definition: mbs_binder_public.h:197
int n_solid
Number of solid constraint in the system.
Definition: mbs_data.h:312
mbs_get_user_IO_size_ptr mbs_get_user_IO_size
Get the size of the UserIO structure inside the user_IO.c file.
Definition: mbs_data.h:140
@ XML_LOADED
Definition: mbs_load_struct.h:74
MbsData * mbs_info_to_data(MbsLoader *mbs_loader, MbsData *s)
Retrieve a MbsData structure from the given MbsInfos.
Definition: mbs_loader.c:1503
mbs_gensensor_ptr mbs_gensensor
Definition: mbs_data.h:78
MbsInfoPoint ** point_list
List of all anchors point in the model
Definition: mbs_binder_public.h:448
void mbs_delete_data(MbsData *s)
Free the memory used by the given MbsData structure.
Definition: mbs_loader.c:2089
int n_rod
Number of rod constraint in the system.
Definition: mbs_data.h:314
double * dqdd_dp
derivative of joint acceleration qdd w.r.t. param p, vector size of [njoint+1].
Definition: mbs_data.h:207
user_cons_J_accelred_ptr user_cons_J_accelred
Definition: mbs_data.h:111
user_ExtForces_d_ptr user_ExtForces_dqd
Definition: mbs_data.h:178
@ IGNORE_LOADED
Definition: mbs_load_struct.h:74
MbsDataLibInfo * userfctLibHandle
Definition: mbs_data.h:62
int * qlocked
Array with the indices of locked articulations.
Definition: mbs_data.h:273
double * Qa
Array of active joint forces (in case of simulink,invdyna,equil,linearization,...)
Definition: mbs_data.h:302
user_load_post_ptr user_load_post
Definition: mbs_data.h:90
int mbs_is_dir_or_file(const char *path)
Check if the path is valid and lead to a file or directory.
Definition: mbs_path.c:547
int Nuser_model
Number of declared user models in MBsysPad.
Definition: mbs_data.h:374
char * build_path
Path to the build folder.
Definition: mbs_data.h:410
mbs_new_user_IO_ptr mbs_new_user_IO
Initialize the UserIO structure and bind the ioInfo pointer to the allocated memory (project specific...
Definition: mbs_data.h:122
int * qrot
Definition: mbs_binder_public.h:207
int process
Flag that indicate which module is currently running (1=partitioning, 2=equilibrium,...
Definition: mbs_data.h:396
MbsInfoBodytree * bodytree
Definition: mbs_binder_public.h:431
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:51
int nbody
Number of bodies in the system.
Definition: mbs_data.h:257
Structure related to tangent matrices computations.
Definition: mbs_data.h:199
double ** l
Array containing the center of mass coordinates (in the body fixed frame, one column per body includi...
Definition: mbs_data.h:251
user_JointForces_d_ptr user_JointForces_dq
Definition: mbs_data.h:162
int verbose
Verbosity level (not yet implemented everywhere): Verbosity level propagated to other compatible modu...
Definition: mbs_load_struct.h:39
#define MSG_PRE
Definition: mbs_loader.c:19
double ** ptr_out
List of pointers to each user output values.
Definition: mbs_user_interface.h:62
double t0
Initial time of the simulation [s]. For dirdyn and invdyn only. This parameter is set from dirdyn/inv...
Definition: mbs_data.h:307
double * dqd_dp
derivative of joint velocity qd w.r.t. param p, vector size of [njoint+1].
Definition: mbs_data.h:206
double length
Definition: mbs_binder_public.h:229
void free_ivec_1(int *vec)
release memory for a vector of integers, starting with index 1
Definition: mbs_1D_array.c:495
void mbs_delete_dp(MbsDp *mbs_dp)
free a MbsDp structure.
Definition: mbs_loader.c:1159
char * mbs_basename(const char *path, int verbose)
mbs_basename returns the trailing part of the path (UNIX and MAC).
Definition: mbs_path.c:359
user_cons_jdqd_ptr user_cons_jdqd
Definition: mbs_data.h:110
MbsInfoUserModel ** user_model_list
Definition: mbs_binder_public.h:362
user_DrivenJoints_ptr user_DrivenJoints
Definition: mbs_data.h:107
void json_delete(JsonNode *node)
Definition: json.cc:445
user_invdyn_init_ptr user_invdyn_init
Definition: mbs_data.h:97
double * Z
Array with the current values of the distances between of the points of a link (see: user_LinkForces(...
Definition: mbs_data.h:338
char * find_project_path_from_cwd(const char *optionnal_path, int verbose)
Find the project directory from current working directory (cwd) or provided path.
Definition: mbs_path.c:157
double g[3+1]
The 3 gravity components.
Definition: mbs_data.h:255
int flag_stop
stop the simulation. For dirdyn, equil, invdyn and solvekin only.
Definition: mbs_data.h:397
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
double * dQa_dp
[Inverse Dynamics] derivative of Q actuated w.r.t. param p, vector size of [njoint+1].
Definition: mbs_data.h:209
int mbs_print_load_options(MbsLoadOptions *opts, const char *indentation)
Print the provided loader options.
Definition: mbs_loader.c:892
user_JointForces_dp_ptr user_JointForces_dp
Definition: mbs_data.h:165
JsonNode * mbs_info_configuration(MbsInfos *mbs_infos, const char *config_file, int *err)
Modify the MbsInfo contents according to the configuration file.
Definition: mbs_loader_public.c:1667
void mbs_delete_loader(MbsLoader *loader)
Free the memory associated to the given MbsLoader.
Definition: mbs_loader.c:985
mbs_bind_user_model_ptr mbs_bind_user_model
Definition: mbs_data.h:142
double * value
Value set at loading.
Definition: mbs_binder_public.h:382
int n_body
Definition: mbs_binder_public.h:182
#define MSG_ERR
Definition: mbs_loader.c:18
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
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
int loaded_nature
Flag to specifying either if the deep mbs file specific structure must be kept in memory (before load...
Definition: mbs_load_struct.h:100
#define MBS_INFO_SUCCESS
Definition: mbs_define.h:29
int * qdriven
Array with the indices of driven articulations.
Definition: mbs_data.h:275
MbsData * mbs_load_with_config_filepath(const char *mbs_filename, const char *config_filepath)
Load the data from the given multibody file and configuration filename.
Definition: mbs_loader.c:42
MbsInfoUserModels * user_models
Definition: mbs_binder_public.h:434
double q0
Initial position of the joint.
Definition: mbs_binder_public.h:139
double * lambda
Array with the values of the Lagrange Multipliers related to the constraints.
Definition: mbs_data.h:321
struct Functions::@4 symb
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
double * uxd
Array with the values of the time derivatives of the user variables.
Definition: mbs_data.h:385
double * q_sin
Array with the sine values of the generalized coordinates, if rotational (if translational,...
Definition: mbs_data.h:293
double * qdd0
Array with the initial values of the generalized acceleration.
Definition: mbs_data.h:290
int n_out
Number of user output port.
Definition: mbs_user_interface.h:37
int nqa
Number of actuated articulations.
Definition: mbs_data.h:266
mbs_delete_user_IO_ptr mbs_delete_user_IO
Free the memory associated to the given UserIO structure.
Definition: mbs_data.h:130
int nqlocked
Number of locked articulations.
Definition: mbs_data.h:264
user_ExtForces_d_ptr user_ExtForces_dqdd
Definition: mbs_data.h:179
mbs_save_user_IO_ptr mbs_save_user_IO
Save the current UserIO values into a file stream.
Definition: mbs_data.h:159
user_LinkForces_d_ptr user_LinkForces_dqd
Definition: mbs_data.h:168
double * qdd
Array with the current values of the generalized acceleration.
Definition: mbs_data.h:286
mbs_cons_jdqd_ptr mbs_cons_jdqd
Definition: mbs_data.h:76
#define MBS_INFO_WARNING
Definition: mbs_define.h:30
MbsInfoJoint ** joint_list
Definition: mbs_binder_public.h:186
MbsInfos * mbs_info_reader(const char *mbs_filename, int verbose)
Read the mbs file to retrieve size informations (number of joints...).
Definition: mbs_loader_public.c:17
MbsInfoDData * d_length
Definition: mbs_binder_public.h:231
double * jdqd_user
Vector of jdqd for user constraints [nqv] (starting at 1), only used in symbolic accelred,...
Definition: mbs_data.h:329
int n_link
Definition: mbs_binder_public.h:272
char * mbsname
Name of the project in the multibody system file.
Definition: mbs_binder_public.h:441
int mbs_print_loader(MbsLoader *loader, const char *indentation)
Print the provided loader.
Definition: mbs_loader.c:955
int remove_prjpath(char **path, char *project_source_dir)
If the path start with PRJPATH, an new path is allocated replacing it.
Definition: mbs_path.c:524
MbsData * mbs_load_with_config_name(const char *mbs_filename, const char *config_name)
Load the data from the given multibody file and configuration filename.
Definition: mbs_loader.c:36
int n_extforce
Number of external force in the model.
Definition: mbs_binder_public.h:456
int n_point
Number of anchor points.
Definition: mbs_binder_public.h:446
user_LinkForces_d_ptr user_LinkForces_dqdd
Definition: mbs_data.h:169
int n_in
Number of INPUT user IO in the system.
Definition: mbs_binder_public.h:393
double * udd
For axelle red: array with the values of the acceleration of independent coordinate.
Definition: mbs_data.h:390
double * ux
Array with the values of the user variables.
Definition: mbs_data.h:384
MbsDp * mbs_new_dp(MbsData *mbs_data)
Allocate and initialize a MbsDp structure in MbsData::mbs_dp.
Definition: mbs_loader.c:1105
mbs_invdynared_d_ptr mbs_invdynared_dq
Definition: mbs_data.h:80
MbsLoader * mbs_new_loader()
Create a new structure loader used for the loading with options.
Definition: mbs_loader.c:940
void mbs_close_libraries(MbsData *mbs_data)
Close the symbolic and userfct libraries associated to the given MbsData.
Definition: mbs_load_libraries.c:387
user_JointForces_ptr user_JointForces
Definition: mbs_data.h:88
int custom_mbs_info
Internal flag to specify if a custom MbsInfo was set in the structure ( and thus must not be freed) o...
Definition: mbs_load_struct.h:84
int nhu
Number of independent constraints.
Definition: mbs_data.h:268
double * lrod
Array with the length of each rod.
Definition: mbs_data.h:315
int mbs_set_user_IO(UserIoInfo *ioInfo, double val)
Definition: mbs_loader.c:1233
int n_link3D
Definition: mbs_binder_public.h:275
#define MBS_VERBOSE_ALL
Definition: mbs_define.h:46
MbsData * mbs_new_data()
Allocate an MbsData structure with default field values (NULL, 0).
Definition: mbs_loader.c:1961
int n_user_IO
Definition: mbs_data.h:377
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:31
void mbs_set_symb_fun_null(MbsData *s)
Set the pointer to project symbolic functions to NULL.
Definition: mbs_loader.c:1013
Definition: mbs_load_struct.h:20
user_dirdyn_finish_ptr user_dirdyn_finish
Definition: mbs_data.h:95
int n_joint
Number of joints leaving the body.
Definition: mbs_binder_public.h:168
user_ExtForces_d_ptr user_ExtForces_dq
Definition: mbs_data.h:177