#include <stdio.h>
#include <stdlib.h>
#include "string.h"
#include "lut.h"
#include "MBSfun.h"
#include "mbs_check.h"
#include "set_output.h"
#include "mbs_message.h"
#include "mbs_solvekin.h"
#include "mbs_solvekin_struct.h"
#include "mbs_project_interface.h"
#include "mbs_errors_names.h"
#include "mbs_trigo.h"
Functions | |
MbsSolvekin * | mbs_new_solvekin (MbsData *mbs_data) |
Create a new inverse kinematic structure. More... | |
MbsSolvekin * | mbs_new_solvekin_aux (MbsAux *mbs_aux) |
Fills a new inverse kinematic structure. More... | |
void | mbs_delete_solvekin (MbsSolvekin *solvekin, MbsData *mbs_data) |
Free memory of the inverse kinematic structure The options (MbsInvOptions) and MbsAux structures are also freed. More... | |
int | mbs_run_solvekin (MbsSolvekin *sk, MbsData *mbs_data) |
Run the inverse kinematic analysis. More... | |
int | mbs_solvekin_save (MbsSolvekin *sk, double t) |
Save the values of solvekin analysis in the buffers. More... | |
int | mbs_solvekin_init (MbsSolvekin *sk, MbsData *mbs_data) |
Run the startup operations of the run_solvekin function. More... | |
int | mbs_solvekin_loop (MbsSolvekin *sk, MbsData *mbs_data) |
Time loop of the run_solvekin function: More... | |
int | mbs_solvekin_finish (MbsSolvekin *sk) |
Run the finalization operations of the run_solvekin function. More... | |
int | mbs_solvekin_write_buffers (MbsSolvekin *sk) |
Write the content of buffer associated to the given MbsSolvekin to disk. More... | |
int | mbs_fct_solvekin (MbsData *s, MbsSolvekin *sk) |
inverse kinematics computation of q, qd and qdd More... | |
This file implements the functions of the solvekin module in C.
Creation date: 15/12/2018
(c) Universite catholique de Louvain
void mbs_delete_solvekin | ( | MbsSolvekin * | solvekin, |
MbsData * | mbs_data | ||
) |
Free memory of the inverse kinematic structure The options (MbsInvOptions) and MbsAux structures are also freed.
int mbs_fct_solvekin | ( | MbsData * | s, |
MbsSolvekin * | sk | ||
) |
inverse kinematics computation of q, qd and qdd
[in,out] | s | Robotran main structure |
[in,out] | sk | inverse kinematic main module structure |
MbsSolvekin* mbs_new_solvekin | ( | MbsData * | mbs_data | ) |
Create a new inverse kinematic structure.
This function also initialize the options structures and the MbsAux for storing computational info during computation.
[in] | mbs_data | the data structure of the model for which the kinematic will be computed. |
MbsSolvekin* mbs_new_solvekin_aux | ( | MbsAux * | mbs_aux | ) |
Fills a new inverse kinematic structure.
This function also initialize the options structures. A pointer to the given MbsAux structure is kept by the returned structure.
[in] | mbs_aux | the auxilliary structure of the model for which the kinematic will be computed. |
int mbs_run_solvekin | ( | MbsSolvekin * | solvekin, |
MbsData * | mbs_data | ||
) |
Run the inverse kinematic analysis.
The MbsData structure associated to solvekin is modified
[in,out] | solvekin | the MbsSolvekin to be run |
[in,out] | mbs_data | the MbsData structure of the model for which the inverse kinematic is computed |
int mbs_solvekin_finish | ( | MbsSolvekin * | solvekin | ) |
Run the finalization operations of the run_solvekin function.
[in,out] | solvekin | the MbsSolvekin to be finalized |
[in] | mbs_data | the MbsData structure of the model for which the inverse kinematic is computed |
int mbs_solvekin_init | ( | MbsSolvekin * | solvekin, |
MbsData * | mbs_data | ||
) |
Run the startup operations of the run_solvekin function.
[in,out] | solvekin | the MbsSolvekin to be run |
[in] | mbs_data | the MbsData structure of the model for which the inverse kinematic is computed |
int mbs_solvekin_loop | ( | MbsSolvekin * | solvekin, |
MbsData * | mbs_data | ||
) |
Time loop of the run_solvekin function:
[in,out] | solvekin | the MbsSolvekin to be run |
[in,out] | mbs_data | the MbsData structure of the model for which the inverse kinematic is computed |
int mbs_solvekin_save | ( | MbsSolvekin * | sk, |
double | t | ||
) |
Save the values of solvekin analysis in the buffers.
sk | the MbsSolvekin to be stored in the buffers. |
t | the current time. |
int mbs_solvekin_write_buffers | ( | MbsSolvekin * | sk | ) |
Write the content of buffer associated to the given MbsSolvekin to disk.
This is usefull for writing simulation results at the end of the simulation. This sepcific function is written to be able to ask for writing buffer from python.
sk
the MbsSolvekin struct for which the buffers must be written