Robotran C Documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Attributes | List of all members
MbsDirdynOptions Struct Reference

Structure defining the option of a direct dynamic. More...

#include <mbs_dirdyn_struct.h>

Public Attributes

double t0
 initial time of the simulation, default = 0.0 More...
 
double tf
 final time of the simulation, default = 5.0 More...
 
double dt0
 initial value of the integration step size, default = 0.001 More...
 
int save2file
 Determine whether results are written to files on disk (in resultsR folder): 1: results are saved 0: results are not saved default = 1. More...
 
char * resfilename
 

Basename of the results files, suffixes and extension added automatically.

More...
 
char * respath
 

Path in which results file are saved.

More...
 
char * animpath
 

Path in which animation file is saved.

More...
 
int save_anim
 1 to save the anim file, 0 otherwise (only valid if 'save2file' is set to 1), default = 1 More...
 
int save_visu
 1 to save the visualizazion file (as it appears in 'user_realtime_visu.c'), 0 otherwise (only valid if 'save2file' is set to 1), default = 0 More...
 
int framerate
 number of frame per second for the .anim file, default = 1000 More...
 
int saveperiod
 The number of time steps between two buffer records default: 1 (every time step are recorded) More...
 
int max_save_user
 The maximal number of user variables saved default: 12. More...
 
int buffersize
 The number of time step that can be recorded in the buffer. More...
 
char * buffer_format
 if NULL, "%e" is used. Can be for instance XXX->options->buffer_format = "%4.7f";. Only for advanced users More...
 
int saving_mode
 The mode of saving the results. More...
 
char ** label_joints_name
 list of labels of joints to be used in results files. if NULL, classic prefix q, qd, ... is used. default is NULL. only used if saving_mode is 2. More...
 
char ** label_ux_name
 list of labels of ux to be used in results files. if NULL, classic prefix ux, ... is used. default is NULL. only used if saving_mode is 2. More...
 
char ** label_link_name
 list of labels of links to be used in results files. if NULL, classic prefix link is used. default is NULL. only used if saving_mode is 2. More...
 
char ** label_link3d_name
 list of labels of link3d to be used in results files. if NULL, classic prefix link3d is used. default is NULL. only used if saving_mode is 2. More...
 
int * indices_save_q
 if NULL (default), save every q (joint position). More...
 
int * indices_save_qd
 see indices_save_q, applied here to velocities qd. More...
 
int * indices_save_qdd
 see indices_save_q, applied here to accelerations qdd. More...
 
int * indices_save_Qq
 see indices_save_q, applied here to Qq. More...
 
int * indices_save_Qc
 see indices_save_q, applied here to Qc. More...
 
int * indices_save_ux
 see indices_save_q, applied here to ux. More...
 
int * indices_save_uxd
 see indices_save_q, applied here to uxd. More...
 
int * indices_save_lambda
 see indices_save_q, applied here to lambda. More...
 
int * indices_save_linkZ
 see indices_save_q, applied here to linkZ. size is Nlink. More...
 
int * indices_save_linkZd
 see indices_save_q, applied here to linkZd. size is Nlink. More...
 
int * indices_save_linkF
 see indices_save_q, applied here to linkF. size is Nlink. More...
 
int * indices_save_link3D
 see indices_save_q, applied here to link3D. size is Nlink3D. More...
 
int realtime
 

Deactivate (0) the realtime simulation, or activate it (!0), default = 0.

More...
 
int realtime_break
 

Start realtime simulation in pause (0) or run it directly (1), default = 1.

More...
 
int accelred
 1 to use accelred, 0 otherwise, default = 0 More...
 
int flag_oneshot
 1 to compute the derivative function only once (no time integration !), default = 0 The time is the value found in the option t0 The default resfilename is changed to 'oneshot'. More...
 
int flag_compute_Qc
 choose to compute (or not) the Qc for driven variables. More...
 
int compute_all_uxd
 choose to compute (or not) the user derivative during dirdyn time integration. For dirdyn only. default = 1 More...
 
int * compute_Qc
 If options-flag_compute_Qc is set to 0, the vector allows to compute only the needed Qc. More...
 
int integrator
 Set integrator to use, available value: RK4, Dopri5, Rosenbrock, EulerEx, Eulaire, EulerIm, Bader, WMethods, Custom; default=RK4. See integrator.h for more details. More...
 
int verbose
 Verbosity level propagated to other compatible module: More...
 
int flag_stop_stiff
 1 to stop integration if it become stiff, 0 (default value) otherwise, default = 0 More...
 
int flag_precise_dynamics
 = 1 to call the direct dynamics at the beginning of each time step of integration. More...
 
int flag_baumgarte_stabilization
 1 if user wants baumgarte stabilization of the independant accelerations More...
 
double baumgarte_alpha
 alpha parameter of baumgarte stabilization (>0), default = 0.1 (1/s) More...
 
