Robotran C Documentation
mbs_set.h
Go to the documentation of this file.
1 
12 #ifndef MBS_SET_h
13 #define MBS_SET_h
14 
15 #include "mbs_data.h"
16 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
28  void mbs_set_nb_userc(MbsData *mbs_data, int Nuserc);
29 
37  void mbs_set_qu(MbsData *mbs_data, int qu);
38 
46  void mbs_set_qv(MbsData *mbs_data, int qv);
47 
55  void mbs_set_qdriven(MbsData *mbs_data, int qdriven);
56 
64  void mbs_set_qlocked(MbsData *mbs_data, int qlocked);
65 
73  void mbs_set_qa(MbsData *mbs_data, int qa);
74 
82  void mbs_unset_qa(MbsData *mbs_data, int qa);
83 
90  void mbs_empty_qa(MbsData *mbs_data);
91 
96  void print_mbs_q_all(MbsData *mbs_data);
97 
103  void print_mbs_q_vec(int *q_vec, int nq);
104 #ifdef __cplusplus
105 }
106 #endif
107 
117 int add_mbs_q_elem(int *q_vec, int nq, int new_q);
118 
128 int remove_mbs_q_elem(int *q_vec, int nq, int old_q);
129 
140 void udpate_nq(MbsData *mbs_data, int new_nqu, int new_nqv, int new_nqc, int new_nqdriven, int new_nqlocked);
141 
142 #endif
sort_inplace_ivec_1
void sort_inplace_ivec_1(int *vec, int l_v)
sort and modify the (x sized) vector of integers, starting with index 1 The "Bubble sort" is used,...
Definition: mbs_1D_array.c:724
MbsData::Ncons
int Ncons
Number of algebraic constraints.
Definition: mbs_data.h:218
MbsData::qa
int * qa
Array with the indices of actuated articulations (only for inverse dynamic).
Definition: mbs_data.h:180
useful_functions.h
mbs_set_qlocked
void mbs_set_qlocked(MbsData *mbs_data, int qlocked)
set a variable to locked partition
Definition: mbs_set.c:108
mbs_error_msg
void mbs_error_msg(char *msg,...)
Send an error message.
Definition: mbs_message.c:102
MbsData::nqv
int nqv
Number of dependent articulations.
Definition: mbs_data.h:170
mbs_data.h
MbsData::qc
int * qc
Array with the indices of driven (locked and driven) articulations.
Definition: mbs_data.h:175
MbsData::nqu
int nqu
Number of independent articulations.
Definition: mbs_data.h:165
print_mbs_q_vec
void print_mbs_q_vec(int *q_vec, int nq)
print a vector of indexes with first elem in brackets
Definition: mbs_set.c:257
_MBS_ERR_LOW_FILES
#define _MBS_ERR_LOW_FILES
Low Level error number Error during opening/writing files = -9.
Definition: mbs_errors_names.h:147
mbs_set_qu
void mbs_set_qu(MbsData *mbs_data, int qu)
set a variable to independent partition
Definition: mbs_set.c:40
mbs_set_qlocked
void mbs_set_qlocked(MbsData *mbs_data, int qlocked)
set a variable to locked partition
Definition: mbs_set.c:108
mbs_empty_qa
void mbs_empty_qa(MbsData *mbs_data)
Remove all joints from the actuated partition.
Definition: mbs_set.c:152
MbsData::njoint
int njoint
Number of joints in the system.
Definition: mbs_data.h:162
print_mbs_q_vec
void print_mbs_q_vec(int *q_vec, int nq)
print a vector of indexes with first elem in brackets
Definition: mbs_set.c:257
remove_mbs_q_elem
int remove_mbs_q_elem(int *q_vec, int nq, int old_q)
remove an old index in a q vector It does not modify the vector and vector size if the index is not i...
Definition: mbs_set.c:213
mbs_set_nb_userc
void mbs_set_nb_userc(MbsData *mbs_data, int Nuserc)
Set the number of user constraints and update the related structures.
Definition: mbs_set.c:19
add_mbs_q_elem
int add_mbs_q_elem(int *q_vec, int nq, int new_q)
add a new index in a q vector It does not modify the vector and vector size if the index is already i...
Definition: mbs_set.c:185
MbsData::hu
int * hu
Array with the indices of independent constraints.
Definition: mbs_data.h:183
mbs_set_qa
void mbs_set_qa(MbsData *mbs_data, int qa)
set a variable to actuated partition
Definition: mbs_set.c:131
mbs_set_qv
void mbs_set_qv(MbsData *mbs_data, int qv)
set a variable to dependent partition
Definition: mbs_set.c:62
mbs_set_qu
void mbs_set_qu(MbsData *mbs_data, int qu)
set a variable to independent partition
Definition: mbs_set.c:40
mbs_msg
void mbs_msg(char *msg,...)
Send a message.
Definition: mbs_message.c:76
MbsData::Nuserc
int Nuserc
Number of user constraints.
Definition: mbs_data.h:219
MbsData::qu
int * qu
Array with the indices of the independent articulations (free)
Definition: mbs_data.h:174
udpate_nq
void udpate_nq(MbsData *mbs_data, int new_nqu, int new_nqv, int new_nqc, int new_nqdriven, int new_nqlocked)
DEPRECATED; do not use: update the nq variables, SHOULD not be used The function still works,...
Definition: mbs_set.c:163
add_mbs_q_elem
int add_mbs_q_elem(int *q_vec, int nq, int new_q)
add a new index in a q vector It does not modify the vector and vector size if the index is already i...
Definition: mbs_set.c:185
MbsData::qv
int * qv
Array with the indices of the dependent articulations .
Definition: mbs_data.h:182
MbsData::Nloopc
int Nloopc
Number of loop constraints.
Definition: mbs_data.h:217
mbs_set_qa
void mbs_set_qa(MbsData *mbs_data, int qa)
set a variable to actuated partition
Definition: mbs_set.c:131
udpate_nq
void udpate_nq(MbsData *mbs_data, int new_nqu, int new_nqv, int new_nqc, int new_nqdriven, int new_nqlocked)
DEPRECATED; do not use: update the nq variables, SHOULD not be used The function still works,...
Definition: mbs_set.c:163
mbs_set.h
print_mbs_q_all
void print_mbs_q_all(MbsData *mbs_data)
print the vectors qu, qv, qc, qdriven and qlocked
Definition: mbs_set.c:243
MbsData::nqdriven
int nqdriven
Number of driven articulations.
Definition: mbs_data.h:168
mbs_empty_qa
void mbs_empty_qa(MbsData *mbs_data)
Remove all joints from the actuated partition.
Definition: mbs_set.c:152
MbsData::nqc
int nqc
Number of driven articulations, it includes qlocked and qdriven.
Definition: mbs_data.h:166
mbs_message.h
mbs_unset_qa
void mbs_unset_qa(MbsData *mbs_data, int qa)
unset a variable from the actuated partition
Definition: mbs_set.c:147
MbsData
Definition: mbs_data.h:149
remove_mbs_q_elem
int remove_mbs_q_elem(int *q_vec, int nq, int old_q)
remove an old index in a q vector It does not modify the vector and vector size if the index is not i...
Definition: mbs_set.c:213
MbsData::qlocked
int * qlocked
Array with the indices of locked articulations.
Definition: mbs_data.h:176
mbs_unset_qa
void mbs_unset_qa(MbsData *mbs_data, int qa)
unset a variable from the actuated partition
Definition: mbs_set.c:147
mbs_set_qv
void mbs_set_qv(MbsData *mbs_data, int qv)
set a variable to dependent partition
Definition: mbs_set.c:62
print_mbs_q_all
void print_mbs_q_all(MbsData *mbs_data)
print the vectors qu, qv, qc, qdriven and qlocked
Definition: mbs_set.c:243
mbs_set_qdriven
void mbs_set_qdriven(MbsData *mbs_data, int qdriven)
set a variable to driven partition
Definition: mbs_set.c:85
MbsData::qdriven
int * qdriven
Array with the indices of driven articulations.
Definition: mbs_data.h:178
find_ivec_1
int find_ivec_1(int *vec, int l_v, int f)
return the index of the value f in the (x sized) vector vec of integers, starting with index 1....
Definition: mbs_1D_array.c:832
mbs_set_qdriven
void mbs_set_qdriven(MbsData *mbs_data, int qdriven)
set a variable to driven partition
Definition: mbs_set.c:85
MbsData::nqa
int nqa
Number of actuated articulations.
Definition: mbs_data.h:169
MbsData::nqlocked
int nqlocked
Number of locked articulations.
Definition: mbs_data.h:167
mbs_set_nb_userc
void mbs_set_nb_userc(MbsData *mbs_data, int Nuserc)
Set the number of user constraints and update the related structures.
Definition: mbs_set.c:19
mbs_warning_msg
void mbs_warning_msg(char *msg,...)
Send a warning message.
Definition: mbs_message.c:89
MbsData::nhu
int nhu
Number of independent constraints.
Definition: mbs_data.h:171
mbs_errors_names.h