Robotran C Documentation
Public Attributes | List of all members
MbsData Struct Reference

#include <mbs_data.h>

Public Attributes

int npt
 Number of anchor points. More...
 
double ** dpt
 Array containing the coordinate of all anchor points (3+1 lines, npt+1 columns). More...
 
double ** l
 Array containing the center of mass coordinates (in the body fixed frame, one column per body including fictious, 3+1 lines). More...
 
double * m
 Array containing the mass of each body. More...
 
double ** In
 Array containing the inertia tensor component of each body (in the body fixed frame, relative to the center of mass). More...
 
double g [3+1]
 The 3 gravity components. More...
 
int nbody
 Number of bodies in the system. More...
 
int njoint
 Number of joints in the system. More...
 
int nqu
 Number of independent articulations. More...
 
int nqc
 Number of driven articulations, it includes qlocked and qdriven. More...
 
int nqlocked
 Number of locked articulations. More...
 
int nqdriven
 Number of driven articulations. More...
 
int nqa
 Number of actuated articulations. More...
 
int nqv
 Number of dependent articulations. More...
 
int nhu
 Number of independent constraints. More...
 
int nqrot
 Number of rotational joint (R1, R2 or R3) More...
 
int * qu
 Array with the indices of the independent articulations (free) More...
 
int * qc
 Array with the indices of driven (locked and driven) articulations. More...
 
int * qlocked
 Array with the indices of locked articulations. More...
 
int * qdriven
 Array with the indices of driven articulations. More...
 
int * qa
 Array with the indices of actuated articulations (only for inverse dynamic). More...
 
int * qv
 Array with the indices of the dependent articulations $ q(qv)=q(qu) $. More...
 
int * hu
 Array with the indices of independent constraints. More...
 
int * qrot
 Array with the indices of the rotational articulations (incremental values) More...
 
double * q
 Array with the current values of the generalized coordinates. More...
 
double * qd
 Array with the current values of the generalized velocities. More...
 
double * qdd
 Array with the current values of the generalized acceleration. More...
 
double * q0
 Array with the initial values of the generalized coordinates. More...
 
double * qd0
 Array with the initial values of the generalized velocities. More...
 
double * qdd0
 Array with the initial values of the generalized acceleration. More...
 
double * q_sin
 Array with the sine values of the generalized coordinates, if rotational (if translational, contains 'INFINITY'), size = 1xnjoint. More...
 
double * q_cos
 Array with the cosine values of the generalized coordinates, if rotational (if translational, contains 'INFINITY'), size = 1xnjoint. More...
 
int flag_optim_symb_sin_cos
 allow the "optimisation" of the computation of the sine/cosine in the symbolic files. Needs specific symbolic files, i.e. Rtime flag to ON More...
 
double ** frc
 Matrix with the components of the resultant external forces (in the body fixed frame) applied to the center of mass of each body. More...
 
double ** trq
 Matrix with the components of the resultant external torques (pure torque and couple produced by forces displacement in the body fixed frame) applied to each body. More...
 
double * Qq
 Array with the values of the joint forces. More...
 
double * Qa
 Array of active joint forces (in case of simulink,invdyna,equil,linearization,...) More...
 
double tsim
 The time value. More...
 
double t0
 Initial time of the simulation [s]. For dirdyn and invdyn only. This parameter is set from dirdyn/invyn option at start of time simulation. More...
 
double tf
 Final time of the simulation [s]. For dirdyn and invdyn only. This parameter is set from dirdyn/invyn option at start of time simulation. More...
 
double dt0
 Initial value of the integration step size [s]. For dirdyn and invdyn only. This parameter is set from dirdyn/invyn option at start of time simulation. More...
 
int n_solid
 Number of solid constraint in the system. More...
 
int n_ball
 Number of ball constraint in the system. More...
 
int n_rod
 Number of rod constraint in the system. More...
 
double * lrod
 Array with the length of each rod. More...
 
int Nloopc
 Number of loop constraints. More...
 
int Ncons
 Number of algebraic constraints. More...
 
int Nuserc
 Number of user constraints. More...
 
double NRerr
 Maximal error on constraint allowed in Newton-Raphson algorithm, default 1.0e-9. More...
 
int MAX_NR_ITER
 Maximal number of iterations for NR procedure, default 100. More...
 
double * lambda
 Array with the values of the Lagrange Multipliers related to the constraints. More...
 
double ** jac_user
 Jacobian of constraints [nqv x njoint] (starting at 1), only used in symbolic accelred, with user constraints. More...
 
