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* resqFile;
86 
88  char* resqdFile;
89 
91  char* resQqFile;
92 
94  char* resImpQcFile;
95 
97  char* animFile;
98 
99 
102 
104  double** savedArrays;
105 
107  int bufferNb;
108 
111 
117 
118 } MbsLmgcData;
119 
125 typedef struct MbsLmgcSystem{
126 
128  int nb_mbs;
129 
130 
133 
135 
136 
137 
138 
143 
144 
145 
146 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
147 /* PRE-INITIALIZATION FUNCTIONS */
148 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
149 
150 
157 void mbs_lmgc_set_nb_mbs(int nb);
158 
165 #ifdef __cplusplus
166 extern "C" {
167 #endif
168 void mbs_lmgc_set_mbsdata(int iMbs, MbsData* mbs_data);
169 #ifdef __cplusplus
170 }
171 #endif
172 
178 void mbs_lmgc_set_mbs_file(int iMbs, char* filename);
179 
189 void mbs_lmgc_set_res_file(int iMbs, char* filename);
190 
197 void mbs_lmgc_set_anim_file(int iMbs, char* filename);
198 
208 void mbs_lmgc_set_node_sensor_ids(int iMbs, int nbNodes, int* sensorIds);
209 
216 int mbs_lmgc_get_node_nb(int iMbs);
217 
218 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
219 /* BINDING FUNCTIONS */
220 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
221 
222 
226 void mbs_lmgc_initialize();
227 
232 void mbs_lmgc_finalize();
233 
234 
241 void mbs_lmgc_increment(double tsim);
242 
253 void mbs_lmgc_compute_free_vlocy(double h, double theta);
254 
274 void mbs_lmgc_update_nodes_3D(int i_mbs, double* coorTT, double* localFrameTT, int storage);
275 
294 void mbs_lmgc_update_nodes_2D(int i_mbs, double* coorTT, int storage);
295 
303 void mbs_lmgc_nullify_reac(int i_mbs);
304 
312 void mbs_lmgc_nullify_rAux(int i_mbs);
313 
314 
331 void mbs_lmgc_add_reac(int i_mbs, int i_node, double* reacNode);
332 
349 void mbs_lmgc_add_rAux(int i_mbs, int i_node, double* reacNode);
350 
351 
359 void mbs_lmgc_nullify_vFree(int i_mbs);
360 
368 void mbs_lmgc_nullify_vAux(int i_mbs);
369 
383 void mbs_lmgc_comp_vAux_Iaux(int i_mbs);
384 
398 void mbs_lmgc_comp_vAux_Ireac(int i_mbs);
399 
415 void mbs_lmgc_get_vBeg(int i_mbs, int i_node, double* vlocyNode);
416 
432 void mbs_lmgc_get_vFree(int i_mbs, int i_node, double* vlocyNode);
433 
449 void mbs_lmgc_get_vAux(int i_mbs, int i_node, double* vlocyNode);
450 
470 void mbs_lmgc_compute_dof(double h, double theta);
471 
472 
477 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:94
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:741
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:572
globalSystem
MbsLmgcSystem * globalSystem
Global pointer to the Robotran-LMGC90 system.
Definition: mbs_lmgc.c:19
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:640
mbs_lmgc_set_res_file
void mbs_lmgc_set_res_file(int iMbs, char *filename)
Set the path to the result files for the specified mbs.
Definition: mbs_lmgc.c:122
mbs_lmgc_set_nb_mbs
void mbs_lmgc_set_nb_mbs(int nb)
Set the number of mbs.
Definition: mbs_lmgc.c:41
MbsLmgcSystem
Global data structure for a Robotran-LMGC90 project.
Definition: mbs_lmgc.h:125
MbsData::qd
double * qd
Array with the current values of the generalized velocities.
Definition: mbs_data.h:188
printArray
void printArray(char *filepath, double time, double *a, int size)
Definition: mbs_lmgc.c:28
MbsLmgcData::vAux
double * vAux
Array of auxiliary generalized velocities (for computing W matrix)
Definition: mbs_lmgc.h:69
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:890
MbsLmgcData::resqdFile
char * resqdFile
String defining the file in which to save velocity results.
Definition: mbs_lmgc.h:88
MbsLmgcNode::sensorId
int sensorId
id of the sensor in the mbs tree
Definition: mbs_lmgc.h:22
mbs_lmgc_set_mbsdata
void mbs_lmgc_set_mbsdata(int iMbs, MbsData *mbs_data)
Set mbs_data (already loaded in memory) for the specified mbs.
Definition: mbs_lmgc.c:98
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:208
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:701
MbsData::mbs_filename
char * mbs_filename
Path to mbs file including the file with the extension (.mbs)
Definition: mbs_data.h:310
mbs_delete_data
void mbs_delete_data(MbsData *s)
Free the memory used by the given MbsData structure.
Definition: mbs_loader.c:985
MbsData::nqv
int nqv
Number of dependent articulations.
Definition: mbs_data.h:170
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:175
BUFFER_QQ
@ BUFFER_QQ
Definition: mbs_buffer.h:21
mbs_lmgc_initialize_data
MbsData * mbs_lmgc_initialize_data(char *mbsFilename)
Definition: mbs_lmgc.c:232
MbsData::nqu
int nqu
Number of independent articulations.
Definition: mbs_data.h:165
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:733
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:883
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:224
MbsData::njoint
int njoint
Number of joints in the system.
Definition: mbs_data.h:162
mbs_project_interface.h
mbs_buffer_write
int mbs_buffer_write(MbsBuffer *b)
Write the content of the buffer to disk.
Definition: mbs_buffer.c:347
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:899
mbs_lmgc_finalize
void mbs_lmgc_finalize()
Save final configuration, free the memory and finalize the process.
Definition: mbs_lmgc.c:373
mbs_buffer.h
MbsLmgcData::buffersize
int buffersize
The number of time step that can be recorded in the buffer.
Definition: mbs_lmgc.h:116
MbsPart::options
MbsPartOptions * options
Structure containing the options for coordinate partitioning module.
Definition: mbs_part.h:36
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:741
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:494
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:717
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:212
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:876
BUFFER_Q
@ BUFFER_Q
Definition: mbs_buffer.h:21
MbsLmgcData::saveperiod
int saveperiod
NOT IMPLEMENTED: The number of time steps between two buffer records; default: 1 (every time step are...
Definition: mbs_lmgc.h:110
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:890
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:140
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:789
MbsLmgcData::buffers
MbsBuffer ** buffers
buffer to store generalized coordinates, velocities, acceleration, joint forces...
Definition: mbs_lmgc.h:101
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:132
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:26
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:520
mbs_lmgc_update_dof
void mbs_lmgc_update_dof()
Finalize time step.
Definition: mbs_lmgc.c:966
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:733
MbsPart
Main structure for the coordinate partitioning module.
Definition: mbs_part.h:34
MbsBuffer
Definition: mbs_buffer.h:46
mbs_lmgc_initialize
void mbs_lmgc_initialize()
Initialize the system.
Definition: mbs_lmgc.c:268
mbs_delete_buffer
void mbs_delete_buffer(MbsBuffer *b)
Free memory of the specified MbsBuffer.
Definition: mbs_buffer.c:164
mbs_lmgc_increment
void mbs_lmgc_increment(double tsim)
Increment time step.
Definition: mbs_lmgc.c:424
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:174
globalSystem
MbsLmgcSystem * globalSystem
Global pointer to the Robotran-LMGC90 system.
Definition: mbs_lmgc.c:19
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:849
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:629
mbs_lmgc_set_nb_mbs
void mbs_lmgc_set_nb_mbs(int nb)
Set the number of mbs.
Definition: mbs_lmgc.c:41
MbsData::qv
int * qv
Array with the indices of the dependent articulations .
Definition: mbs_data.h:182
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:717
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
BUFFER_UXD
@ BUFFER_UXD
Definition: mbs_buffer.h:21
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:448
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:876
MbsData::Qq
double * Qq
Array with the values of the joint forces.
Definition: mbs_data.h:204
BUFFER_UX
@ BUFFER_UX
Definition: mbs_buffer.h:21
mbs_lmgc_comp_vAux_Iaux
void mbs_lmgc_comp_vAux_Iaux(int i_mbs)
Compute the generalized velocity (vAux),.
Definition: mbs_lmgc.c:752
MbsData::q
double * q
Array with the current values of the generalized coordinates.
Definition: mbs_data.h:187
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:701
MbsLmgcSystem::nb_mbs
int nb_mbs
number of mbs
Definition: mbs_lmgc.h:128
mbs_lmgc_set_node_sensor_ids
void 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:193
BUFFER_QD
@ BUFFER_QD
Definition: mbs_buffer.h:21
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:789
MbsSensor::P
double P[4]
Position vector of the sensor expressed in the inertial frame: .
Definition: mbs_sensor_struct.h:20
mbs_lmgc_set_anim_file
void mbs_lmgc_set_anim_file(int iMbs, char *filename)
Set the path to the anim file for the specified mbs.
Definition: mbs_lmgc.c:160
find_project_path
int find_project_path(const char *mbsfile, char *prjpath)
Find the project directory (containing dataR, symbolicR, ...).
Definition: mbs_path.c:36
MbsLmgcData::rAux
double * rAux
Array of auxiliary generalized reaction (for computing W matrix)
Definition: mbs_lmgc.h:75
mbs_sensor.h
nrfct.h
MbsLmgcData::impQc
double * impQc
Array of impulse on the driven coordinates.
Definition: mbs_lmgc.h:78
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:22
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:166
mbs_lmgc_checkMbsIndex
int mbs_lmgc_checkMbsIndex(int iMbs)
Definition: mbs_lmgc.c:81
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:424
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_nullify_reac
void mbs_lmgc_nullify_reac(int i_mbs)
Reset the global reaction to zero for the specified mbs.
Definition: mbs_lmgc.c:629
mbs_lmgc_set_mbs_file
void mbs_lmgc_set_mbs_file(int iMbs, char *filename)
Set the path to the mbs file for the specified mbs.
Definition: mbs_lmgc.c:112
MbsData
Definition: mbs_data.h:149
mbs_lmgc_set_filename
void mbs_lmgc_set_filename(int iMbs, char **filenamePtr, char *filename)
Definition: mbs_lmgc.c:90
mbs_lmgc_free_node_list
void mbs_lmgc_free_node_list(int nbNodes, MbsLmgcNode *nodeList)
Definition: mbs_lmgc.c:171
nullifyArray
void nullifyArray(double *a, int size)
Definition: mbs_lmgc.c:21
mbs_new_part
MbsPart * mbs_new_part(MbsData *mbs_data)
Allocate a new MbsPart structure for the given MbsData structure.
Definition: mbs_part.c:787
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:448
MbsLmgcData::resqFile
char * resqFile
String defining the file in which to save coordinate results.
Definition: mbs_lmgc.h:85
mbs_lmgc_comp_vAux_Iaux
void mbs_lmgc_comp_vAux_Iaux(int i_mbs)
Compute the generalized velocity (vAux),.
Definition: mbs_lmgc.c:752
mbs_delete_part
void mbs_delete_part(MbsPart *mbs_part)
Free the memory of the given MbsPart structure.
Definition: mbs_part.c:812
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:91
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:572
mbs_lmgc_set_node_sensor_ids
void 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:193
dirdynared
int dirdynared(MbsAux *mbs_aux, MbsData *s)
Definition: mbs_dirdynared.c:25
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:883
mbs_sensor
void mbs_sensor(MbsSensor *sens, MbsData *s, int isens)
Compute all fields of a sensor (force sensor or classic sensor).
Definition: mbs_project_fct_ptr.c:56
mbs_lmgc_update_dof
void mbs_lmgc_update_dof()
Finalize time step.
Definition: mbs_lmgc.c:966
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:17
mbs_path.h
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:640
mbs_lmgc_set_res_file
void mbs_lmgc_set_res_file(int iMbs, char *filename)
Set the path to the result files for the specified mbs.
Definition: mbs_lmgc.c:122
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:44
BUFFER_QDD
@ BUFFER_QDD
Definition: mbs_buffer.h:21
MbsPartOptions::rowperm
int rowperm
1 to allow line permutation; 0 otherwise, defaut = 0
Definition: mbs_part.h:15
mbs_lmgc_initialize
void mbs_lmgc_initialize()
Initialize the system.
Definition: mbs_lmgc.c:268
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:97
mbs_lmgc_set_mbsdata
void mbs_lmgc_set_mbsdata(int iMbs, MbsData *mbs_data)
Set mbs_data (already loaded in memory) for the specified mbs.
Definition: mbs_lmgc.c:98
MbsLmgcNode::JRedBeg
double * JRedBeg[6]
reduced jacobian of the sensor, computed in step initial configuration.
Definition: mbs_lmgc.h:29
SUFFIX_STR_LENGTH
#define SUFFIX_STR_LENGTH
Definition: mbs_lmgc.c:17
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
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:520
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
mbs_lmgc_set_mbs_file
void mbs_lmgc_set_mbs_file(int iMbs, char *filename)
Set the path to the mbs file for the specified mbs.
Definition: mbs_lmgc.c:112
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:669
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:224
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:104
mbs_lmgc_set_anim_file
void mbs_lmgc_set_anim_file(int iMbs, char *filename)
Set the path to the anim file for the specified mbs.
Definition: mbs_lmgc.c:160
MbsData::nhu
int nhu
Number of independent constraints.
Definition: mbs_data.h:171
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:899
mbs_lmgc_finalize
void mbs_lmgc_finalize()
Save final configuration, free the memory and finalize the process.
Definition: mbs_lmgc.c:373
user_DrivenJoints
void user_DrivenJoints(MbsData *mbs_data, double tsim)
Compute the positions, velocities and acceleration of driven joint.
Definition: user_DrivenJoints.c:15
MbsLmgcData::bufferNb
int bufferNb
Number of buffer.
Definition: mbs_lmgc.h:107