|
Robotran C Documentation
|
char * resImpQcFile
String defining the file in which to save impuls of joint/force associated to driven joints.
Definition: mbs_lmgc.h:97
int mbs_lmgc_initialize()
Initialize the system.
Definition: mbs_lmgc.c:732
int iMbs
Definition: command_LMGC_MBS.py:242
int 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:1499
MbsLmgcSystem * globalSystem
Global pointer to the Robotran-LMGC90 system.
Definition: mbs_lmgc.c:21
int freeMbsAux(MbsAux *mbs_aux, MbsData *s)
Free the structure and its content.
Definition: mbs_aux.c:178
int mbs_lmgc_update_dof()
Finalize time step.
Definition: mbs_lmgc.c:1984
int mbs_lmgc_set_nb_mbs(int nb)
Set the number of mbs.
Definition: mbs_lmgc.c:43
Global data structure for a Robotran-LMGC90 project.
Definition: mbs_lmgc.h:134
char * get_char_cpy(const char *fmt,...)
Copy the provided formatted string into a newly allocated memory.
Definition: useful_functions.c:235
@ BUFFER_Q
Definition: mbs_buffer.h:21
double * qd
Array with the current values of the generalized velocities.
Definition: mbs_data.h:286
void printArray(char *filepath, double time, double *a, int size)
Definition: mbs_lmgc.c:30
double * vAux
Array of auxiliary generalized velocities (for computing W matrix)
Definition: mbs_lmgc.h:69
int 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:1792
char * resqdFile
String defining the file in which to save velocity results.
Definition: mbs_lmgc.h:91
int sensorId
id of the sensor in the mbs tree
Definition: mbs_lmgc.h:22
double * qm
Array of the generalized position in the contact configuration.
Definition: mbs_lmgc.h:60
double tsim
The time value.
Definition: mbs_data.h:306
char * mbs_filename
Path to mbs file including the file with the extension (.mbs)
Definition: mbs_data.h:421
void mbs_delete_data(MbsData *s)
Free the memory used by the given MbsData structure.
Definition: mbs_loader.c:2144
int mbs_lmgc_increment(double tsim)
Increment time step.
Definition: mbs_lmgc.c:974
int nqv
Number of dependent articulations.
Definition: mbs_data.h:268
int 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:1886
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:358
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
int * qc
Array with the indices of driven (locked and driven) articulations.
Definition: mbs_data.h:273
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:209
int mbs_lmgc_set_libpath(int iMbs, char *libpath)
Set the folder containing the mbs libraries.
Definition: mbs_lmgc.c:305
int nqu
Number of independent articulations.
Definition: mbs_data.h:263
int mbs_lmgc_get_node_nb(int iMbs)
Get the number of nodes attached to a mbs.
Definition: mbs_lmgc.c:622
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:427
int njoint
Number of joints in the system.
Definition: mbs_data.h:260
int mbs_lmgc_nullify_vAux(int i_mbs)
Reset the generalized velocity to zero for the specified mbs.
Definition: mbs_lmgc.c:1563
Declaration of functions that are project dependent.
int mbs_buffer_write(MbsBuffer *b)
Write the content of the buffer to disk.
Definition: mbs_buffer.c:467
void mbs_lmgc_finalize()
Save final configuration, free the memory and finalize the process.
Definition: mbs_lmgc.c:914
int mbs_lmgc_nullify_vFree(int i_mbs)
Reset the generalized velocity to zero for the specified mbs.
Definition: mbs_lmgc.c:1536
int buffersize
The number of time step that can be recorded in the buffer.
Definition: mbs_lmgc.h:125
int mbs_lmgc_set_filename(int iMbs, char **filenamePtr, char *filename)
Definition: mbs_lmgc.c:159
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:70
MbsPartOptions * options
Structure containing the options for coordinate partitioning module.
Definition: mbs_part.h:66
double * vFree
Array of the generalized free velocities (velocities without contact)
Definition: mbs_lmgc.h:63
int mbs_run_part(MbsPart *mbs_part, MbsData *mbs_data)
Main function of the coordinate partitioning module.
Definition: mbs_part.c:580
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:332
double * JRed[6]
reduced jacobian of the sensor.
Definition: mbs_lmgc.h:27
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:258
int 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:1823
int saveperiod
The number of time steps between two buffer records; default: 1 (every time step are recorded).
Definition: mbs_lmgc.h:113
int 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:1854
int mbs_lmgc_nullify_reac(int i_mbs)
Reset the global reaction to zero for the specified mbs.
Definition: mbs_lmgc.c:1329
void mbs_close_kin(MbsData *s, MbsAux *mbs_aux)
compute the dependent velocities that solves the constraints.
Definition: mbs_close_loops.c:146
int 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:1463
int mbs_lmgc_compute_free_vlocy(double h, double theta)
Compute the free velocity of all mbs.
Definition: mbs_lmgc.c:1028
MbsBuffer ** buffers
buffer to store generalized coordinates, velocities, acceleration, joint forces...
Definition: mbs_lmgc.h:104
MbsLmgcNode * nodes
Array of nodes associated to this mbs.
Definition: mbs_lmgc.h:57
MbsLmgcData * mbs_lmgc_s
array containing the "extended MbsData" structures of all mbs
Definition: mbs_lmgc.h:141
MbsAux * lds
Utility structure for keeping intermediate variable during computation.
Definition: mbs_lmgc.h:54
double ** J
Jacobian matrix of the sensor: .
Definition: mbs_sensor_struct.h:28
int mbs_lmgc_nullify_rAux(int i_mbs)
Reset the auxiliary reaction to zero for the specified mbs.
Definition: mbs_lmgc.c:1359
Main structure for the coordinate partitioning module.
Definition: mbs_part.h:64
Definition: mbs_buffer.h:46
@ BUFFER_QDD
Definition: mbs_buffer.h:21
void mbs_delete_buffer(MbsBuffer *b)
Free memory of the specified MbsBuffer.
Definition: mbs_buffer.c:284
double ** R
Rotation matrix from the inertial frame to the sensor frame: .
Definition: mbs_sensor_struct.h:21
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, int saving_mode, int *indices_to_print, char **labels, int flag_custom_labels)
Allocate and initialize a MbsBuffer structure.
Definition: mbs_buffer.c:27
int * qu
Array with the indices of the independent articulations (free)
Definition: mbs_data.h:272
MbsLmgcSystem * globalSystem
Global pointer to the Robotran-LMGC90 system.
Definition: mbs_lmgc.c:21
int * qv
Array with the indices of the dependent articulations .
Definition: mbs_data.h:280
double * Qc
Array with the value of joint force introduced in driven joint to respect the user function.
Definition: mbs_data.h:333
int 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:1792
int 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:1146
int 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:1234
double * Qq
Array with the values of the joint forces.
Definition: mbs_data.h:302
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
double * q
Array with the current values of the generalized coordinates.
Definition: mbs_data.h:285
@ BUFFER_UX
Definition: mbs_buffer.h:21
@ BUFFER_QQ
Definition: mbs_buffer.h:21
int nb_mbs
number of mbs
Definition: mbs_lmgc.h:137
int mbs_lmgc_increment(double tsim)
Increment time step.
Definition: mbs_lmgc.c:974
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:358
@ BUFFER_QD
Definition: mbs_buffer.h:21
Structure defining the property of a node, i.e.
Definition: mbs_lmgc.h:19
int 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:1463
double P[4]
Position vector of the sensor expressed in the inertial frame: .
Definition: mbs_sensor_struct.h:20
int mbs_lmgc_comp_vAux_Iaux(int i_mbs)
Compute the generalized velocity (vAux),.
Definition: mbs_lmgc.c:1594
int find_project_path(const char *mbsfile, char *prjpath)
Find the project directory (containing dataR, symbolicR, ...) from Mbs filepath.
Definition: mbs_path.c:74
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:209
int mbs_lmgc_set_libpath(int iMbs, char *libpath)
Set the folder containing the mbs libraries.
Definition: mbs_lmgc.c:305
int mbs_lmgc_set_saveperiod(int saveperiod)
Set the saving period for all mbs in the system.
Definition: mbs_lmgc.c:466
double * rAux
Array of auxiliary generalized reaction (for computing W matrix)
Definition: mbs_lmgc.h:75
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:427
int mbs_lmgc_nullify_vAux(int i_mbs)
Reset the generalized velocity to zero for the specified mbs.
Definition: mbs_lmgc.c:1563
double * impQc
Array of impulse on the driven coordinates.
Definition: mbs_lmgc.h:78
int next_save_step
The next step for the buffer to be saved.
Definition: mbs_lmgc.h:116
int nb_nodes
Number of nodes in this system.
Definition: mbs_lmgc.h:45
void init_sensor(MbsSensor *psens, int njoint)
Initialize all fields of MbsSensor structure to 0.
Definition: mbs_sensor_utilities.c:25
char * libPath
String defining the folder of the project libraries (symbolic and user)
Definition: mbs_lmgc.h:85
int mbs_lmgc_comp_vAux_Ireac(int i_mbs)
Compute the generalized velocity (vAux) from value stored in Ireac,.
Definition: mbs_lmgc.c:1655
MbsData * mbs_data
Pointer to the MbsData structure of the multibody system.
Definition: mbs_lmgc.h:48
int nqc
Number of driven articulations, it includes qlocked and qdriven.
Definition: mbs_data.h:264
int mbs_lmgc_checkMbsIndex(int iMbs)
Check the validity of the Mbs index.
Definition: mbs_lmgc.c:129
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
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:542
MbsAux * initMbsAux(MbsData *s)
Definition: mbs_aux.c:22
double * JRedQm[6]
reduced jacobian of the sensor, computed in step mid-configuration.
Definition: mbs_lmgc.h:31
Structure defining one multibody system and additional stuff for coupling it to LMGC90.
Definition: mbs_lmgc.h:42
int 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:1741
double * reac
Array of generalized reaction.
Definition: mbs_lmgc.h:72
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:258
int 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:1823
@ BUFFER_UXD
Definition: mbs_buffer.h:21
Definition: mbs_data.h:247
void mbs_lmgc_free_node_list(int nbNodes, MbsLmgcNode *nodeList)
Definition: mbs_lmgc.c:508
void nullifyArray(double *a, int size)
Definition: mbs_lmgc.c:23
MbsPart * mbs_new_part(MbsData *mbs_data)
Allocate a new MbsPart structure for the given MbsData structure.
Definition: mbs_part.c:917
char * resqFile
String defining the file in which to save coordinate results.
Definition: mbs_lmgc.h:88
int mbs_lmgc_nullify_reac(int i_mbs)
Reset the global reaction to zero for the specified mbs.
Definition: mbs_lmgc.c:1329
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
void mbs_delete_part(MbsPart *mbs_part)
Free the memory of the given MbsPart structure.
Definition: mbs_part.c:942
Definition: mbs_sensor_struct.h:18
char * resQqFile
String defining the file in which to save velocity results.
Definition: mbs_lmgc.h:94
int dirdynared(MbsAux *mbs_aux, MbsData *s)
Compute the joint accelerations of the system in the current configuration.
Definition: mbs_dirdynared.c:26
int mbs_lmgc_initialize()
Initialize the system.
Definition: mbs_lmgc.c:732
int mbs_lmgc_comp_vAux_Iaux(int i_mbs)
Compute the generalized velocity (vAux),.
Definition: mbs_lmgc.c:1594
int 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:1499
int mbs_lmgc_set_saveperiod(int saveperiod)
Set the saving period for all mbs in the system.
Definition: mbs_lmgc.c:466
int current_step
The current step number.
Definition: mbs_lmgc.h:119
int mbs_lmgc_nullify_rAux(int i_mbs)
Reset the auxiliary reaction to zero for the specified mbs.
Definition: mbs_lmgc.c:1359
int flag_stop
stop the simulation in case of non zero value. Negative for error, positive for user_wanted behavior.
Definition: mbs_data.h:409
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
MbsData * mbs_lmgc_initialize_data(char *mbsFilename, char *libPath)
Definition: mbs_lmgc.c:650
void cholsl(double **a, int n, double p[], double b[], double x[])
Definition: cholsl.c:10
int 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:1234
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
int mbs_lmgc_update_dof()
Finalize time step.
Definition: mbs_lmgc.c:1984
int mbs_lmgc_set_nb_mbs(int nb)
Set the number of mbs.
Definition: mbs_lmgc.c:43
int rowperm
Flag to allow lines permutations: 0 no permutation (default).
Definition: mbs_part.h:18
#define MBS_INFO_SUCCESS
Definition: mbs_define.h:30
double * vBeg
Array of the generalized velocities at the beginning of the time step.
Definition: mbs_lmgc.h:66
char * mbsFile
String defining the file from which to load the mbs data.
Definition: mbs_lmgc.h:82
int mbs_lmgc_comp_vAux_Ireac(int i_mbs)
Compute the generalized velocity (vAux) from value stored in Ireac,.
Definition: mbs_lmgc.c:1655
char * animFile
String defining the file in which to save animation result.
Definition: mbs_lmgc.h:100
double * JRedBeg[6]
reduced jacobian of the sensor, computed in step initial configuration.
Definition: mbs_lmgc.h:29
int 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:1854
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:542
double * qdd
Array with the current values of the generalized acceleration.
Definition: mbs_data.h:287
int 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:1886
int user_call_DrivenJoints(MbsData *s, double tsim)
Module redirection for the computation of driven joints, see user_DrivenJoints() however the return d...
Definition: mbs_project_fct_ptr.c:258
int mbs_lmgc_compute_free_vlocy(double h, double theta)
Compute the free velocity of all mbs.
Definition: mbs_lmgc.c:1028
int 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:1407
int mbs_lmgc_get_node_nb(int iMbs)
Get the number of nodes attached to a mbs.
Definition: mbs_lmgc.c:622
MbsSensor * sensor
sensor structure for this node
Definition: mbs_lmgc.h:24
double ** savedArrays
pointer to the array that must be saved to buffers
Definition: mbs_lmgc.h:107
int nhu
Number of independent constraints.
Definition: mbs_data.h:269
int 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:1146
void mbs_lmgc_finalize()
Save final configuration, free the memory and finalize the process.
Definition: mbs_lmgc.c:914
int mbs_lmgc_nullify_vFree(int i_mbs)
Reset the generalized velocity to zero for the specified mbs.
Definition: mbs_lmgc.c:1536
int bufferNb
Number of buffer.
Definition: mbs_lmgc.h:110