double * jdqd_user
 Vector of jdqd for user constraints [nqv] (starting at 1), only used in symbolic accelred, with user constraints. More...
 
double * Qc
 Array with the value of joint force introduced in driven joint to respect the user function. More...
 
int Nlink
 Number of forces acting between two points of the system (force law implemented in user_LinkForces()). More...
 
int Nlink3D
 Number of 3D links. More...
 
double * Z
 Array with the current values of the distances between of the points of a link (see: user_LinkForces()). More...
 
double * Zd
 Array with the current values of the speed (spreading) between of the points of a link (see: user_LinkForces()). More...
 
double * Fl
 Array with the current values of the forces on each link (see: user_LinkForces()). More...
 
double ** l3DWr
 
int Nsensor
 < Array of l3DWr vector for each 3D link forces. More...
 
int Nxfrc
 Number of points where an external force is applied into a body. More...
 
int * xfidpt
 Array of the points defined as force application points. More...
 
double ** SWr
 Array of Swr vector for each external forces. More...
 
int Nuser_model
 Number of declared user models in MBsysPad. More...
 
UserModeluser_model
 Structure containing all user model, this structure is specific for each project. More...
 
int n_user_IO
 
UserIOuser_IO
 
UserIoInfo__user_IO_info
 
double * ux
 Array with the values of the user variables. More...
 
double * uxd
 Array with the values of the time derivatives of the user variables. More...
 
double * ux0
 Array with the initial values of the user variables. More...
 
int Nux
 Number of user variable. More...
 
double * udd
 For axelle red: array with the values of the acceleration of independent coordinate. More...
 
int DonePart
 Flag that indicates if the coordinate partitioning module has been executed (default: 0=not done; 1=done). More...
 
int DoneEquil
 Flag that indicates if the equilibrium module has been executed (default: 0=not done; 1=done). More...
 
int DoneModal
 Flag that indicates if the modal module has been executed (default: 0=not done; 1=done). More...
 
int process
 Flag that indicate which module is currently running (1=partitioning, 2=equilibrium, 3=direct dynamic, 4=modal, 5=inverse kinematic, 6=inverse dynamic), default =1. More...
 
int flag_stop
 stop the simulation. For dirdyn, equil, invdyn and solvekin only. More...
 
int flag_jac_position
 Flag to compute the Jacobian of the constraint for position or velocity solution. More...
 
int flag_safety_checks
 Flag to activate safety checks everywhere in mbsysc core. Faster computation if this flag is put to 0. Default = 1. More...
 
double zero_division_thrs
 Value from which a warning is raised if a division by zero (or close to) occurs. Default=1.0e-9. More...
 
char * mbs_filename
 Path to mbs file including the file with the extension (.mbs) More...
 
char * build_path
 Path to the build folder. More...
 
char * project_path
 Path to the mbs project folder. More...
 
char * mbs_name
 Name of the mbs project as it is stored in the xml file. More...
 
Functions fct
 Structure to store the pointer to the project-specific functions. More...
 
MbsDpmbs_dp
 Structure to store the matrix of tangent analysis (symbolic). More...
 
void * realtime
 Pointer to Simu_realtime structure. More...
 
MbsOutputPtr user_outputs
 Structure to share outputs between different process/libraries. More...
 
char * mbsysc_path
 Installation directory of MBsysC. More...
 

Member Data Documentation

◆ __user_IO_info

UserIoInfo* __user_IO_info

◆ build_path

char* build_path

Path to the build folder.

◆ DoneEquil

int DoneEquil

Flag that indicates if the equilibrium module has been executed (default: 0=not done; 1=done).

◆ DoneModal

int DoneModal

Flag that indicates if the modal module has been executed (default: 0=not done; 1=done).

◆ DonePart

int DonePart

Flag that indicates if the coordinate partitioning module has been executed (default: 0=not done; 1=done).

◆ dpt

double** dpt

Array containing the coordinate of all anchor points (3+1 lines, npt+1 columns).

◆ dt0

double dt0

Initial value of the integration step size [s]. For dirdyn and invdyn only. This parameter is set from dirdyn/invyn option at start of time simulation.

◆ fct

Functions fct

Structure to store the pointer to the project-specific functions.

◆ Fl

double* Fl

Array with the current values of the forces on each link (see: user_LinkForces()).

◆ flag_jac_position

int flag_jac_position

Flag to compute the Jacobian of the constraint for position or velocity solution.

