|
Robotran C Documentation
|
double ** tq
2D array containing the time (first column) and the corresponding coordinates value
Definition: lut.h:44
void mbs_lut_res_free(MbsLutRes *lut)
Release memory used by 2D LUT structure.
Definition: lut.c:108
char * resfilename
The keyword used for determining the name of result files.
Definition: mbs_solvekin_struct.h:94
@ BUFFER_QQ
Definition: mbs_buffer.h:21
void user_call_invdyn_init(MbsData *mbs_data, MbsInvdyn *mbs_invd)
Module redirection for user own dirdyn initialization function, see user_dirdyn_init().
Definition: mbs_project_fct_ptr.c:534
void mbs_msg(const char *msg,...)
Send a message.
Definition: mbs_message.c:87
int mbs_lut_res_interp(MbsLutRes *lut, double t, double *coord)
Interpolate the coordinates from a Results Look Up Table for a specific time value.
Definition: lut.c:364
char * get_char_cpy(const char *fmt,...)
Copy the provided formatted string into a newly allocated memory.
Definition: useful_functions.c:196
@ BUFFER_LINK_F
Definition: mbs_buffer.h:22
double * qd
Array with the current values of the generalized velocities.
Definition: mbs_data.h:285
General structure of the inverse dynamics module.
Definition: mbs_invdyn_struct.h:27
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
char * buffer_format
The format of the results in the res file.
Definition: mbs_solvekin_struct.h:137
int mbs_invdyn_write_buffers(MbsInvdyn *invd)
Write the content of buffer associated to the given MbsInvdyn to disk.
Definition: mbs_invdyn.c:898
void user_call_invdyn_loop(MbsData *mbs_data, MbsInvdyn *mbs_invd)
Module redirection for user own dirdyn loop function, see user_dirdyn_loop().
Definition: mbs_project_fct_ptr.c:540
int saveperiod
The number of time steps between two buffer records.
Definition: mbs_solvekin_struct.h:118
int buffersize
The number of time step that can be recorded in the buffer.
Definition: mbs_solvekin_struct.h:130
double tsim
The time value.
Definition: mbs_data.h:305
int nqv
Number of dependent articulations.
Definition: mbs_data.h:267
int max_save_user
The maximal number of user variables saved.
Definition: mbs_solvekin_struct.h:123
void mbs_delete_invdyn(MbsInvdyn *invdyn, MbsData *mbs_data)
Free memory of the inverse dynamic structure The options (MbsInvOptions) and MbsAux structures are al...
Definition: mbs_invdyn.c:88
int * qc
Array with the indices of driven (locked and driven) articulations.
Definition: mbs_data.h:272
int mbs_fct_invdyn(MbsData *s, MbsInvdyn *invdyn)
inverse dynamic computation of q, qd and qdd
Definition: mbs_invdyn.c:915
int nqu
Number of independent articulations.
Definition: mbs_data.h:262
void mbs_error_msg(int err, const char *msg,...)
Send an error message.
Definition: mbs_message.c:131
#define _MBS_ERR_LOW_FILES
Low Level error number Error during opening/writing files = -9.
Definition: mbs_errors_names.h:157
MbsInvdyn * mbs_new_invdyn_aux(MbsData *mbs_data, MbsAux *mbs_aux)
Fills a new inverse dynamic auxilliary structure.
Definition: mbs_invdyn.c:42
MbsBuffer ** buffers
Buffer to store generalized coordinates, velocities, acceleration.
Definition: mbs_invdyn_struct.h:45
int njoint
Number of joints in the system.
Definition: mbs_data.h:259
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:389
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
char * trajectoryqddname
Give the path and filename (with extention) to the file containing the input trajectory in accelerati...
Definition: mbs_solvekin_struct.h:73
int nt
number of time steps
Definition: lut.h:43
int mbs_fct_invdyn(MbsData *s, MbsInvdyn *invd)
inverse dynamic computation of q, qd and qdd
Definition: mbs_invdyn.c:915
@ BUFFER_LAMBDA
Definition: mbs_buffer.h:23
int mbs_invdyn_finish(MbsInvdyn *invd, MbsData *mbs_data)
Run the finalization operations of the run_invdyn function.
Definition: mbs_invdyn.c:826
MbsInvdyn * mbs_new_invdyn_aux(MbsData *mbs_data, MbsAux *mbs_aux)
Fills a new inverse dynamic auxilliary structure.
Definition: mbs_invdyn.c:42
int mbs_invdyn_loop(MbsInvdyn *invd, MbsData *mbs_data)
Time loop of the run_invdyn function:
Definition: mbs_invdyn.c:696
int mbs_invdyn_init(MbsInvdyn *invd, MbsData *mbs_data)
Run the startup operations of the run_invdyn function.
Definition: mbs_invdyn.c:190
void free_set_output()
release memory of auto_output
Definition: set_output.c:117
@ BUFFER_QD
Definition: mbs_buffer.h:21
@ BUFFER_QC
Definition: mbs_buffer.h:22
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
@ BUFFER_LINK_Z
Definition: mbs_buffer.h:22
int mbs_invdyn_finish(MbsInvdyn *invdyn, MbsData *mbs_data)
Run the finalization operations of the run_invdyn function.
Definition: mbs_invdyn.c:826
double dt
Time step, default = 0.001.
Definition: mbs_solvekin_struct.h:86
int invdynared(MbsAux *mbs_aux, MbsData *s)
Compute the required forces ont the actuated joints in a configuration.
Definition: mbs_invdynared.c:28
int mbs_growing_buffer_write(MbsGrowingBuffer *b)
write the content of the growing buffer to disk
Definition: mbs_buffer.c:599
#define _MBS_ERR_MOD_SPEC_15
Generic error number Module specific errors range from -11 to -19 please read the error message a...
Definition: mbs_errors_names.h:196
int set_output_to_mbs(MbsData *mbs_data, int verbosity)
Set the address of this buffers in MbsData to expose memory + synchronize verbosity.
Definition: set_output.c:26
@ BUFFER_QDD
Definition: mbs_buffer.h:21
#define _MBS_ERR_LOW_NAN
Low Level error number Number is NaN (not a number) = -7.
Definition: mbs_errors_names.h:147
int motion
Determines how the evolution of q, qd qdd are provided.
Definition: mbs_solvekin_struct.h:40
int framerate
Number of frame per second for the .anim file, default = 1000.
Definition: mbs_solvekin_struct.h:113
#define _MBS_ERR_INIT
Generic error number Check user options at initialization = -10.
Definition: mbs_errors_names.h:166
void user_call_invdyn_finish(MbsData *mbs_data, MbsInvdyn *mbs_invd)
Module redirection for user own dirdyn finish function, see user_dirdyn_finish().
Definition: mbs_project_fct_ptr.c:546
int mbs_check_nhu_nqv(MbsData *mbs_data)
Check the coherence between the number of (independant) constraints and the number of dependant varia...
Definition: mbs_check.c:20
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 t0
Initial time of the simulation, default = 0.0.
Definition: mbs_solvekin_struct.h:76
@ BUFFER_OTHER
Definition: mbs_buffer.h:23
int nq
number coordinates
Definition: lut.h:42
const char * animpath
Path in which anim file is saved.
Definition: mbs_solvekin_struct.h:104
@ oneshot
Definition: mbs_solvekin_struct.h:25
int Nlink
Number of forces acting between two points of the system (force law implemented in user_LinkForces())...
Definition: mbs_data.h:336
@ BUFFER_Q
Definition: mbs_buffer.h:21
char * trajectoryqname
Give the path and filename (with extention) to the file containing the input trajectory in position o...
Definition: mbs_solvekin_struct.h:51
MbsLutRes * q
Pointer to save the input trajectories.
Definition: mbs_invdyn_struct.h:69
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
MbsInvdyn * mbs_new_invdyn(MbsData *mbs_data)
Create a new inverse dynamic structure.
Definition: mbs_invdyn.c:32
Definition: mbs_buffer.h:46
int mbs_growing_buffer_save(MbsGrowingBuffer *b, double t)
Save the given values of auto_output to the specified buffer with the specified time.
Definition: mbs_buffer.c:295
void mbs_delete_buffer(MbsBuffer *b)
Free memory of the specified MbsBuffer.
Definition: mbs_buffer.c:206
MbsLutRes * qdd
Definition: mbs_invdyn_struct.h:69
void mbs_delete_growing_buffer(MbsGrowingBuffer *b)
release memory for growing buffer
Definition: mbs_buffer.c:230
double * Fl
Array with the current values of the forces on each link (see: user_LinkForces()).
Definition: mbs_data.h:340
int * qu
Array with the indices of the independent articulations (free)
Definition: mbs_data.h:271
MbsInvdyn * mbs_new_invdyn(MbsData *mbs_data)
Create a new inverse dynamic structure.
Definition: mbs_invdyn.c:32
double * Qc
Array with the value of joint force introduced in driven joint to respect the user function.
Definition: mbs_data.h:332
int mbs_run_invdyn(MbsInvdyn *invdyn, MbsData *mbs_data)
Run the inverse kinematic analysis.
Definition: mbs_invdyn.c:104
@ BUFFER_LINK_ZD
Definition: mbs_buffer.h:22
void freeMbsAux(MbsAux *mbs_aux, MbsData *s)
Definition: mbs_aux.c:174
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
MbsAux * mbs_aux
Structure to store auxiliary value needed during computation.
Definition: mbs_invdyn_struct.h:34
double * Qq
Array with the values of the joint forces.
Definition: mbs_data.h:301
double * q
Array with the current values of the generalized coordinates.
Definition: mbs_data.h:284
int verbose
Gives informations during the process.
Definition: mbs_solvekin_struct.h:147
void free_dvec_1(double *vec)
release memory for a vector of doubles, starting at index 1
Definition: mbs_1D_array.c:976
@ trajectory
Definition: mbs_solvekin_struct.h:25
char * project_path
Path to the mbs project folder.
Definition: mbs_data.h:411
int mbs_init_sin_cos_q_vecs(MbsData *s, int *qrot_qu_indvec, int *qrot_qc_indvec, int *qrot_qv_indvec)
Initialize the three vectors of indices (they are usually contained in the mbs_aux structure)
Definition: mbs_trigo.c:23
int nqdriven
Number of driven articulations.
Definition: mbs_data.h:265
char * trajectoryqdname
Give the path and filename (with extention) to the file containing the input trajectory in velocity o...
Definition: mbs_solvekin_struct.h:62
double tsim
Current simulation time.
Definition: mbs_invdyn_struct.h:38
int mbs_check_mbs_data_values(MbsAux *module_mbs_aux, MbsData *mbs_data)
Check the coherence between the mbs_data used before module initialization and module run.
Definition: mbs_check.c:88
This header defines the functions for trigonometric handling in MBsysC integrator in C.
MbsGrowingBuffer * user_buffer
Growing buffer to store user values.
Definition: mbs_invdyn_struct.h:48
int trajectorytype
Value to store the type of trajectory provided by the user, automatically set.
Definition: mbs_invdyn_struct.h:66
MbsLutRes * qd
Definition: mbs_invdyn_struct.h:69
MbsGrowingBuffer * mbs_new_growing_buffer(int max_nx, int size, const char *respath)
create a new growing buffer for the user inputs to save
Definition: mbs_buffer.c:144
double tf
Final time of the simulation, default = 5.0.
Definition: mbs_solvekin_struct.h:79
Structure defining the option of both inverse kinematics and inverse dynamic analysis.
Definition: mbs_solvekin_struct.h:31
MbsLutRes * mbs_lut_res_load_file(char *fileName)
Load a file and return a new allocated results LUT structure.
Definition: lut.c:904
Interpolation of value from array (Look Up Table) main header.
int nqc
Number of driven articulations, it includes qlocked and qdriven.
Definition: mbs_data.h:263
set_output function called by the user to output his own variables
#define _MBS_ERR_MOD_SPEC_14
Generic error number Module specific errors range from -11 to -19 please read the error message a...
Definition: mbs_errors_names.h:190
const char * respath
Path in which result file are saved.
Definition: mbs_solvekin_struct.h:99
MbsAux * initMbsAux(MbsData *s)
Definition: mbs_aux.c:18
Definition: mbs_data.h:246
#define _MBS_ERR_MOD_INV_DYN
Module error number module: Inverse Dynamics = -600.
Definition: mbs_errors_names.h:68
#define _MBS_ERR_MOD_SPEC_11
Mid Level error number Module specific errors range from -11 to -19 please read the error message...
Definition: mbs_errors_names.h:172
int * qlocked
Array with the indices of locked articulations.
Definition: mbs_data.h:273
MbsInvOptions * options
Structure defining the options of a inverse dynamics analysis.
Definition: mbs_invdyn_struct.h:31
int get_output_vector_size(int index)
get the output vector size corresponding to the requested index
Definition: set_output.c:315
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
int get_output_vector_nb()
get the number of user vector inputs
Definition: set_output.c:333
void init_set_output(int max_nb_curves)
initialize the static auto_output structure
Definition: set_output.c:84
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
int mbs_invdyn_init(MbsInvdyn *invdyn, MbsData *mbs_data)
Run the startup operations of the run_invdyn function.
Definition: mbs_invdyn.c:190
double ** savedArrays
Pointer to the array that must be saved to buffers.
Definition: mbs_invdyn_struct.h:54
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
int save2file
Determine whether results are written to files on disk (in MbsSolvekinOptions::respath folder):
Definition: mbs_solvekin_struct.h:91
#define MBS_INFO_SUCCESS
Definition: mbs_define.h:29
int * qdriven
Array with the indices of driven articulations.
Definition: mbs_data.h:275
double * lambda
Array with the values of the Lagrange Multipliers related to the constraints.
Definition: mbs_data.h:321
int find_ivec_1(int *vec, int l_v, int f)
return the index of the value f in the (x sized) vector vec of integers, starting with index 1....
Definition: mbs_1D_array.c:907
void reset_flag_output()
reset the flag_output to 0. Useful when running several simulation in a row with different save2file ...
Definition: set_output.c:76
@ BUFFER_QA
Definition: mbs_buffer.h:23
int tindex
Current time index.
Definition: mbs_invdyn_struct.h:41
int nqa
Number of actuated articulations.
Definition: mbs_data.h:266
int save_anim
Determine whether animation file is generated (only valid if MbsSolvekinOptions::save2file is set to ...
Definition: mbs_solvekin_struct.h:110
int mbs_invdyn_save(MbsInvdyn *invd, MbsData *mbs_data, double t)
Save the values of invdyn analysis in the buffers.
Definition: mbs_invdyn.c:154
int nqlocked
Number of locked articulations.
Definition: mbs_data.h:264
double * qdd
Array with the current values of the generalized acceleration.
Definition: mbs_data.h:286
char * get_output_vector_label(int index)
get the output vector label corresponding to the requested index
Definition: set_output.c:304
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
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
void mbs_delete_invdyn(MbsInvdyn *invdyn, MbsData *mbs_data)
Free memory of the inverse dynamic structure The options (MbsInvOptions) and MbsAux structures are al...
Definition: mbs_invdyn.c:88
int mbs_makedirs(char *path)
Create (recursively) the specified directory.
Definition: mbs_path.c:586
void print_ivec_0(int *vec, int l_v)
print a (l_v sized) vector of integers in console, starting with index 0
Definition: mbs_1D_array.c:569
int mbs_invdyn_write_buffers(MbsInvdyn *invdyn)
Write the content of buffer associated to the given MbsInvdyn to disk.
Definition: mbs_invdyn.c:898
int bufferNb
Number of buffers.
Definition: mbs_invdyn_struct.h:51
int mbs_invdyn_loop(MbsInvdyn *invdyn, MbsData *mbs_data)
Time loop of the run_invdyn function:
Definition: mbs_invdyn.c:696
int same_ivec_1(int *v1, int *v2)
Compare if two vector are the same.
Definition: mbs_1D_array.c:939
int mbs_run_invdyn(MbsInvdyn *invd, MbsData *mbs_data)
Run the inverse kinematic analysis.
Definition: mbs_invdyn.c:104
int nhu
Number of independent constraints.
Definition: mbs_data.h:268
#define MBS_VERBOSE_ALL
Definition: mbs_define.h:46
double * get_output_vector_ptr(int index)
get the pointer to the output vector at the requested index
Definition: set_output.c:352
@ closeloop
Definition: mbs_solvekin_struct.h:25