|
Robotran C Documentation
|
Go to the documentation of this file.
15 #ifndef MBS_DIRDYN_STRUCT_h
16 #define MBS_DIRDYN_STRUCT_h
22 #define DOPRI5_NB_ALLOC_VEC 8
27 #define DIRDYN_INTEGRATOR_OPTION_DEFAULT_nmax (int) 1e9
28 #define DIRDYN_INTEGRATOR_OPTION_DEFAULT_toler 1.0e-3
29 #define DIRDYN_INTEGRATOR_OPTION_DEFAULT_rtoler 1.0e-3
30 #define DIRDYN_INTEGRATOR_OPTION_DEFAULT_atoler 1.0e-6
31 #define DIRDYN_INTEGRATOR_OPTION_DEFAULT_dt_max 1.0e-3
32 #define DIRDYN_INTEGRATOR_WAYPOINT_TIME_ERROR_max 1.0e-10
char ** label_joints_name
list of labels of joints to be used in results files. if NULL, classic prefix q, qd,...
Definition: mbs_dirdyn_struct.h:109
int flag_precise_dynamics
= 1 to call the direct dynamics at the beginning of each time step of integration.
Definition: mbs_dirdyn_struct.h:162
int savePeriodCounter
counter for checking whether results must be saved
Definition: mbs_dirdyn_struct.h:255
char * buffer_format
if NULL, "%e" is used. Can be for instance XXX->options->buffer_format = "%4.7f";....
Definition: mbs_dirdyn_struct.h:101
char ** label_ux_name
list of labels of ux to be used in results files. if NULL, classic prefix ux, ... is used....
Definition: mbs_dirdyn_struct.h:110
int accelred
1 to use accelred, 0 otherwise, default = 0
Definition: mbs_dirdyn_struct.h:134
double * y
Pointer to the state vector, this is a dvec_0 of size nState.
Definition: mbs_dirdyn_struct.h:219
double baumgarte_beta
beta parameter of baumgarte stabilization (>0), default = 0.1 (1/s)
Definition: mbs_dirdyn_struct.h:168
buffer used to store the user variables to output
Definition: mbs_buffer.h:98
int nState
size of the state vector
Definition: mbs_dirdyn_struct.h:218
void(* finish_integrator_ptr)(MbsData *mbs_data, MbsDirdyn *mbs_dd)
end of the integration, free the memory
Definition: mbs_dirdyn_struct.h:205
int save_realtime_update(MbsDirdyn *dd, MbsData *mbs_data)
update the real-time and saving modules if requested
Definition: mbs_dirdyn.c:1451
double dt_max
maximal time step [s], default = 1.0e-3
Definition: mbs_dirdyn_struct.h:180
double * yd
Pointers to the derivative vector (dvec_0) of size nState.
Definition: mbs_dirdyn_struct.h:226
int nmax
maximal number of steps [-], default = 1e9
Definition: mbs_dirdyn_struct.h:176
int realtime_break
Start realtime simulation in pause (0) or run it directly (1), default = 1.
Definition: mbs_dirdyn_struct.h:132
int * indices_save_lambda
see indices_save_q, applied here to lambda.
Definition: mbs_dirdyn_struct.h:122
double * yout
Allocation of a vector (dvec_0) of size nState.
Definition: mbs_dirdyn_struct.h:221
int * compute_Qc
If options-flag_compute_Qc is set to 0, the vector allows to compute only the needed Qc.
Definition: mbs_dirdyn_struct.h:146
int * indices_save_linkZ
see indices_save_q, applied here to linkZ. size is Nlink.
Definition: mbs_dirdyn_struct.h:123
int * indices_save_Qc
see indices_save_q, applied here to Qc.
Definition: mbs_dirdyn_struct.h:119
int bufferNb
Number of buffer required to save the current system topology (ie. coordinates, links....
Definition: mbs_dirdyn_struct.h:237
int * indices_save_ux
see indices_save_q, applied here to ux.
Definition: mbs_dirdyn_struct.h:120
int save2file
Determine whether results are written to files on disk (in resultsR folder): 1: results are saved 0: ...
Definition: mbs_dirdyn_struct.h:51
void * integrator_struct
pointer to store integrator structure
Definition: mbs_dirdyn_struct.h:262
int saveperiod
The number of time steps between two buffer records default: 1 (every time step are recorded)
Definition: mbs_dirdyn_struct.h:89
finish_integrator_ptr finish_integrator
pointer to integrator closing function
Definition: mbs_dirdyn_struct.h:268
double dt0
initial value of the integration step size, default = 0.001
Definition: mbs_dirdyn_struct.h:45
char * resfilename
Basename of the results files, suffixes and extension added automatically.
Definition: mbs_dirdyn_struct.h:62
double tsim
current simulation time
Definition: mbs_dirdyn_struct.h:215
MbsGrowingBuffer * user_buffer
growing buffer to store user values
Definition: mbs_dirdyn_struct.h:235
Definition: mbs_buffer.h:46
char * respath
Path in which results file are saved.
Definition: mbs_dirdyn_struct.h:70
int flag_compute_Qc
choose to compute (or not) the Qc for driven variables.
Definition: mbs_dirdyn_struct.h:141
char ** label_link_name
list of labels of links to be used in results files. if NULL, classic prefix link is used....
Definition: mbs_dirdyn_struct.h:111
double tf
final time of the simulation, default = 5.0
Definition: mbs_dirdyn_struct.h:43
int save_visu
1 to save the visualizazion file (as it appears in 'user_realtime_visu.c'), 0 otherwise (only valid i...
Definition: mbs_dirdyn_struct.h:82
int flag_symbolic_jacobian
1 to use symbolic computation of the jacobian. Only used with implicit integrators....
Definition: mbs_dirdyn_struct.h:185
int show_failed_closure
1 to generate animation of the failed Newton-Raphson procedure, default = 0.
Definition: mbs_dirdyn_struct.h:188
int * indices_save_link3D
see indices_save_q, applied here to link3D. size is Nlink3D.
Definition: mbs_dirdyn_struct.h:126
int buffersize
The number of time step that can be recorded in the buffer.
Definition: mbs_dirdyn_struct.h:100
int compute_all_uxd
choose to compute (or not) the user derivative during dirdyn time integration. For dirdyn only....
Definition: mbs_dirdyn_struct.h:144
double baumgarte_alpha
alpha parameter of baumgarte stabilization (>0), default = 0.1 (1/s)
Definition: mbs_dirdyn_struct.h:167
int ** indices_to_print_array
pointer to the array that indicates which indices to save inside each buffer of savedArrays and buffe...
Definition: mbs_dirdyn_struct.h:252
int * indices_save_linkF
see indices_save_q, applied here to linkF. size is Nlink.
Definition: mbs_dirdyn_struct.h:125
int n_freeze
number of time step when the jacobian is freezed (computed once at the start of the n_freeze time ste...
Definition: mbs_dirdyn_struct.h:184
int * indices_save_uxd
see indices_save_q, applied here to uxd.
Definition: mbs_dirdyn_struct.h:121
int framerate
number of frame per second for the .anim file, default = 1000
Definition: mbs_dirdyn_struct.h:84
int mbs_fct_dirdyn(double t, double y[], double dydt[], MbsData *s, MbsDirdyn *dd)
direct dynamics derivative computation
Definition: mbs_dirdyn.c:1368
double toler
mixed error tolerances [-], default = 1.0e-3
Definition: mbs_dirdyn_struct.h:177
int flag_oneshot
1 to compute the derivative function only once (no time integration !), default = 0 The time is the v...
Definition: mbs_dirdyn_struct.h:136
int * indices_save_qdd
see indices_save_q, applied here to accelerations qdd.
Definition: mbs_dirdyn_struct.h:117
MbsBuffer ** buffer_visu
buffer used to save the visualization as it appears in 'user_realtime_visu.c'
Definition: mbs_dirdyn_struct.h:232
int save_anim
1 to save the anim file, 0 otherwise (only valid if 'save2file' is set to 1), default = 1
Definition: mbs_dirdyn_struct.h:80
int * indices_save_qd
see indices_save_q, applied here to velocities qd.
Definition: mbs_dirdyn_struct.h:116
int max_save_user
The maximal number of user variables saved default: 12.
Definition: mbs_dirdyn_struct.h:94
Definition: mbs_data.h:247
double rtoler
relative error tolerances [-], default = 1.0e-3
Definition: mbs_dirdyn_struct.h:178
MbsAux * mbs_aux
Definition: mbs_dirdyn_struct.h:213
int saving_mode
The mode of saving the results.
Definition: mbs_dirdyn_struct.h:108
int flag_baumgarte_stabilization
1 if user wants baumgarte stabilization of the independant accelerations
Definition: mbs_dirdyn_struct.h:166
Structure defining the option of a direct dynamic.
Definition: mbs_dirdyn_struct.h:38
double t0
initial time of the simulation, default = 0.0
Definition: mbs_dirdyn_struct.h:41
initialize_integrator_ptr initialize_integrator
pointer to integrator initialize function
Definition: mbs_dirdyn_struct.h:264
int integrator
Set integrator to use, available value: RK4, Dopri5, Rosenbrock, EulerEx, Eulaire,...
Definition: mbs_dirdyn_struct.h:153
int * indices_save_Qq
see indices_save_q, applied here to Qq.
Definition: mbs_dirdyn_struct.h:118
int verbose
Verbosity level propagated to other compatible module:
Definition: mbs_dirdyn_struct.h:155
double delta_t_wp
time interval between two waypoints [s], default = 1.0e-3
Definition: mbs_dirdyn_struct.h:173
int realtime
Deactivate (0) the realtime simulation, or activate it (!0), default = 0.
Definition: mbs_dirdyn_struct.h:129
void(* initialize_integrator_ptr)(MbsData *mbs_data, MbsDirdyn *mbs_dd, int(*derivs)(double, double[], double[], MbsData *, MbsDirdyn *), void(*loop_fct)(MbsData *, MbsDirdyn *), int(*save_realtime_update)(MbsDirdyn *dd, MbsData *mbs_data))
These three pointers of functions should be defined for each integrator separately,...
Definition: mbs_dirdyn_struct.h:197
int flag_solout_wp
1 to call solout only at required waypoints (only if flag_waypoint activated), default = 0
Definition: mbs_dirdyn_struct.h:172
MbsBuffer ** buffers
buffer to store generalized coordinates, velocities, acceleration, joint forces...
Definition: mbs_dirdyn_struct.h:229
double atoler
absolute error tolerances [-], default = 1.0e-6
Definition: mbs_dirdyn_struct.h:179
General structure of the direct dynamic module.
Definition: mbs_dirdyn_struct.h:210
int flag_waypoint
1 to use waypoints, 0 otherwise, default =0
Definition: mbs_dirdyn_struct.h:171
double dt
current integration step size
Definition: mbs_dirdyn_struct.h:216
int(* loop_integrator_ptr)(double t0, double tf, MbsData *mbs_data, MbsDirdyn *mbs_dd)
main loop of integration, in which the integrator is called
Definition: mbs_dirdyn_struct.h:203
int * indices_save_q
if NULL (default), save every q (joint position).
Definition: mbs_dirdyn_struct.h:114
loop_integrator_ptr loop_integrator
pointer to integrator looping function
Definition: mbs_dirdyn_struct.h:266
MbsDirdynOptions * options
structure defining the option of a direct dynamic
Definition: mbs_dirdyn_struct.h:212
int flag_stop_stiff
1 to stop integration if it become stiff, 0 (default value) otherwise, default = 0
Definition: mbs_dirdyn_struct.h:161
char * animpath
Path in which animation file is saved.
Definition: mbs_dirdyn_struct.h:78
int * indices_save_linkZd
see indices_save_q, applied here to linkZd. size is Nlink.
Definition: mbs_dirdyn_struct.h:124
int flag_ongoing_jac_computation
flag is ON (=1) when the implicit integrator is currently computing the jacobian, default is 0.
Definition: mbs_dirdyn_struct.h:258
double ** savedArrays
pointer to the array that must be saved to buffers
Definition: mbs_dirdyn_struct.h:239
char ** label_link3d_name
list of labels of link3d to be used in results files. if NULL, classic prefix link3d is used....
Definition: mbs_dirdyn_struct.h:112