The Jacobian differs if a constraint has a different meaning in position and velocity. For example a contact constraint in position can be expressed along an inertial axis. But the velocity constraint will be expressed in the contact normal direction that allows the Lagrange multiplier to be the normal contact force. This flag is updated by the loop closure procedure, not by the user.

◆ flag_optim_symb_sin_cos

int flag_optim_symb_sin_cos

allow the "optimisation" of the computation of the sine/cosine in the symbolic files. Needs specific symbolic files, i.e. Rtime flag to ON

◆ flag_safety_checks

int flag_safety_checks

Flag to activate safety checks everywhere in mbsysc core. Faster computation if this flag is put to 0. Default = 1.

◆ flag_stop

int flag_stop

stop the simulation. For dirdyn, equil, invdyn and solvekin only.

◆ frc

double** frc

Matrix with the components of the resultant external forces (in the body fixed frame) applied to the center of mass of each body.

◆ g

double g[3+1]

The 3 gravity components.

◆ hu

int* hu

Array with the indices of independent constraints.

◆ In

double** In

Array containing the inertia tensor component of each body (in the body fixed frame, relative to the center of mass).

1 column containing 9 rows for each body as follow: [I11;I12;I13;I21;I22;I23;I31;I32;I33]

◆ jac_user

double** jac_user

Jacobian of constraints [nqv x njoint] (starting at 1), only used in symbolic accelred, with user constraints.

◆ jdqd_user

double* jdqd_user

Vector of jdqd for user constraints [nqv] (starting at 1), only used in symbolic accelred, with user constraints.

◆ l

double** l

Array containing the center of mass coordinates (in the body fixed frame, one column per body including fictious, 3+1 lines).

◆ l3DWr

double** l3DWr

◆ lambda

double* lambda

Array with the values of the Lagrange Multipliers related to the constraints.

The sequence of the constraints is the one defined in the system without analyzing it. The id of each kinematic loop is defined in your user_all_id.h file (if generated). The number of constraints of each kinematic loop is defined in the theory. Then comes the user-defined constraints.

◆ lrod

double* lrod

Array with the length of each rod.

◆ m

double* m

Array containing the mass of each body.

◆ MAX_NR_ITER

int MAX_NR_ITER

Maximal number of iterations for NR procedure, default 100.

◆ mbs_dp

MbsDp* mbs_dp

Structure to store the matrix of tangent analysis (symbolic).

◆ mbs_filename

char* mbs_filename

Path to mbs file including the file with the extension (.mbs)

◆ mbs_name

char* mbs_name

Name of the mbs project as it is stored in the xml file.

◆ mbsysc_path

char* mbsysc_path

Installation directory of MBsysC.

◆ n_ball

int n_ball

Number of ball constraint in the system.

◆ n_rod

int n_rod

Number of rod constraint in the system.

◆ n_solid

int n_solid

Number of solid constraint in the system.

◆ n_user_IO

int n_user_IO

◆ nbody

int nbody

Number of bodies in the system.

The 'fictitious' bodies are not taken into account.

◆ Ncons

int Ncons

Number of algebraic constraints.

◆ nhu

int nhu

Number of independent constraints.

◆ njoint

int njoint

Number of joints in the system.

◆ Nlink

int Nlink

Number of forces acting between two points of the system (force law implemented in user_LinkForces()).

◆ Nlink3D

int Nlink3D

Number of 3D links.

◆ Nloopc

int Nloopc

Number of loop constraints.

◆ npt

int npt

Number of anchor points.

◆ nqa

int nqa

Number of actuated articulations.

◆ nqc

int nqc

Number of driven articulations, it includes qlocked and qdriven.

◆ nqdriven

int nqdriven

Number of driven articulations.

◆ nqlocked

int nqlocked

Number of locked articulations.

◆ nqrot

int nqrot

Number of rotational joint (R1, R2 or R3)

◆ nqu

int nqu

Number of independent articulations.

◆ nqv

int nqv

Number of dependent articulations.

◆ NRerr

double NRerr

Maximal error on constraint allowed in Newton-Raphson algorithm, default 1.0e-9.

◆ Nsensor

int Nsensor

< Array of l3DWr vector for each 3D link forces.

The shape of the arrray is [Nlink3D, 6] with index starting at 1. The pointer is set to NULL if there is no Link3D.

A line of the array is : [6; Fx; Fy; Fz; Mx; My; Mz]:

  • Force components (expressed in the parent body frame) : Fx, Fy, Fz
  • Pure torque components (expressed in the parent body frame) : Mx, My, Mz

The forces/torque are applied on the parent body. The opposite is applied on the children body. The force is applied (for both body) on the children anchor point.

