Robotran C Documentation
Functions
mbs_Rred.c File Reference
#include <math.h>
#include "mbs_1D_array.h"
#include "mbs_define.h"
#include "mbs_errors_names.h"
#include "MBSfun.h"
#include "nrfct.h"
#include "mbs_project_interface.h"
#include "mbs_trigo.h"
#include "mbs_message.h"

Functions

int mbs_Rred (MbsAux *mbs_aux, MbsData *s)
 Compute the reduced equations of motions on a residual form [nqu x 1]. More...
 
int mbs_Rred_core (MbsAux *mbs_aux, MbsData *s)
 Compute the residual force on independant joints and required force in driven joints. More...
 

Function Documentation

◆ mbs_Rred()

int mbs_Rred ( MbsAux *  mbs_aux,
MbsData s 
)

Compute the reduced equations of motions on a residual form [nqu x 1].

This form is oobtained after the 2 consecutive reductions (see theory; for example µ in Robotran Basics). The reduced form of the equations is necessary for:

  • equilibrium (even with non zero acceleration);
  • linearization: obtention of Gr Kr around any given configuration;

This function solves the constraints then call the mbs_Rred_core() function.

Parameters
[in,out]mbs_auxthe local computation structure, where the result Rred is stored.
[in,out]sthe MbsData of the system, where q(iqv),qd(iqv) and qdd(iqv) are updated.
Returns
MBS_INFO_SUCCESS in case of success.

◆ mbs_Rred_core()

int mbs_Rred_core ( MbsAux *  mbs_aux,
MbsData s 
)

Compute the residual force on independant joints and required force in driven joints.

This function is the computationnal core of Rred and Invdynared computations.

It requires the invdyna symbolic function.

It requires that all independent joints and all driven joints are up-to-date (coordinates, velocities and accelerations).

It will update the forces applied on the system (internals and externals).

Parameters
[in,out]mbs_auxThe local computation structure, where the result Rred and Qc are stored.
[in,out]sThe MbsData of the system.
Returns
Error status, <0 in case of failure.