Robotran C Documentation
mbs_lmgc.h
Go to the documentation of this file.
1 
2 #include <stdio.h>
3 //#include "mbs_xml_reader.h"
4 #include "mbs_part.h"
5 #include "mbs_dirdyn.h"
6 #include "mbs_buffer.h"
7 #include "mbs_data.h"
8 #include "mbs_aux.h"
9 
10 
11 
19 typedef struct MbsLmgcNode{
20 
22  int sensorId;
25 
27  double *JRed[6];
29  double *JRedBeg[6];
31  double *JRedQm[6];
32 
33 } MbsLmgcNode;
34 
35 
42 typedef struct MbsLmgcData{
43 
45  int nb_nodes;
46 
49 
52 
54  MbsAux* lds;
55 
58 
60  double* qm;
61 
63  double* vFree;
64 
66  double* vBeg;
67 
69  double* vAux;
70 
72  double* reac;
73 
75  double* rAux;
76 
78  double* impQc;
79 
80 
82  char* mbsFile;
83 
85  char* libPath;
86 
88  char* resqFile;
89 
91  char* resqdFile;
92 
94  char* resQqFile;
95 
97  char* resImpQcFile;
98 
100  char* animFile;
101 
102 
105 
107  double** savedArrays;
108 
110  int bufferNb;
111 
114 
117 
120 
126 
127 } MbsLmgcData;
128 
134 typedef struct MbsLmgcSystem{
135 
137  int nb_mbs;
138 
139 
142 
144 
145 
146 
147 
152 
153 
154 
155 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
156 /* PRE-INITIALIZATION FUNCTIONS */
157 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
158 
159 
168 int mbs_lmgc_set_nb_mbs(int nb);
169 
178 #ifdef __cplusplus
179 extern "C" {
180 #endif
181 int mbs_lmgc_set_mbsdata(int iMbs, MbsData* mbs_data);
182 #ifdef __cplusplus
183 }
184 #endif
185 
193 int mbs_lmgc_set_mbs_file(int iMbs, char* filename);
194 
204 int mbs_lmgc_set_libpath(int iMbs, char* libpath);
205 
217 int mbs_lmgc_set_res_file(int iMbs, char* filename);
218 
227 int mbs_lmgc_set_anim_file(int iMbs, char* filename);
228 
237 int mbs_lmgc_set_saveperiod(int saveperiod);
238 
250 int mbs_lmgc_set_node_sensor_ids(int iMbs, int nbNodes, int* sensorIds);
251 
260 int mbs_lmgc_get_node_nb(int iMbs);
261 
262 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
263 /* BINDING FUNCTIONS */
264 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
265 
266 
272 int mbs_lmgc_initialize();
273 
278 void mbs_lmgc_finalize();
279 
280 
287 void mbs_lmgc_increment(double tsim);
288 
299 void mbs_lmgc_compute_free_vlocy(double h, double theta);
300 
320 void mbs_lmgc_update_nodes_3D(int i_mbs, double* coorTT, double* localFrameTT, int storage);
321 
340 void mbs_lmgc_update_nodes_2D(int i_mbs, double* coorTT, int storage);
341 
349 void mbs_lmgc_nullify_reac(int i_mbs);
350 
358 void mbs_lmgc_nullify_rAux(int i_mbs);
359 
360 
377 void mbs_lmgc_add_reac(int i_mbs, int i_node, double* reacNode);
378 
395 void mbs_lmgc_add_rAux(int i_mbs, int i_node, double* reacNode);
396 
397 
405 void mbs_lmgc_nullify_vFree(int i_mbs);
406 
414 void mbs_lmgc_nullify_vAux(int i_mbs);
415 
429 void mbs_lmgc_comp_vAux_Iaux(int i_mbs);
430 
444 void mbs_lmgc_comp_vAux_Ireac(int i_mbs);
445 
461 void mbs_lmgc_get_vBeg(int i_mbs, int i_node, double* vlocyNode);
462 
478 void mbs_lmgc_get_vFree(int i_mbs, int i_node, double* vlocyNode);
479 
495 void mbs_lmgc_get_vAux(int i_mbs, int i_node, double* vlocyNode);
496 
516 void mbs_lmgc_compute_dof(double h, double theta);
517 
518 
523 void mbs_lmgc_update_dof();
MbsLmgcData::resImpQcFile
char * resImpQcFile
String defining the file in which to save impuls of joint/force associated to driven joints.
Definition: mbs_lmgc.h:97
mbs_lmgc_nullify_vAux
void mbs_lmgc_nullify_vAux(int i_mbs)
Reset the generalized velocity to zero for the specified mbs.
Definition: mbs_lmgc.c:1234
mbs_lmgc_initialize
int mbs_lmgc_initialize()
Initialize the system.
Definition: mbs_lmgc.c:634
BUFFER_QQ
@ BUFFER_QQ
Definition: mbs_buffer.h:21
command_LMGC_MBS.iMbs
int iMbs
Definition: command_LMGC_MBS.py:242
mbs_lmgc_update_nodes_2D
void mbs_lmgc_update_nodes_2D(int i_mbs, double *coorTT, int storage)
Update the kinematics of 2D nodes belonging to the specified mbs.
Definition: mbs_lmgc.c:1029
globalSystem
MbsLmgcSystem * globalSystem
Global pointer to the Robotran-LMGC90 system.
Definition: mbs_lmgc.c:20
mbs_lmgc_nullify_rAux
void mbs_lmgc_nullify_rAux(int i_mbs)
Reset the auxiliary reaction to zero for the specified mbs.
Definition: mbs_lmgc.c:1106
mbs_lmgc_set_nb_mbs
int mbs_lmgc_set_nb_mbs(int nb)
Set the number of mbs.
Definition: mbs_lmgc.c:42
MbsLmgcSystem
Global data structure for a Robotran-LMGC90 project.
Definition: mbs_lmgc.h:134
get_char_cpy
char * get_char_cpy(const char *fmt,...)
Copy the provided formatted string into a newly allocated memory.
Definition: useful_functions.c:196
MbsData::qd
double * qd
Array with the current values of the generalized velocities.
Definition: mbs_data.h:285
printArray
void printArray(char *filepath, double time, double *a, int size)
Definition: mbs_lmgc.c:29
MbsLmgcData::vAux
double * vAux
Array of auxiliary generalized velocities (for computing W matrix)
Definition: mbs_lmgc.h:69
useful_functions.h
mbs_lmgc_get_vAux
void mbs_lmgc_get_vAux(int i_mbs, int i_node, double *vlocyNode)
Compute and set the auxiliary velocity of a node for the current time step.
Definition: mbs_lmgc.c:1429
MbsLmgcData::resqdFile
char * resqdFile
String defining the file in which to save velocity results.
Definition: mbs_lmgc.h:91
MbsLmgcNode::sensorId
int sensorId
id of the sensor in the mbs tree
Definition: mbs_lmgc.h:22
mbs_dirdyn.h
MbsLmgcData::qm
double * qm
Array of the generalized position in the contact configuration.
Definition: mbs_lmgc.h:60
MbsData::tsim
double tsim
The time value.
Definition: mbs_data.h:305
mbs_lmgc_add_reac
void mbs_lmgc_add_reac(int i_mbs, int i_node, double *reacNode)
Add the given node reaction contribution to the reaction of the global mbs.
Definition: mbs_lmgc.c:1178
MbsData::mbs_filename
char * mbs_filename
Path to mbs file including the file with the extension (.mbs)
Definition: mbs_data.h:409
mbs_delete_data
void mbs_delete_data(MbsData *s)
Free the memory used by the given MbsData structure.
Definition: mbs_loader.c:2089
MbsData::nqv
int nqv
Number of dependent articulations.
Definition: mbs_data.h:267
mbs_lmgc_set_res_file
int mbs_lmgc_set_res_file(int iMbs, char *filename)
Set the path to the result files for the specified mbs.
Definition: mbs_lmgc.c:309
MbsLmgcData::mbs_data_loaded
int mbs_data_loaded
Flag indicate if mbs_data was loaded or if a pointer to the memory was provided (-1: no data / 0: poi...
Definition: mbs_lmgc.h:51
mbs_data.h
MbsData::qc
int * qc
Array with the indices of driven (locked and driven) articulations.
Definition: mbs_data.h:272
mbs_lmgc_set_mbsdata
int mbs_lmgc_set_mbsdata(int iMbs, MbsData *mbs_data)
Set mbs_data (already loaded in memory) for the specified mbs.
Definition: mbs_lmgc.c:193
mbs_lmgc_set_libpath
int mbs_lmgc_set_libpath(int iMbs, char *libpath)
Set the folder containing the mbs libraries.
Definition: mbs_lmgc.c:269
BUFFER_UX
@ BUFFER_UX
Definition: mbs_buffer.h:21
MbsData::nqu
int nqu
Number of independent articulations.
Definition: mbs_data.h:262
mbs_lmgc_nullify_vFree
void mbs_lmgc_nullify_vFree(int i_mbs)
Reset the generalized velocity to zero for the specified mbs.
Definition: mbs_lmgc.c:1222
mbs_lmgc_get_vFree
void mbs_lmgc_get_vFree(int i_mbs, int i_node, double *vlocyNode)
Compute and set the free velocity of a node for the current time step.
Definition: mbs_lmgc.c:1415
mbs_lmgc_get_node_nb
int mbs_lmgc_get_node_nb(int iMbs)
Get the number of nodes attached to a mbs.
Definition: mbs_lmgc.c:540
mbs_lmgc_set_anim_file
int mbs_lmgc_set_anim_file(int iMbs, char *filename)
Set the path to the anim file for the specified mbs.
Definition: mbs_lmgc.c:365
MbsData::njoint
int njoint
Number of joints in the system.
Definition: mbs_data.h:259
mbs_project_interface.h
Declaration of functions that are project dependent.
mbs_buffer_write
int mbs_buffer_write(MbsBuffer *b)
Write the content of the buffer to disk.
Definition: mbs_buffer.c:389
mbs_lmgc_compute_dof
void mbs_lmgc_compute_dof(double h, double theta)
Compute the new value of the generalized velocity and position for all mbs.
Definition: mbs_lmgc.c:1445
mbs_lmgc_finalize
void mbs_lmgc_finalize()
Save final configuration, free the memory and finalize the process.
Definition: mbs_lmgc.c:800
mbs_buffer.h
MbsLmgcData::buffersize
int buffersize
The number of time step that can be recorded in the buffer.
Definition: mbs_lmgc.h:125
mbs_lmgc_set_filename
int mbs_lmgc_set_filename(int iMbs, char **filenamePtr, char *filename)
Definition: mbs_lmgc.c:143
mbs_load_with_exec
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
MbsPart::options
MbsPartOptions * options
Structure containing the options for coordinate partitioning module.
Definition: mbs_part.h:66
mbs_lmgc_nullify_vAux
void mbs_lmgc_nullify_vAux(int i_mbs)
Reset the generalized velocity to zero for the specified mbs.
Definition: mbs_lmgc.c:1234
BUFFER_QD
@ BUFFER_QD
Definition: mbs_buffer.h:21
MbsLmgcData::vFree
double * vFree
Array of the generalized free velocities (velocities without contact)
Definition: mbs_lmgc.h:63
mbs_run_part
int mbs_run_part(MbsPart *mbs_part, MbsData *mbs_data)
Main function of the coordinate partitioning module.
Definition: mbs_part.c:532
mbs_lmgc_add_rAux
void mbs_lmgc_add_rAux(int i_mbs, int i_node, double *reacNode)
Add the given node reaction to the reaction of the global mbs.
Definition: mbs_lmgc.c:1199
mbs_buffer_save
int mbs_buffer_save(MbsBuffer *b, double t, double *x)
Save the given array to the specified buffer with the specified time.
Definition: mbs_buffer.c:254
MbsLmgcNode::JRed
double * JRed[6]
reduced jacobian of the sensor.
Definition: mbs_lmgc.h:27
mbs_lmgc_get_vBeg
void mbs_lmgc_get_vBeg(int i_mbs, int i_node, double *vlocyNode)
Compute and set the velocity of a node at the beginning of the current time step.
Definition: mbs_lmgc.c:1401
mbs_lmgc_set_mbs_file
int mbs_lmgc_set_mbs_file(int iMbs, char *filename)
Set the path to the mbs file for the specified mbs.
Definition: mbs_lmgc.c:235
BUFFER_QDD
@ BUFFER_QDD
Definition: mbs_buffer.h:21
MbsLmgcData::saveperiod
int saveperiod
The number of time steps between two buffer records; default: 1 (every time step are recorded).
Definition: mbs_lmgc.h:113
mbs_lmgc_get_vAux
void mbs_lmgc_get_vAux(int i_mbs, int i_node, double *vlocyNode)
Compute and set the auxiliary velocity of a node for the current time step.
Definition: mbs_lmgc.c:1429
mbs_close_kin
void mbs_close_kin(MbsData *s, MbsAux *mbs_aux)
compute the dependent velocities that solves the constraints.
Definition: mbs_close_loops.c:146
mbs_lmgc_comp_vAux_Ireac
void mbs_lmgc_comp_vAux_Ireac(int i_mbs)
Compute the generalized velocity (vAux) from value stored in Ireac,.
Definition: mbs_lmgc.c:1296
MbsLmgcData::buffers
MbsBuffer ** buffers
buffer to store generalized coordinates, velocities, acceleration, joint forces...
Definition: mbs_lmgc.h:104
MbsLmgcData::nodes
MbsLmgcNode * nodes
Array of nodes associated to this mbs.
Definition: mbs_lmgc.h:57
MbsLmgcSystem::mbs_lmgc_s
MbsLmgcData * mbs_lmgc_s
array containing the "extended MbsData" structures of all mbs
Definition: mbs_lmgc.h:141
MbsLmgcData::lds
MbsAux * lds
Utility structure for keeping intermediate variable during computation.
Definition: mbs_lmgc.h:54
MbsSensor::J
double ** J
Jacobian matrix of the sensor: .
Definition: mbs_sensor_struct.h:28
mbs_lmgc_update_nodes_3D
void mbs_lmgc_update_nodes_3D(int i_mbs, double *coorTT, double *localFrameTT, int storage)
Update the kinematics of 3D nodes belonging to the specified mbs.
Definition: mbs_lmgc.c:971
mbs_lmgc_update_dof
void mbs_lmgc_update_dof()
Finalize time step.
Definition: mbs_lmgc.c:1517
BUFFER_Q
@ BUFFER_Q
Definition: mbs_buffer.h:21
mbs_lmgc_nullify_vFree
void mbs_lmgc_nullify_vFree(int i_mbs)
Reset the generalized velocity to zero for the specified mbs.
Definition: mbs_lmgc.c:1222
BUFFER_UXD
@ BUFFER_UXD
Definition: mbs_buffer.h:21
MbsPart
Main structure for the coordinate partitioning module.
Definition: mbs_part.h:64
MbsBuffer
Definition: mbs_buffer.h:46
mbs_delete_buffer
void mbs_delete_buffer(MbsBuffer *b)
Free memory of the specified MbsBuffer.
Definition: mbs_buffer.c:206
mbs_lmgc_increment
void mbs_lmgc_increment(double tsim)
Increment time step.
Definition: mbs_lmgc.c:860
MbsSensor::R
double ** R
Rotation matrix from the inertial frame to the sensor frame: .
Definition: mbs_sensor_struct.h:21
mbs_lmgc.h
MbsData::qu
int * qu
Array with the indices of the independent articulations (free)
Definition: mbs_data.h:271
globalSystem
MbsLmgcSystem * globalSystem
Global pointer to the Robotran-LMGC90 system.
Definition: mbs_lmgc.c:20
mbs_lmgc_get_velocity
void mbs_lmgc_get_velocity(int i_mbs, int i_node, double *vlocyNode, double *vlocyGen, double **JRed)
Compute the velocity of a node (linear and angular velocity) from a given value of the generalized ve...
Definition: mbs_lmgc.c:1366
mbs_lmgc_nullify_reac
void mbs_lmgc_nullify_reac(int i_mbs)
Reset the global reaction to zero for the specified mbs.
Definition: mbs_lmgc.c:1092
MbsData::qv
int * qv
Array with the indices of the dependent articulations .
Definition: mbs_data.h:279
mbs_lmgc_add_rAux
void mbs_lmgc_add_rAux(int i_mbs, int i_node, double *reacNode)
Add the given node reaction to the reaction of the global mbs.
Definition: mbs_lmgc.c:1199
MbsData::Qc
double * Qc
Array with the value of joint force introduced in driven joint to respect the user function.
Definition: mbs_data.h:332
mbs_lmgc_compute_free_vlocy
void mbs_lmgc_compute_free_vlocy(double h, double theta)
Compute the free velocity of all mbs.
Definition: mbs_lmgc.c:891
freeMbsAux
void freeMbsAux(MbsAux *mbs_aux, MbsData *s)
Definition: mbs_aux.c:174
mbs_lmgc_get_vBeg
void mbs_lmgc_get_vBeg(int i_mbs, int i_node, double *vlocyNode)
Compute and set the velocity of a node at the beginning of the current time step.
Definition: mbs_lmgc.c:1401
MbsData::Qq
double * Qq
Array with the values of the joint forces.
Definition: mbs_data.h:301
mbs_call_sensor
int mbs_call_sensor(MbsSensor *sens, MbsData *s, int isens)
Declaration of the symbolic function computing all fields of a sensor.
Definition: mbs_project_fct_ptr.c:116
mbs_lmgc_comp_vAux_Iaux
void mbs_lmgc_comp_vAux_Iaux(int i_mbs)
Compute the generalized velocity (vAux),.
Definition: mbs_lmgc.c:1249
MbsData::q
double * q
Array with the current values of the generalized coordinates.
Definition: mbs_data.h:284
mbs_lmgc_add_reac
void mbs_lmgc_add_reac(int i_mbs, int i_node, double *reacNode)
Add the given node reaction contribution to the reaction of the global mbs.
Definition: mbs_lmgc.c:1178
MbsLmgcSystem::nb_mbs
int nb_mbs
number of mbs
Definition: mbs_lmgc.h:137
mbs_lmgc_set_res_file
int mbs_lmgc_set_res_file(int iMbs, char *filename)
Set the path to the result files for the specified mbs.
Definition: mbs_lmgc.c:309
MbsLmgcNode
Structure defining the property of a node, i.e.
Definition: mbs_lmgc.h:19
mbs_lmgc_comp_vAux_Ireac
void mbs_lmgc_comp_vAux_Ireac(int i_mbs)
Compute the generalized velocity (vAux) from value stored in Ireac,.
Definition: mbs_lmgc.c:1296
MbsSensor::P
double P[4]
Position vector of the sensor expressed in the inertial frame: .
Definition: mbs_sensor_struct.h:20
find_project_path
int find_project_path(const char *mbsfile, char *prjpath)
Find the project directory (containing dataR, symbolicR, ...) from Mbs filepath.
Definition: mbs_path.c:74
mbs_lmgc_set_mbsdata
int mbs_lmgc_set_mbsdata(int iMbs, MbsData *mbs_data)
Set mbs_data (already loaded in memory) for the specified mbs.
Definition: mbs_lmgc.c:193
mbs_lmgc_set_libpath
int mbs_lmgc_set_libpath(int iMbs, char *libpath)
Set the folder containing the mbs libraries.
Definition: mbs_lmgc.c:269
mbs_lmgc_set_saveperiod
int mbs_lmgc_set_saveperiod(int saveperiod)
Set the saving period for all mbs in the system.
Definition: mbs_lmgc.c:391
MbsLmgcData::rAux
double * rAux
Array of auxiliary generalized reaction (for computing W matrix)
Definition: mbs_lmgc.h:75
mbs_sensor.h
mbs_lmgc_set_anim_file
int mbs_lmgc_set_anim_file(int iMbs, char *filename)
Set the path to the anim file for the specified mbs.
Definition: mbs_lmgc.c:365
nrfct.h
MbsLmgcData::impQc
double * impQc
Array of impulse on the driven coordinates.
Definition: mbs_lmgc.h:78
MbsLmgcData::next_save_step
int next_save_step
The next step for the buffer to be saved.
Definition: mbs_lmgc.h:116
MbsLmgcData::nb_nodes
int nb_nodes
Number of nodes in this system.
Definition: mbs_lmgc.h:45
init_sensor
void init_sensor(MbsSensor *psens, int njoint)
Initialize all fields of MbsSensor structure to 0.
Definition: mbs_sensor_utilities.c:25
MbsLmgcData::libPath
char * libPath
String defining the folder of the project libraries (symbolic and user)
Definition: mbs_lmgc.h:85
MbsLmgcData::mbs_data
MbsData * mbs_data
Pointer to the MbsData structure of the multibody system.
Definition: mbs_lmgc.h:48
MbsData::nqc
int nqc
Number of driven articulations, it includes qlocked and qdriven.
Definition: mbs_data.h:263
mbs_lmgc_checkMbsIndex
int mbs_lmgc_checkMbsIndex(int iMbs)
Definition: mbs_lmgc.c:121
mbs_close_geo
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
mbs_lmgc_increment
void mbs_lmgc_increment(double tsim)
Increment time step.
Definition: mbs_lmgc.c:860
mbs_loader.h
mbs_lmgc_set_node_sensor_ids
int mbs_lmgc_set_node_sensor_ids(int iMbs, int nbNodes, int *sensorIds)
Set the number of nodes for the specified mbs and set the index of sensors on which the nodes are att...
Definition: mbs_lmgc.c:467
initMbsAux
MbsAux * initMbsAux(MbsData *s)
Definition: mbs_aux.c:18
MbsLmgcNode::JRedQm
double * JRedQm[6]
reduced jacobian of the sensor, computed in step mid-configuration.
Definition: mbs_lmgc.h:31
MbsLmgcData
Structure defining one multibody system and additional stuff for coupling it to LMGC90.
Definition: mbs_lmgc.h:42
MbsLmgcData::reac
double * reac
Array of generalized reaction.
Definition: mbs_lmgc.h:72
mbs_lmgc_set_mbs_file
int mbs_lmgc_set_mbs_file(int iMbs, char *filename)
Set the path to the mbs file for the specified mbs.
Definition: mbs_lmgc.c:235
mbs_lmgc_nullify_reac
void mbs_lmgc_nullify_reac(int i_mbs)
Reset the global reaction to zero for the specified mbs.
Definition: mbs_lmgc.c:1092
MbsData
Definition: mbs_data.h:246
mbs_lmgc_free_node_list
void mbs_lmgc_free_node_list(int nbNodes, MbsLmgcNode *nodeList)
Definition: mbs_lmgc.c:433
nullifyArray
void nullifyArray(double *a, int size)
Definition: mbs_lmgc.c:22
mbs_new_part
MbsPart * mbs_new_part(MbsData *mbs_data)
Allocate a new MbsPart structure for the given MbsData structure.
Definition: mbs_part.c:868
mbs_lmgc_compute_free_vlocy
void mbs_lmgc_compute_free_vlocy(double h, double theta)
Compute the free velocity of all mbs.
Definition: mbs_lmgc.c:891
MbsLmgcData::resqFile
char * resqFile
String defining the file in which to save coordinate results.
Definition: mbs_lmgc.h:88
mbs_is_dir_or_file
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
mbs_lmgc_comp_vAux_Iaux
void mbs_lmgc_comp_vAux_Iaux(int i_mbs)
Compute the generalized velocity (vAux),.
Definition: mbs_lmgc.c:1249
mbs_delete_part
void mbs_delete_part(MbsPart *mbs_part)
Free the memory of the given MbsPart structure.
Definition: mbs_part.c:893
MbsSensor
Definition: mbs_sensor_struct.h:18
MbsLmgcData::resQqFile
char * resQqFile
String defining the file in which to save velocity results.
Definition: mbs_lmgc.h:94
mbs_lmgc_update_nodes_2D
void mbs_lmgc_update_nodes_2D(int i, double *coorTT, int storage)
Update the kinematics of 2D nodes belonging to the specified mbs.
Definition: mbs_lmgc.c:1029
dirdynared
int dirdynared(MbsAux *mbs_aux, MbsData *s)
Compute the joint accelerations of the system in the current configuration.
Definition: mbs_dirdynared.c:26
mbs_lmgc_get_vFree
void mbs_lmgc_get_vFree(int i_mbs, int i_node, double *vlocyNode)
Compute and set the free velocity of a node for the current time step.
Definition: mbs_lmgc.c:1415
mbs_lmgc_initialize
int mbs_lmgc_initialize()
Initialize the system.
Definition: mbs_lmgc.c:634
mbs_lmgc_set_saveperiod
int mbs_lmgc_set_saveperiod(int saveperiod)
Set the saving period for all mbs in the system.
Definition: mbs_lmgc.c:391
mbs_lmgc_update_dof
void mbs_lmgc_update_dof()
Finalize time step.
Definition: mbs_lmgc.c:1517
MbsLmgcData::current_step
int current_step
The current step number.
Definition: mbs_lmgc.h:119
allocate_sensor
void allocate_sensor(MbsSensor *psens, int njoint)
Allocate the Jacobian matrix of the MbsSensor according to the number of joints in the multibody syst...
Definition: mbs_sensor_utilities.c:20
mbs_path.h
mbs_lmgc_initialize_data
MbsData * mbs_lmgc_initialize_data(char *mbsFilename, char *libPath)
Definition: mbs_lmgc.c:561
cholsl
void cholsl(double **a, int n, double p[], double b[], double x[])
Definition: cholsl.c:10
mbs_lmgc_nullify_rAux
void mbs_lmgc_nullify_rAux(int i_mbs)
Reset the auxiliary reaction to zero for the specified mbs.
Definition: mbs_lmgc.c:1106
free_sensor
void free_sensor(MbsSensor *psens)
Deprecated: Free the memory inside MbsSensor structure. i.e. free the space allocated for the jacobia...
Definition: mbs_sensor_utilities.c:51
mbs_lmgc_set_nb_mbs
int mbs_lmgc_set_nb_mbs(int nb)
Set the number of mbs.
Definition: mbs_lmgc.c:42
MbsPartOptions::rowperm
int rowperm
Flag to allow lines permutations: 0 no permutation (default).
Definition: mbs_part.h:18
MbsLmgcData::vBeg
double * vBeg
Array of the generalized velocities at the beginning of the time step.
Definition: mbs_lmgc.h:66
MbsLmgcData::mbsFile
char * mbsFile
String defining the file from which to load the mbs data.
Definition: mbs_lmgc.h:82
MbsLmgcData::animFile
char * animFile
String defining the file in which to save animation result.
Definition: mbs_lmgc.h:100
MbsLmgcNode::JRedBeg
double * JRedBeg[6]
reduced jacobian of the sensor, computed in step initial configuration.
Definition: mbs_lmgc.h:29
mbs_lmgc_set_node_sensor_ids
int mbs_lmgc_set_node_sensor_ids(int iMbs, int nbNodes, int *sensorIds)
Set the number of nodes for the specified mbs and set the index of sensors on which the nodes are att...
Definition: mbs_lmgc.c:467
MbsData::qdd
double * qdd
Array with the current values of the generalized acceleration.
Definition: mbs_data.h:286
mbs_lmgc_update_nodes_3D
void mbs_lmgc_update_nodes_3D(int i, double *coorTT, double *localFrameTT, int storage)
Update the kinematics of 3D nodes belonging to the specified mbs.
Definition: mbs_lmgc.c:971
mbs_new_buffer
MbsBuffer * mbs_new_buffer(char *filename, char *anim_name, int nx, int size, int id, char *buf_format, int save_anim, int save_visu, double anim_period)
Allocate and initialize a MbsBuffer structure.
Definition: mbs_buffer.c:27
user_call_DrivenJoints
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
mbs_part.h
mbs_lmgc_add_reaction
void mbs_lmgc_add_reaction(int i_mbs, int i_node, double *reacNode, double *reacGlob)
Add the given node reaction to the reaction of the global mbs.
Definition: mbs_lmgc.c:1138
mbs_lmgc_get_node_nb
int mbs_lmgc_get_node_nb(int iMbs)
Get the number of nodes attached to a mbs.
Definition: mbs_lmgc.c:540
MbsLmgcNode::sensor
MbsSensor * sensor
sensor structure for this node
Definition: mbs_lmgc.h:24
mbs_aux.h
MbsLmgcData::savedArrays
double ** savedArrays
pointer to the array that must be saved to buffers
Definition: mbs_lmgc.h:107
MbsData::nhu
int nhu
Number of independent constraints.
Definition: mbs_data.h:268
mbs_lmgc_compute_dof
void mbs_lmgc_compute_dof(double h, double theta)
Compute the new value of the generalized velocity and position for all mbs.
Definition: mbs_lmgc.c:1445
mbs_lmgc_finalize
void mbs_lmgc_finalize()
Save final configuration, free the memory and finalize the process.
Definition: mbs_lmgc.c:800
MbsLmgcData::bufferNb
int bufferNb
Number of buffer.
Definition: mbs_lmgc.h:110