double baumgarte_beta
 beta parameter of baumgarte stabilization (>0), default = 0.1 (1/s) More...
 
int flag_waypoint
 1 to use waypoints, 0 otherwise, default =0 More...
 
int flag_solout_wp
 1 to call solout only at required waypoints (only if flag_waypoint activated), default = 0 More...
 
double delta_t_wp
 time interval between two waypoints [s], default = 1.0e-3 More...
 
int nmax
 maximal number of steps [-], default = 1e9 More...
 
double toler
 mixed error tolerances [-], default = 1.0e-3 More...
 
double rtoler
 relative error tolerances [-], default = 1.0e-3 More...
 
double atoler
 absolute error tolerances [-], default = 1.0e-6 More...
 
double dt_max
 maximal time step [s], default = 1.0e-3 More...
 
int n_freeze
 number of time step when the jacobian is freezed (computed once at the start of the n_freeze time steps), default = 0; More...
 
int flag_symbolic_jacobian
 1 to use symbolic computation of the jacobian. Only used with implicit integrators. Default is 0. More...
 
int show_failed_closure
 1 to generate animation of the failed Newton-Raphson procedure, default = 0. More...
 

Detailed Description

Structure defining the option of a direct dynamic.

Member Data Documentation

◆ accelred

int accelred

1 to use accelred, 0 otherwise, default = 0

◆ animpath

char* animpath

Path in which animation file is saved.