WARNING: Indexes convention is the opposite of what is usually done in MBsysC. Number of kinematic sensors.

◆ Nuser_model

int Nuser_model

Number of declared user models in MBsysPad.

◆ Nuserc

int Nuserc

Number of user constraints.

◆ Nux

int Nux

Number of user variable.

◆ Nxfrc

int Nxfrc

Number of points where an external force is applied into a body.

◆ process

int process

Flag that indicate which module is currently running (1=partitioning, 2=equilibrium, 3=direct dynamic, 4=modal, 5=inverse kinematic, 6=inverse dynamic), default =1.

◆ project_path

char* project_path

Path to the mbs project folder.

◆ q

double* q

Array with the current values of the generalized coordinates.

◆ q0

double* q0

Array with the initial values of the generalized coordinates.

◆ q_cos

double* q_cos

Array with the cosine values of the generalized coordinates, if rotational (if translational, contains 'INFINITY'), size = 1xnjoint.

◆ q_sin

double* q_sin

Array with the sine values of the generalized coordinates, if rotational (if translational, contains 'INFINITY'), size = 1xnjoint.

◆ qa

int* qa

Array with the indices of actuated articulations (only for inverse dynamic).

Those articulations are controlled by an actuator.

◆ Qa

double* Qa

Array of active joint forces (in case of simulink,invdyna,equil,linearization,...)

◆ qc

int* qc

Array with the indices of driven (locked and driven) articulations.

◆ Qc

double* Qc

Array with the value of joint force introduced in driven joint to respect the user function.

The driven forces/torques are saved in the entries given by index vector, MbsData::qc

◆ qd

double* qd

Array with the current values of the generalized velocities.

◆ qd0

double* qd0

Array with the initial values of the generalized velocities.

◆ qdd

double* qdd

Array with the current values of the generalized acceleration.

◆ qdd0

double* qdd0

Array with the initial values of the generalized acceleration.

◆ qdriven

int* qdriven

Array with the indices of driven articulations.

Those articulations are controlled by a user function $ q(qc)=f(t) $.

◆ qlocked

int* qlocked

Array with the indices of locked articulations.

Those articulations have a constant position defined by the user $ q(nqc)=cte $.

◆ Qq

double* Qq

Array with the values of the joint forces.

◆ qrot

int* qrot

Array with the indices of the rotational articulations (incremental values)

◆ qu

int* qu

Array with the indices of the independent articulations (free)

◆ qv

int* qv

Array with the indices of the dependent articulations $ q(qv)=q(qu) $.

◆ realtime

void* realtime

Pointer to Simu_realtime structure.

◆ SWr

double** SWr

Array of Swr vector for each external forces.

Swr(9,1) = [Fx; Fy; Fz; Mx; My; Mz; dxF]:

  • Force components (expressed in the inertial frame) : Fx, Fy, Fz
  • Pure torque components (expressed in the inertial frame) : Mx, My, Mz
  • Application point local coordinates vector (expressed in the body-fixed frame): dxF(1:3,1)

WARNING: Indexes convention is the opposite of what is usually done in MBsysC.

◆ t0

double t0

Initial time of the simulation [s]. For dirdyn and invdyn only. This parameter is set from dirdyn/invyn option at start of time simulation.

◆ tf

double tf

Final time of the simulation [s]. For dirdyn and invdyn only. This parameter is set from dirdyn/invyn option at start of time simulation.

◆ trq

double** trq

Matrix with the components of the resultant external torques (pure torque and couple produced by forces displacement in the body fixed frame) applied to each body.

◆ tsim

double tsim

The time value.

◆ udd

double* udd

For axelle red: array with the values of the acceleration of independent coordinate.

◆ user_IO

UserIO* user_IO

◆ user_model

UserModel* user_model

Structure containing all user model, this structure is specific for each project.

◆ user_outputs

MbsOutputPtr user_outputs

Structure to share outputs between different process/libraries.

◆ ux

double* ux

Array with the values of the user variables.

◆ ux0

double* ux0

Array with the initial values of the user variables.

◆ uxd

double* uxd

Array with the values of the time derivatives of the user variables.

◆ xfidpt

int* xfidpt

Array of the points defined as force application points.

◆ Z

double* Z

Array with the current values of the distances between of the points of a link (see: user_LinkForces()).

◆ Zd

double* Zd

Array with the current values of the speed (spreading) between of the points of a link (see: user_LinkForces()).

◆ zero_division_thrs

double zero_division_thrs

Value from which a warning is raised if a division by zero (or close to) occurs. Default=1.0e-9.


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