|
Robotran C Documentation
|
Go to the documentation of this file. 1 #ifndef _SENSOR_UTILITIES_H
2 #define _SENSOR_UTILITIES_H
int mbs_Rred(MbsAux *mbs_aux, MbsData *s)
compute Rred, the reduced equations of motions on a residual form [nqu x 1] obtained after the 2 cons...
Definition: mbs_Rred.c:20
void user_equil_finish(MbsData *mbs_data, MbsEquil *mbs_equil)
user own finishing functions
Definition: mbs_project_fct_ptr.c:149
int Ncons
Number of algebraic constraints.
Definition: mbs_data.h:218
void user_dirdyn_loop(MbsData *mbs_data, MbsDirdyn *mbs_dd)
user own loop functions
Definition: mbs_project_fct_ptr.c:117
void user_invdyn_init(MbsData *mbs_data, MbsInvdyn *mbs_invd)
Definition: mbs_project_fct_ptr.c:127
General structure of the inverse dynamics module.
Definition: mbs_invdyn_struct.h:27
mbs_cons_hJ_ptr mbs_cons_hJ
Definition: mbs_data.h:76
void user_DrivenJoints(MbsData *s, double tsim)
Compute the positions, velocities and acceleration of driven joint.
Definition: mbs_project_fct_ptr.c:95
user_equil_finish_ptr user_equil_finish
Definition: mbs_data.h:99
double tsim
The time value.
Definition: mbs_data.h:208
int nqrot
Number of rotational joint (R1, R2 or R3)
Definition: mbs_data.h:172
void user_equil_init(MbsData *mbs_data, MbsEquil *mbs_equil)
user own initialization functions
Definition: mbs_project_fct_ptr.c:141
int nqv
Number of dependent articulations.
Definition: mbs_data.h:170
mbs_link_ptr mbs_link
Definition: mbs_data.h:70
int * qc
Array with the indices of driven (locked and driven) articulations.
Definition: mbs_data.h:175
mbs_invdyna_ptr mbs_invdyna
Definition: mbs_data.h:75
int nqu
Number of independent articulations.
Definition: mbs_data.h:165
double * user_JointForces(MbsData *s, double tsim)
Compute the user-specified joint force in all joint.
Definition: mbs_project_fct_ptr.c:69
void lubksb(double **a, int n, int *indx, double b[])
Definition: lubksb.c:10
MbsSensor * mbs_new_sensor(struct MbsData *mbs_data)
Create a new MbsSensor structure, allocate and initialize the memory for all fields.
Definition: mbs_sensor_utilities.c:50
int njoint
Number of joints in the system.
Definition: mbs_data.h:162
struct Functions::@7 symb
user_equil_init_ptr user_equil_init
Definition: mbs_data.h:97
user_dirdyn_init_ptr user_dirdyn_init
Definition: mbs_data.h:89
user_equil_loop_ptr user_equil_loop
Definition: mbs_data.h:98
user_dirdyn_loop_ptr user_dirdyn_loop
Definition: mbs_data.h:90
user_invdyn_finish_ptr user_invdyn_finish
Definition: mbs_data.h:95
int ludcmp(double **a, int n, int *indx, double *d)
LU decomposition of a matrix with index starting at 1.
Definition: ludcmp.c:19
user_ExtForces_ptr user_ExtForces
Definition: mbs_data.h:109
mbs_dirdyna_ptr mbs_dirdyna
Definition: mbs_data.h:74
void mbs_cons_jdqd(double *Jdqd, MbsData *s, double tsim)
Definition: mbs_project_fct_ptr.c:52
#define _MBS_ERR_LOW_NAN
Low Level error number Number is NaN (not a number) = -7.
Definition: mbs_errors_names.h:142
int flag_optim_symb_sin_cos
allow the "optimisation" of the computation of the sine/cosine in the symbolic files....
Definition: mbs_data.h:198
void mbs_close_kin(MbsData *s, MbsAux *mbs_aux)
compute the dependent velocities that solves the constraints.
Definition: mbs_close_loops.c:140
mbs_link3D_ptr mbs_link3D
Definition: mbs_data.h:71
user_Link3DForces_ptr user_Link3DForces
Definition: mbs_data.h:108
int * hu
Array with the indices of independent constraints.
Definition: mbs_data.h:183
void mbs_dirdyna(double **M, double *c, MbsData *s, double tsim)
Definition: mbs_project_fct_ptr.c:40
void user_dirdyn_init(MbsData *mbs_data, MbsDirdyn *mbs_dd)
user own initialization functions
Definition: mbs_project_fct_ptr.c:113
double user_LinkForces(double Z, double Zd, MbsData *s, double tsim, int ilnk)
Compute the value of a link forces.
Definition: mbs_project_fct_ptr.c:80
Definition: mbs_equil_struct.h:68
void user_cons_hJ(double *h, double **Jac, MbsData *s, double tsim)
Definition: mbs_project_fct_ptr.c:99
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:307
void mbs_msg(char *msg,...)
Send a message.
Definition: mbs_message.c:76
void mbs_gensensor(MbsSensor *sens, MbsData *s, int isens)
Definition: mbs_project_fct_ptr.c:60
int mbs_accelred(MbsData *s, double tsim)
Definition: mbs_project_fct_ptr.c:36
mbs_sensor_ptr mbs_sensor
Definition: mbs_data.h:78
void user_dirdyn_finish(MbsData *mbs_data, MbsDirdyn *mbs_dd)
user own finishing functions
Definition: mbs_project_fct_ptr.c:121
user_equil_fxe_ptr user_equil_fxe
Definition: mbs_data.h:100
void user_invdyn_finish(MbsData *mbs_data, MbsInvdyn *mbs_invd)
Definition: mbs_project_fct_ptr.c:135
#define _MBS_ERR_MID_RRED
Mid Level error number Related to the computation of the Rred matrix.
Definition: mbs_errors_names.h:102
int * qu
Array with the indices of the independent articulations (free)
Definition: mbs_data.h:174
double * user_ExtForces(double PxF[4], double RxF[4][4], double VxF[4], double OMxF[4], double AxF[4], double OMPxF[4], MbsData *s, double tsim, int ixF)
Compute an user-specified external force.
Definition: mbs_project_fct_ptr.c:84
int * qv
Array with the indices of the dependent articulations .
Definition: mbs_data.h:182
void mbs_cons_hJ(double *h, double **Jac, MbsData *s, double tsim)
Definition: mbs_project_fct_ptr.c:48
double * Qc
Array with the value of joint force introduced in driven joint to respect the user function.
Definition: mbs_data.h:233
void mbs_invdyna(double *Q, MbsData *s, double tsim)
Definition: mbs_project_fct_ptr.c:44
mbs_extforces_ptr mbs_extforces
Definition: mbs_data.h:72
user_cons_hJ_ptr user_cons_hJ
Definition: mbs_data.h:104
user_LinkForces_ptr user_LinkForces
Definition: mbs_data.h:107
double * Qq
Array with the values of the joint forces.
Definition: mbs_data.h:204
void user_cons_jdqd(double *jdqd, MbsData *s, double tsim)
Definition: mbs_project_fct_ptr.c:103
void user_Derivative(MbsData *s)
Definition: mbs_project_fct_ptr.c:91
This header defines the functions for trigonometric handling in MBsysC integrator in C.
Functions fct
Structure to store the pointer to the project-specific functions.
Definition: mbs_data.h:316
user_Derivative_ptr user_Derivative
Definition: mbs_data.h:102
void user_equil_loop(MbsData *mbs_data, MbsEquil *mbs_equil)
user own loop functions
Definition: mbs_project_fct_ptr.c:145
user_invdyn_loop_ptr user_invdyn_loop
Definition: mbs_data.h:94
void init_sensor(MbsSensor *psens, int njoint)
Initialize all fields of MbsSensor structure to 0.
Definition: mbs_sensor_utilities.c:22
void mbs_comp_gen_sensor(MbsSensor *psens, struct MbsData *mbs_data, int joint_id)
Compute all fields of a sensor located on the specified joint.
Definition: mbs_sensor_utilities.c:76
int mbs_calc_force(MbsData *s)
compute the force and torques applied on the multibody system.
Definition: mbs_calc_force.c:13
int nqc
Number of driven articulations, it includes qlocked and qdriven.
Definition: mbs_data.h:166
int mbs_close_geo(MbsData *s, MbsAux *mbs_aux)
compute a position of the multibody system which solves the constraints
Definition: mbs_close_loops.c:43
mbs_accelred_ptr mbs_accelred
Definition: mbs_data.h:73
void mbs_calc_jdqd(MbsData *s, MbsAux *mbs_aux)
compute the quadratic term of the constraints at acceleration level:
Definition: mbs_close_loops.c:216
void mbs_extforces(double **frc, double **trq, MbsData *s, double tsim)
Definition: mbs_project_fct_ptr.c:32
void mbs_comp_S_sensor(MbsSensor *psens, struct MbsData *mbs_data, int isens)
Compute all fields of the specified sensor.
Definition: mbs_sensor_utilities.c:66
Definition: mbs_data.h:149
mbs_gensensor_ptr mbs_gensensor
Definition: mbs_data.h:79
user_cons_J_accelred_ptr user_cons_J_accelred
Definition: mbs_data.h:106
struct Functions::@8 user
void mbs_compute_sin_cos_quc(MbsData *s, int *qrot_qu_indvec, int *qrot_qc_indvec)
Compute the sine and cosine of the q_sin and q_cos, only for the rotational joints that are independe...
Definition: mbs_trigo.c:65
void user_equil_fxe(MbsData *mbs_data, double *f)
user own implementation of added equilibrium equations Fxe Necessary to express equilibrium f(x)=0
Definition: mbs_project_fct_ptr.c:153
Definition: mbs_sensor_struct.h:18
void user_cons_J_accelred(MbsData *s, double tsim)
[Accelred only] Compute the Jac_user matrix nqv x Njoint matrix (starting at one) for custom user con...
Definition: mbs_project_fct_ptr.c:107
void mbs_sensor(MbsSensor *sens, MbsData *s, int isens)
Compute all fields of a sensor (force sensor or classic sensor).
Definition: mbs_project_fct_ptr.c:56
user_cons_jdqd_ptr user_cons_jdqd
Definition: mbs_data.h:105
user_DrivenJoints_ptr user_DrivenJoints
Definition: mbs_data.h:103
user_invdyn_init_ptr user_invdyn_init
Definition: mbs_data.h:93
void mbs_link(double **frc, double **trq, double *Flnk, double *Z, double *Zd, MbsData *s, double tsim)
Definition: mbs_project_fct_ptr.c:24
void allocate_sensor(MbsSensor *psens, int njoint)
Allocate the Jacobian matrix of the MbsSensor according to the number of joints in the multibody syst...
Definition: mbs_sensor_utilities.c:17
void free_sensor(MbsSensor *psens)
Deprecated: Free the memory inside MbsSensor structure. i.e. free the space allocated for the jacobia...
Definition: mbs_sensor_utilities.c:44
void copy_dvec_0(double *vec_src, double *vec_dest, int l_v)
Copy the content of a vector (of sizel_v) of doubles to a second vector, starting with index 0.
Definition: mbs_1D_array.c:906
void slct_dvec_1(double *vec_src, int *vec_ind_src, int l_v, double *vec_dest)
fill the third vector by slicing the first vector of doubles at the indexes specified in the second (...
Definition: mbs_1D_array.c:1248
void pick_and_place_dvec_1(double *src, int *index, int n, double *dest)
Pick the values from an array and set them in the destination array at the specified index.
Definition: mbs_1D_array.c:1230
double * lambda
Array with the values of the Lagrange Multipliers related to the constraints.
Definition: mbs_data.h:222
General structure of the direct dynamic module.
Definition: mbs_dirdyn_struct.h:144
void mbs_link3D(double **frc, double **trq, MbsData *s, double tsim)
Definition: mbs_project_fct_ptr.c:28
double * qdd
Array with the current values of the generalized acceleration.
Definition: mbs_data.h:189
mbs_cons_jdqd_ptr mbs_cons_jdqd
Definition: mbs_data.h:77
void mbs_comp_F_sensor(MbsSensor *psens, struct MbsData *mbs_data, int isens)
Compute all fields of the specified force sensor.
Definition: mbs_sensor_utilities.c:71
int mbs_Rred_core(MbsAux *mbs_aux, MbsData *s)
Compute the residual force on independant joints and required force in driven joints.
Definition: mbs_Rred.c:35
void mbs_delete_sensor(MbsSensor *psens)
Free the memory of MbsSensor structure. and its contents.
Definition: mbs_sensor_utilities.c:57
void user_invdyn_loop(MbsData *mbs_data, MbsInvdyn *mbs_invd)
Definition: mbs_project_fct_ptr.c:131
double * user_Link3DForces(double PxF[4], double RxF[4][4], double VxF[4], double OMxF[4], double AxF[4], double OMPxF[4], MbsData *s, double tsim, int ixF)
Compute an user-specified point to point force, with arbitrary line of action.
Definition: mbs_project_fct_ptr.c:73
user_JointForces_ptr user_JointForces
Definition: mbs_data.h:84
int nhu
Number of independent constraints.
Definition: mbs_data.h:171
void user_DrivenJoints(MbsData *mbs_data, double tsim)
Compute the positions, velocities and acceleration of driven joint.
Definition: user_DrivenJoints.c:15
user_dirdyn_finish_ptr user_dirdyn_finish
Definition: mbs_data.h:91