The provided memory must be static or freed by the provider. The adress in this variable cannot be used to free dyamically allocated memory as It will be redirected by the module.`

Default: the animationR folder of the project

◆ atoler

double atoler

absolute error tolerances [-], default = 1.0e-6

◆ baumgarte_alpha

double baumgarte_alpha

alpha parameter of baumgarte stabilization (>0), default = 0.1 (1/s)

◆ baumgarte_beta

double baumgarte_beta

beta parameter of baumgarte stabilization (>0), default = 0.1 (1/s)

◆ buffer_format

char* buffer_format

if NULL, "%e" is used. Can be for instance XXX->options->buffer_format = "%4.7f";. Only for advanced users

◆ buffersize

int buffersize

The number of time step that can be recorded in the buffer.

Results are written to disk when the buffer is full. default: -1, compute the buffer size for saving results only once at the end according to dt0, t0 and tf.

◆ compute_all_uxd

int compute_all_uxd

choose to compute (or not) the user derivative during dirdyn time integration. For dirdyn only. default = 1

◆ compute_Qc

int* compute_Qc

If options-flag_compute_Qc is set to 0, the vector allows to compute only the needed Qc.

For dirdyn only. Empty vector by default. If compute_Qc = [njoint 1 0 0 1 0], we will compute Qc(1) and Qc(4) only. length by default to njoint+1, compute_Qc[0] = njoint

◆ delta_t_wp

double delta_t_wp

time interval between two waypoints [s], default = 1.0e-3

◆ dt0

double dt0

initial value of the integration step size, default = 0.001

◆ dt_max

double dt_max

maximal time step [s], default = 1.0e-3

◆ flag_baumgarte_stabilization

int flag_baumgarte_stabilization

1 if user wants baumgarte stabilization of the independant accelerations

◆ flag_compute_Qc

int flag_compute_Qc

choose to compute (or not) the Qc for driven variables.

For dirdyn only. ==1 by default this allows to go faster

◆ flag_oneshot

int flag_oneshot

1 to compute the derivative function only once (no time integration !), default = 0 The time is the value found in the option t0 The default resfilename is changed to 'oneshot'.

It calls the user functions once

◆ flag_precise_dynamics

int flag_precise_dynamics

= 1 to call the direct dynamics at the beginning of each time step of integration.

default = 1 Not calling it (flag = 0) will be faster to compute but will create small errors in the results

◆ flag_solout_wp

int flag_solout_wp

1 to call solout only at required waypoints (only if flag_waypoint activated), default = 0

◆ flag_stop_stiff

int flag_stop_stiff

1 to stop integration if it become stiff, 0 (default value) otherwise, default = 0

◆ flag_symbolic_jacobian

int flag_symbolic_jacobian

1 to use symbolic computation of the jacobian. Only used with implicit integrators. Default is 0.

◆ flag_waypoint

int flag_waypoint

1 to use waypoints, 0 otherwise, default =0

◆ framerate

int framerate

number of frame per second for the .anim file, default = 1000

◆ indices_save_lambda

int* indices_save_lambda

see indices_save_q, applied here to lambda.

◆ indices_save_link3D

int* indices_save_link3D

see indices_save_q, applied here to link3D. size is Nlink3D.

◆ indices_save_linkF

int* indices_save_linkF

see indices_save_q, applied here to linkF. size is Nlink.

◆ indices_save_linkZ

int* indices_save_linkZ

see indices_save_q, applied here to linkZ. size is Nlink.

◆ indices_save_linkZd

int* indices_save_linkZd

see indices_save_q, applied here to linkZd. size is Nlink.

◆ indices_save_q

int* indices_save_q

if NULL (default), save every q (joint position).

User may ask for specific printing (less memory on disk). only used if saving_mode is 2. [Nbr_of_indices_to_save id_1 id_2 ... ] (size is 1x number of indices to save). if save_q_indices[0] = 0, file is created but nothing is printed inside.

◆ indices_save_Qc

int* indices_save_Qc

see indices_save_q, applied here to Qc.

◆ indices_save_qd

int* indices_save_qd

see indices_save_q, applied here to velocities qd.

◆ indices_save_qdd

int* indices_save_qdd

see indices_save_q, applied here to accelerations qdd.

◆ indices_save_Qq

int* indices_save_Qq

see indices_save_q, applied here to Qq.

◆ indices_save_ux

int* indices_save_ux

see indices_save_q, applied here to ux.

◆ indices_save_uxd

int* indices_save_uxd

see indices_save_q, applied here to uxd.

◆ integrator

int integrator

Set integrator to use, available value: RK4, Dopri5, Rosenbrock, EulerEx, Eulaire, EulerIm, Bader, WMethods, Custom; default=RK4. See integrator.h for more details.

◆ label_joints_name

char** label_joints_name

list of labels of joints to be used in results files. if NULL, classic prefix q, qd, ... is used. default is NULL. only used if saving_mode is 2.

◆ label_link3d_name

char** label_link3d_name

list of labels of link3d to be used in results files. if NULL, classic prefix link3d is used. default is NULL. only used if saving_mode is 2.

◆ label_link_name

char** label_link_name

list of labels of links to be used in results files. if NULL, classic prefix link is used. default is NULL. only used if saving_mode is 2.

◆ label_ux_name

char** label_ux_name

list of labels of ux to be used in results files. if NULL, classic prefix ux, ... is used. default is NULL. only used if saving_mode is 2.

◆ max_save_user

int max_save_user

The maximal number of user variables saved default: 12.

◆ n_freeze

int n_freeze

number of time step when the jacobian is freezed (computed once at the start of the n_freeze time steps), default = 0;

◆ nmax

int nmax

maximal number of steps [-], default = 1e9

◆ realtime

int realtime

Deactivate (0) the realtime simulation, or activate it (!0), default = 0.

◆ realtime_break

int realtime_break

Start realtime simulation in pause (0) or run it directly (1), default = 1.

This value could also be set in the user_realtime_options() function.

◆ resfilename

char* resfilename

Basename of the results files, suffixes and extension added automatically.

The provided memory must be static or freed by the provider. The adress in this variable cannot be used to free dyamically allocated memory as It will be redirected by the module.

The filename can contains relative path from MbsDirdynOptions::respath.

Default: 'dirdyn', or 'oneshot' in case the flag_oneshot is activated

◆ respath

char* respath

Path in which results file are saved.

The provided memory must be static or freed by the provider. The adress in this variable cannot be used to free dyamically allocated memory as It will be redirected by the module.

Default: the resultsR folder of the project

◆ rtoler

double rtoler

relative error tolerances [-], default = 1.0e-3

◆ save2file

int save2file

Determine whether results are written to files on disk (in resultsR folder): 1: results are saved 0: results are not saved default = 1.

◆ save_anim

int save_anim

1 to save the anim file, 0 otherwise (only valid if 'save2file' is set to 1), default = 1

◆ save_visu

int save_visu

1 to save the visualizazion file (as it appears in 'user_realtime_visu.c'), 0 otherwise (only valid if 'save2file' is set to 1), default = 0

◆ saveperiod

int saveperiod

The number of time steps between two buffer records default: 1 (every time step are recorded)

◆ saving_mode

int saving_mode

The mode of saving the results.

can be 1 (=old version), 2 (=new version) With 1, the res files are writen with blank space between values. No header line. With 2, the res files are writen with a header line, and values are separated by semi-columns default: 1

◆ show_failed_closure

int show_failed_closure

1 to generate animation of the failed Newton-Raphson procedure, default = 0.

◆ t0

double t0

initial time of the simulation, default = 0.0

◆ tf

double tf

final time of the simulation, default = 5.0

◆ toler

double toler

mixed error tolerances [-], default = 1.0e-3

◆ verbose

int verbose

Verbosity level propagated to other compatible module:

  • MBS_VERBOSE_ERROR: Only print error related messages;
  • MBS_VERBOSE_WARNING: Print error and warning related messages;
  • MBS_VERBOSE_ALL: Print all normal release messages (default);
  • MBS_VERBOSE_DEBUG: Maximal verbosity level;

The documentation for this struct was generated from the following file: