Robotran C Documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
mbs_load_json.h
Go to the documentation of this file.
1 
8 #ifndef MBS_LOAD_JSON_h
9 #define MBS_LOAD_JSON_h
10 
11 #include "mbs_binder_public.h"
12 #include "json.h"
13 #include "mbs_load_struct.h"
14 #include "mbs_saver_struct.h"
15 
31 int mbs_json_inertia(JsonNode *bdy_node, MbsInfoBody *mbs_info_body, int mission);
32 
33 JsonNode* load_and_create_json(const char* mbs_json_filename, int* err);
47 int mbs_info_json_binder(MbsInfos* mbs_infos, JsonNode* root_node, int mission,
48  int verbose);
49 
61 int mbs_info_body_json_binder(MbsInfoBody* mbs_info_body, JsonNode* node, int mission);
62 
74 int mbs_info_tree_json_binder(MbsInfos* mbs_infos, JsonNode* node, int mission);
86 int mbs_info_bodytree_json_binder(MbsInfos* mbs_infos, JsonNode* node, int mission);
98 int mbs_info_base_json_binder(MbsInfoBase* mbs_info_base, JsonNode* node, int mission);
99 int mbs_info_ref_point_json_binder(MbsInfoRefPoint* mbs_info_ref_point, JsonNode* node, int mission);
100 int mbs_info_coordinates_json_binder(double* coordinates_pointer, JsonNode* node, int mission);
101 int mbs_info_point_json_binder(MbsInfoPoint* mbs_info_point, JsonNode* node, int mission);
113 int mbs_info_ball_json_binder(MbsInfoBall* mbs_info_ball, JsonNode* node, int mission);
114 
126 int mbs_info_rod_json_binder(MbsInfoRod* mbs_info_rod, JsonNode* node, int mission);
127 
139 int mbs_info_solid_json_binder(MbsInfoSolid* mbs_info_solid, JsonNode* node, int mission);
151 int mbs_info_cuts_json_binder(MbsInfoCuts* mbs_info_cuts, JsonNode* node, int mission);
165 int mbs_info_parameter_json_binder(MbsInfoParameter* mbs_info_parameter, JsonNode* node,
166  int mission, int verbose);
181  int mission, int verbose);
196  int mission, int verbose);
197 int mbs_info_user_IO_json_binder(MbsInfoUserIO* mbs_info_user_IO, JsonNode* node, int mission);
198 
213 int mbs_info_user_IOs_json_binder(MbsInfoUserIOs* mbs_info_user_IOs,
214  JsonNode* node, int mission, int verbose);
215 int mbs_info_user_cstr_json_binder(MbsInfoUserCstr* mbs_info_user_cstr,
216  JsonNode* node, int mission);
217 
229 int mbs_info_link_json_binder(MbsInfoLink* mbs_info_link, JsonNode* node, int mission);
241 int mbs_info_links_json_binder(MbsInfoLinks* mbs_info_links, JsonNode* node, int mission);
242 int mbs_info_links3d_json_binder(MbsInfoLinks* mbs_info_links, JsonNode* node, int mission);
243 
255 int mbs_info_sensor_json_binder(MbsInfoSensor* mbs_info_sensor, JsonNode* node, int mission);
256 
266 int mbs_info_sensors_json_binder(MbsInfos* mbs_info, JsonNode* node, int mission);
267 
279 int mbs_info_extforce_json_binder(MbsInfoExtforce* mbs_info_extf, JsonNode* node, int mission);
280 
290 int mbs_info_extforces_json_binder(MbsInfos* mbs_info, JsonNode* node, int mission);
291 
310 int mbs_info_point_list_json_binder(MbsInfoPoint*** point_list, JsonNode* node, int mission, char* body_name, int *n_point);
311 
324 int mbs_info_joint_json_binder(MbsInfoJoint* mbs_info_joint, JsonNode* node,
325  int mission, int verbose);
326 
338 int mbs_info_joints_list_json_binder(MbsInfos* mbs_infos, JsonNode* joints_node, int mission);
339 
340 int mbs_body_joint_recursive_linker(MbsInfos* mbs_info, int* ind_body_joint, int mission, int body_index);
341 
358 int mbs_tree_cleaner(MbsInfos* mbs_info, int mission);
359 int mbs_info_json_linker(MbsInfos* mbs_info, int mission);
360 
375 int mbs_json_axis(JsonNode *axis_node, int *axis_int, int mission);
376 
391 int mbs_json_joint_nature(JsonNode *nature_node, int *nature_int, int mission);
392 
406 int mbs_info_init_and_binderJSON(MbsInfos* mbs_infos, const char* mbs_json_name,
407  int mission, int verbose);
408 
417 int mbs_json_info_to_loader(MbsLoader *mbs_loader, const char *filename);
418 
433 JsonNode* mbs_info_init_and_binderJSON_rtn(MbsInfos* mbs_infos, const char* mbs_json_name,
434  int* err, int mission, int verbose);
435 
457 int mbs_json_parent(JsonNode *node, MbsInfoRefPoint **point_parent,
458  char **joint_parent, int mission, const char *key);
459 
471 int json_is_on_base(JsonNode *parent);
472 
489 JsonNode *json_get_basebody(JsonNode *bodies_node, int create, int *err);
490 
509 JsonNode *json_get_body(JsonNode *bodies_node, char *body_name, int create,
510  int *err);
511 
522 JsonNode *json_get_body_3Dshapes(JsonNode *body_node, int create, int *err);
523 
547 JsonNode *json_get_shape(JsonNode *shapes_node, char *shape_name,
548  char *geometry, int allow_new, int *err);
549 
564 int mbs_info_synch_shape(JsonNode *shape, UpdateInline *up_in, UpdateShape *up_sh);
565 
584 int mbs_info_update_shapes_json(MbsLoader *mbs_loader, UpdateInline *up_in,
585  UpdateShape *up_sh, int allow_new);
586 #endif
MbsLoader::opts
MbsLoadOptions * opts
Contains the options that must be used when loading the project.
Definition: mbs_load_struct.h:95
json_mkbool
JsonNode * json_mkbool(bool b)
Definition: json.c:500
mbs_info_extforces_json_binder
int mbs_info_extforces_json_binder(MbsInfos *mbs_info, JsonNode *node, int mission)
Read or update a external forces list json node with the infos.
Definition: mbs_load_json.c:2685
MbsInfoCuts::n_rod
int n_rod
Definition: mbs_infos_struct.h:249
MbsInfoBall::endpoint1
MbsInfoRefPoint * endpoint1
Definition: mbs_infos_struct.h:212
MbsInfos::cuts
MbsInfoCuts * cuts
Definition: mbs_infos_struct.h:429
MBS_BASENAME
#define MBS_BASENAME
Definition: mbs_define.h:37
mbs_info_init_and_binderJSON_rtn
JsonNode * mbs_info_init_and_binderJSON_rtn(MbsInfos *mbs_infos, const char *mbs_json_name, int *err, int mission, int verbose)
Init and bind the MBS information contained in the .json file.
Definition: mbs_load_json.c:91
MBS_INFO_UPDATER
#define MBS_INFO_UPDATER
Definition: mbs_define.h:24
MbsInfoPoint::pt
double * pt
Array with the coordinates (x, y, z) of the point relative to the origin of the body expressed in the...
Definition: mbs_infos_struct.h:105
mbs_info_solid_json_binder
int mbs_info_solid_json_binder(MbsInfoSolid *mbs_info_solid, JsonNode *node, int mission)
Read or update a solid cut json node with the infos.
Definition: mbs_load_json.c:1062
MbsInfoExtforce::name
char * name
Definition: mbs_infos_struct.h:83
mbs_new_info_body
MbsInfoBody * mbs_new_info_body(void)
Definition: mbs_loader_public.c:736
MbsInfoParameter::structure_name
char * structure_name
Name of the structure, filled if the parameter is a structure.
Definition: mbs_infos_struct.h:332
MbsInfoExtforce::Vit
int Vit
1 if the computation of the sensor linear velocity has been asked, 0 otherwise.
Definition: mbs_infos_struct.h:89
MbsInfoBall::endpoint2
MbsInfoRefPoint * endpoint2
Definition: mbs_infos_struct.h:213
json_mkobject
JsonNode * json_mkobject(void)
Definition: json.c:531
MBS_INFO_FAILURE
#define MBS_INFO_FAILURE
Definition: mbs_define.h:32
MbsInfoBodytree
Definition: mbs_infos_struct.h:177
mbs_msg
void mbs_msg(const char *msg,...)
Send a message.
Definition: mbs_message.c:87
UpdateInline::scale
double * scale
Scale (x, y, z) of the inline, Set to NULL to not update it.
Definition: mbs_saver_struct.h:40
MbsInfoRefPoint::bodyname
char * bodyname
Name of the body that bear the reference point (origin of the joint chain until first body encounter)...
Definition: mbs_infos_struct.h:52
MbsInfos::verbose
int verbose
Verbosity level (not yet implemented everywhere):
Definition: mbs_infos_struct.h:485
mbs_saver.h
Declare required stuffs to update mbs files from MbsData state and user wishes.
MbsLoader::loaded_structure
void * loaded_structure
Pointer to the loaded mbs file specific structure (related to file format).
Definition: mbs_load_struct.h:122
UpdateInline::prj_relative_url
int prj_relative_url
True (1) if the shape url (shape_url) start for project folder (without initial path separator).
Definition: mbs_saver_struct.h:47
MbsInfoRod::name
char * name
Definition: mbs_infos_struct.h:221
mbs_json_tab
int mbs_json_tab(JsonNode *node, double ***tab_ptr, int size_1, int size_2, const char *key, int mission)
Link between array (2D) value and the specific key of a Json node or the current node.
Definition: mbs_json.c:751
get_char_cpy
char * get_char_cpy(const char *fmt,...)
Copy the provided formatted string into a newly allocated memory.
Definition: useful_functions.c:235
mbs_info_links_json_binder
int mbs_info_links_json_binder(MbsInfoLinks *mbs_info_links, JsonNode *node, int mission)
Read or update a links list json node with the infos.
Definition: mbs_load_json.c:2203
MbsInfoParameter::value_list
double * value_list
Vector (index starting at 1) containing the values retrieved from the multibody file.
Definition: mbs_infos_struct.h:299
MbsInfoParameter::name
char * name
Name of the parameter in the user model.
Definition: mbs_infos_struct.h:282
mbs_json_set_double
int mbs_json_set_double(JsonNode *node, double value)
Set a double into a node.
Definition: mbs_json.c:394
useful_functions.h
MbsInfoUserIOs::n_out
int n_out
Number of OUTPUT user IO in the system.
Definition: mbs_infos_struct.h:392
mbs_new_info_bodytree
MbsInfoBodytree * mbs_new_info_bodytree(void)
Definition: mbs_loader_public.c:792
UpdateInline::rotation
double * rotation
Rotation (around x, y, z) of the inline, Set to NULL to not update it.
Definition: mbs_saver_struct.h:42
JsonNode::children
struct JsonNode::@8::@10 children
mbs_info_base_json_binder
int mbs_info_base_json_binder(MbsInfoBase *mbs_info_base, JsonNode *node, int mission)
Read or update the information in base node to MbsInfoBase.
Definition: mbs_load_json.c:314
mbs_json_axis
int mbs_json_axis(JsonNode *axis_node, int *axis_int, int mission)
Read or update the information in an axis node with an integer.
Definition: mbs_load_json.c:3556
MbsInfoRefPoint
Structure defining the parent point of a body.
Definition: mbs_infos_struct.h:50
MbsInfoJoint::qdd0
double qdd0
Initial acceleration of the joint.
Definition: mbs_infos_struct.h:138
mbs_info_rod_json_binder
int mbs_info_rod_json_binder(MbsInfoRod *mbs_info_rod, JsonNode *node, int mission)
Read or update a rod json node with the infos.
Definition: mbs_load_json.c:1007
mbs_info_link_json_binder
int mbs_info_link_json_binder(MbsInfoLink *link_info, JsonNode *link_node, int mission)
Read or update a link (point to point or 3D) json node with the infos.
Definition: mbs_load_json.c:2334
MbsInfoExtforce::joint_parent
char * joint_parent
parent joint of the current body (should be always NULL, if it is a parent point) ExtForce on a joint...
Definition: mbs_infos_struct.h:85
MbsInfos::base
MbsInfoBase * base
Definition: mbs_infos_struct.h:427
mbs_info_user_model_json_binder
int mbs_info_user_model_json_binder(MbsInfoUserModel *um_info, JsonNode *um_node, int mission, int verbose)
Read or update a user model json node with the infos.
Definition: mbs_load_json.c:1789
mbs_info_joints_list_json_binder
int mbs_info_joints_list_json_binder(MbsInfos *mbs_infos, JsonNode *joints_node, int mission)
To Be Defined.
Definition: mbs_load_json.c:2963
MbsInfoBase::n_base_point
int n_base_point
Number of point of interest (extremities of joint bearing a sensor plus anchor point) defined on the ...
Definition: mbs_infos_struct.h:122
UpdateShape::on_base
int on_base
True (1) if the shape is on the basebody.
Definition: mbs_saver_struct.h:61
mbs_data.h
IGNORE_LOADED
@ IGNORE_LOADED
Definition: mbs_load_struct.h:91
MbsInfoPoint::body_name
char * body_name
Name of the body holding the point.
Definition: mbs_infos_struct.h:104
mbs_new_info_solid
MbsInfoSolid * mbs_new_info_solid(void)
Definition: mbs_loader_public.c:923
KEEP_LOADED
@ KEEP_LOADED
Definition: mbs_load_struct.h:91
mbs_error_msg
void mbs_error_msg(int err, const char *msg,...)
Send an error message.
Definition: mbs_message.c:131
get_dvec_0
double * get_dvec_0(int l_v)
create (with memory allocation) a vector (length l_v) of doubles, starting at index 0....
Definition: mbs_1D_array.c:1055
json_first_child
JsonNode * json_first_child(const JsonNode *node)
Definition: json.c:479
_MBS_ERR_LOW_FILES
#define _MBS_ERR_LOW_FILES
Low Level error number Error during opening/writing files = -9.
Definition: mbs_errors_names.h:157
MbsInfoUserIOs::user_IO_list
MbsInfoUserIO ** user_IO_list
The detail of each user IO in the system.
Definition: mbs_infos_struct.h:394
JsonNode::bool_
bool bool_
Definition: json.h:53
mbs_new_info_user_cstr
MbsInfoUserCstr * mbs_new_info_user_cstr(void)
Definition: mbs_loader_public.c:1256
MbsInfoJoint
This structure contains all informations about a joint.
Definition: mbs_infos_struct.h:130
MbsInfoCuts
Definition: mbs_infos_struct.h:246
UpdateShape::visible
int visible
Flag to show the shape (1) or hide it (0). Set to -1 to not update it.
Definition: mbs_saver_struct.h:92
mbs_json_get_string
int mbs_json_get_string(JsonNode *node, char **str_ptr)
Get the node value content as a string.
Definition: mbs_json.c:514
mbs_info_link_json_binder
int mbs_info_link_json_binder(MbsInfoLink *mbs_info_link, JsonNode *node, int mission)
Read or update a link (point to point or 3D) json node with the infos.
Definition: mbs_load_json.c:2334
free_ivec_0
void free_ivec_0(int *vec)
release memory for a vector of integers, starting with index 0
Definition: mbs_1D_array.c:590
mbs_info_bodies_json_binder
int mbs_info_bodies_json_binder(MbsInfos *mbs_infos, JsonNode *bdies_node, int mission)
Definition: mbs_load_json.c:633
mbs_define.h
json_foreach
#define json_foreach(i, object_or_array)
Definition: json.h:100
MbsInfoExtforce::Omp
int Omp
1 if the computation of the sensor angular acceleration has been asked, 0 otherwise.
Definition: mbs_infos_struct.h:93
mbs_binder_private.h
MbsInfoExtforce::Om
int Om
1 if the computation of the sensor angular velocity has been asked, 0 otherwise.
Definition: mbs_infos_struct.h:90
mbs_strcmp
int mbs_strcmp(const char *__s1, const char *__s2)
Compare two char with strcmp.
Definition: useful_functions.c:568
mbs_info_sensors_json_binder
int mbs_info_sensors_json_binder(MbsInfos *mbs_info, JsonNode *node, int mission)
Read or update a sensors list json node with the infos.
Definition: mbs_load_json.c:2519
mbs_info_init_and_binderJSON
int mbs_info_init_and_binderJSON(MbsInfos *mbs_infos, const char *mbs_json_name, int mission, int verbose)
Init and bind the MBS information contained in the .json file.
Definition: mbs_load_json.c:21
MbsInfoUserCstr::n_usercstr
int n_usercstr
Definition: mbs_infos_struct.h:400
free_dmat_0
void free_dmat_0(double **mat)
release memory for a matrix of doubles, starting at index 0
Definition: mbs_matrix.c:374
MbsInfoExtforce::parent_point
MbsInfoRefPoint * parent_point
parent point of the sensor (NULL if it is a parent joint)
Definition: mbs_infos_struct.h:84
mbs_json_joint_nature
int mbs_json_joint_nature(JsonNode *nature_node, int *nature_int, int mission)
Read or update the information in an joint nature node with an integer.
Definition: mbs_load_json.c:3627
MbsInfoBase::gravity
double * gravity
Array with the component (x, y, z) of the gravity vector expressed in the inertial frame.
Definition: mbs_infos_struct.h:121
mbs_info_user_IO_json_binder
int mbs_info_user_IO_json_binder(MbsInfoUserIO *mbs_info_user_IO, JsonNode *node, int mission)
Definition: mbs_load_json.c:1997
MbsInfoCuts::n_ball
int n_ball
Definition: mbs_infos_struct.h:248
JsonNode::prev
JsonNode * prev
Definition: json.h:45
MbsInfoBody::mass
double mass
Mass of the body.
Definition: mbs_infos_struct.h:168
mbs_info_bodytree_json_binder
int mbs_info_bodytree_json_binder(MbsInfos *mbs_infos, JsonNode *node, int mission)
Read or update the information in tree->bodies node to MbsInfoBase fields.
mbs_new_info_parameter
MbsInfoParameter * mbs_new_info_parameter(void)
Definition: mbs_loader_public.c:1083
mbs_new_info_sensor
MbsInfoSensor * mbs_new_info_sensor(void)
Definition: mbs_loader_public.c:535
JSON_OBJECT
@ JSON_OBJECT
Definition: json.h:36
mbs_info_sensors_json_binder
int mbs_info_sensors_json_binder(MbsInfos *mbs_info, JsonNode *sensors_node, int mission)
Read or update a sensors list json node with the infos.
Definition: mbs_load_json.c:2519
MbsInfoUserIO::size
int size
Number of values in the user IO.
Definition: mbs_infos_struct.h:375
MbsInfoSensor::Acc
int Acc
1 if the computation of the sensor linear acceleration has been asked, 0 otherwise....
Definition: mbs_infos_struct.h:71
mbs_warning_msg
void mbs_warning_msg(const char *msg,...)
Send a warning message.
Definition: mbs_message.c:100
mbs_body_joint_recursive_linker
int mbs_body_joint_recursive_linker(MbsInfos *mbs_info, int *ind_body_joint, int mission, int body_index)
Definition: mbs_load_json.c:3035
MbsInfos
Definition: mbs_infos_struct.h:425
mbs_json_cmp_string
int mbs_json_cmp_string(JsonNode *node, char *string)
Compare a string node content with a string.
Definition: mbs_json.c:501
mbs_info_links_json_binder
int mbs_info_links_json_binder(MbsInfoLinks *links_info, JsonNode *links_node, int mission)
Read or update a links list json node with the infos.
Definition: mbs_load_json.c:2203
mbs_load_json.h
This header includes the functions to bind the JSON information to the MbsInfos structure.
MbsInfoUserIO::type
int type
Nature of the user IO:
Definition: mbs_infos_struct.h:373
UpdateInline::position
double * position
Position (x, y, z) of the inline, Set to NULL to not update it.
Definition: mbs_saver_struct.h:38
JsonNode::next
JsonNode * next
Definition: json.h:45
MbsInfoPoint::name
char * name
Name of the point.
Definition: mbs_infos_struct.h:103
mbs_json_inertia
int mbs_json_inertia(JsonNode *bdy_node, MbsInfoBody *mbs_info_body, int mission)
Translate the inertia key of a node from array (3,3) in node to array (6) in info.
Definition: mbs_load_json.c:3698
MbsInfoPoint::sensor
MbsInfoSensor * sensor
Pointer to a sensor structure if a sensor is defined on the point.
Definition: mbs_infos_struct.h:107
mbs_info_sensor_json_binder
int mbs_info_sensor_json_binder(MbsInfoSensor *mbs_info_sensor, JsonNode *node, int mission)
Read or update a sensor json node with the infos.
Definition: mbs_load_json.c:2429
mbs_json_axis
int mbs_json_axis(JsonNode *axis_node, int *axis_int, int mission)
Read or update the information in an axis node with an integer.
Definition: mbs_load_json.c:3556
mbs_info_json_linker
int mbs_info_json_linker(MbsInfos *mbs_info, int mission)
Definition: mbs_load_json.c:3249
mbs_tree_cleaner
int mbs_tree_cleaner(MbsInfos *mbs_info, int mission)
Correct the parents of joints.
Definition: mbs_load_json.c:3072
json_mkarray
JsonNode * json_mkarray(void)
Definition: json.c:526
mbs_info_base_json_binder
int mbs_info_base_json_binder(MbsInfoBase *mbs_info_base, JsonNode *base_node, int mission)
Binders /////////////////////////////.
Definition: mbs_load_json.c:314
MbsInfoBase::base_point_list
MbsInfoPoint ** base_point_list
Array of pointers to the MDS_point_strct describing each point of the MBS.
Definition: mbs_infos_struct.h:123
mbs_info_user_cstr_json_binder
int mbs_info_user_cstr_json_binder(MbsInfoUserCstr *mbs_info_user_cstr, JsonNode *node, int mission)
Definition: mbs_load_json.c:2113
MbsInfoJoint::name
char * name
Name of the joint.
Definition: mbs_infos_struct.h:132
get_dmat_0
double ** get_dmat_0(int nb_r, int nb_c)
create (with memory allocation) a [nb_r times nb_c] matrix of doubles, starting at index 0 The functi...
Definition: mbs_matrix.c:294
mbs_info_joint_json_binder
int mbs_info_joint_json_binder(MbsInfoJoint *mbs_info_joint, JsonNode *node, int mission, int verbose)
Read or update the information in joints node to MbsInfoBase, MbsInfoJoints.
Definition: mbs_load_json.c:2770
_MBS_ERR_MOD_SPEC_19
#define _MBS_ERR_MOD_SPEC_19
Generic error number Module specific errors range from -11 to -19 please read the error message a...
Definition: mbs_errors_names.h:220
mbs_info_user_model_json_binder
int mbs_info_user_model_json_binder(MbsInfoUserModel *um_info, JsonNode *um_node, int mission, int verbose)
Read or update a user model json node with the infos.
Definition: mbs_load_json.c:1789
MbsInfoSolid
Definition: mbs_infos_struct.h:235
mbs_info_synch_shape
int mbs_info_synch_shape(JsonNode *shape, UpdateInline *up_in, UpdateShape *up_sh)
Synchronize, or fill with default value, a shape Json object node.
Definition: mbs_load_json.c:4139
mbs_new_info_user_IO
MbsInfoUserIO * mbs_new_info_user_IO(void)
Definition: mbs_loader_public.c:1221
mbs_new_info_joint
MbsInfoJoint * mbs_new_info_joint(void)
Definition: mbs_loader_public.c:691
MbsInfoCuts::rod_list
MbsInfoRod ** rod_list
Definition: mbs_infos_struct.h:253
mbs_info_body_json_binder
int mbs_info_body_json_binder(MbsInfoBody *mbs_info_body, JsonNode *bdy_node, int mission)
Read or update the information from body node to its MbsInfo.
Definition: mbs_load_json.c:524
MbsInfoUserModel
Definition: mbs_infos_struct.h:347
mbs_info_ref_point_json_binder
int mbs_info_ref_point_json_binder(MbsInfoRefPoint *mbs_info_ref_point, JsonNode *node, int mission)
Definition: mbs_load_json.c:899
json_mkstring
JsonNode * json_mkstring(const char *s)
Definition: json.c:514
get_ivec_1
int * get_ivec_1(int l_v)
create (with memory allocation) a vector (length l_v) of integers, starting at index 1
Definition: mbs_1D_array.c:571
mbs_info_update_shapes_json
int mbs_info_update_shapes_json(MbsLoader *mbs_loader, UpdateInline *up_in, UpdateShape *up_sh, int allow_new)
Update, or create this shape/inline and all next in the linked list.
Definition: mbs_load_json.c:4416
MbsInfoUserModel::parameter_list
MbsInfoParameter ** parameter_list
Definition: mbs_infos_struct.h:352
mbs_binder_public.h
This header defines MbsInfos loading/deleting functions.
MbsInfoBody::point_list
MbsInfoPoint ** point_list
Array of pointers to the MDS_point_strct describing each point of current body.
Definition: mbs_infos_struct.h:173
UpdateInline::next
struct UpdateInline * next
Pointer to next inline to be updated.
Definition: mbs_saver_struct.h:52
UpdateShape::height
double * height
Height, except for SHAPE_BOX and SHAPE_SPHERE, of the shape.
Definition: mbs_saver_struct.h:80
mbs_info_links3d_json_binder
int mbs_info_links3d_json_binder(MbsInfoLinks *mbs_info_links, JsonNode *node, int mission)
Definition: mbs_load_json.c:2381
mbs_new_info_user_IOs
MbsInfoUserIOs * mbs_new_info_user_IOs(void)
Definition: mbs_loader_public.c:1241
mbs_new_info_ball
MbsInfoBall * mbs_new_info_ball(void)
Definition: mbs_loader_public.c:853
UpdateInline::shape_name
char * shape_name
Name of the shape in the shape list.
Definition: mbs_saver_struct.h:31
json_delete
void json_delete(JsonNode *node)
Definition: json.c:407
MbsInfoBody::inertia
double * inertia
Array with the inertia tensor (Ixx, Ixy, Ixz, Iyy, Iyz, Izz) of the body relative to the center of ma...
Definition: mbs_infos_struct.h:170
json_get_body_3Dshapes
JsonNode * json_get_body_3Dshapes(JsonNode *body_node, int create, int *err)
Return the shapes array on the provided body node.
Definition: mbs_load_json.c:3961
mbs_info_user_models_json_binder
int mbs_info_user_models_json_binder(MbsInfoUserModels *ums_info, JsonNode *ums_node, int mission, int verbose)
Read or update the user models list json node with the infos.
Definition: mbs_load_json.c:1902
mbs_info_extforce_json_binder
int mbs_info_extforce_json_binder(MbsInfoExtforce *force_info, JsonNode *force_node, int mission)
Read or update a external force json node with the infos.
Definition: mbs_load_json.c:2604
json_find_element
JsonNode * json_find_element(JsonNode *array, int index)
Definition: json.c:448
MbsInfoJoint::actuated
int actuated
For inverse dynamic only: 1 if actuated, 0 otherwise.
Definition: mbs_infos_struct.h:140
MbsInfoExtforce::Pos
int Pos
1 if the computation of the sensor position has been asked, 0 otherwise.
Definition: mbs_infos_struct.h:87
mbs_info_init_and_binderJSON_rtn
JsonNode * mbs_info_init_and_binderJSON_rtn(MbsInfos *mbs_infos, const char *mbs_json_name, int *err, int mission, int verbose)
Init and bind the MBS information contained in the .json file.
Definition: mbs_load_json.c:91
SHAPE_INLINE
@ SHAPE_INLINE
Definition: mbs_saver_struct.h:18
MbsInfoExtforce::Jdqd
int Jdqd
1 if the computation of the sensor jdqd term has been asked, 0 otherwise. Mutually exclusive with Acc...
Definition: mbs_infos_struct.h:92
MbsInfoBall::name
char * name
Definition: mbs_infos_struct.h:210
mbs_info_cuts_json_binder
int mbs_info_cuts_json_binder(MbsInfoCuts *mbs_info_cuts, JsonNode *node, int mission)
Read or update the cuts list json node with the infos.
Definition: mbs_load_json.c:1109
find_joint_with_parent_in_joint_list
MbsInfoJoint * find_joint_with_parent_in_joint_list(MbsInfos *mbs_infos, char *jointname)
Definition: mbs_loader_public.c:1589
MbsInfos::sensor_list
MbsInfoSensor ** sensor_list
Pointer to a list of sensor.
Definition: mbs_infos_struct.h:474
MbsInfoParameter::type
int type
Type of the parameter between 1 and 7.
Definition: mbs_infos_struct.h:285
mbs_info_init_and_binderJSON
int mbs_info_init_and_binderJSON(MbsInfos *mbs_infos, const char *mbs_json_name, int mission, int verbose)
Init and bind the MBS information contained in the .json file.
Definition: mbs_load_json.c:21
mbs_adapt_joint_nature
int mbs_adapt_joint_nature(MbsInfoJoint *joint_info, int verbose)
Check the symbols definition and changes the nature to locked if compatible.
Definition: mbs_loader_public.c:1651
MbsInfoJoint::qd0
double qd0
Initial velocity of the joint.
Definition: mbs_infos_struct.h:137
MbsInfoSensor::joint_parent
char * joint_parent
parent joint of the current body (NULL if it is a parent point)
Definition: mbs_infos_struct.h:64
MbsInfoUserModel::description
char * description
Description of the user model.
Definition: mbs_infos_struct.h:350
MbsInfos::user_IOs
MbsInfoUserIOs * user_IOs
Definition: mbs_infos_struct.h:432
MbsInfoParameter
Description of a user model parameter loaded from the mbs file.
Definition: mbs_infos_struct.h:280
JsonNode
Definition: json.h:41
mbs_new_info_links
MbsInfoLinks * mbs_new_info_links(void)
Definition: mbs_loader_public.c:1039
MbsInfoSensor::Om
int Om
1 if the computation of the sensor angular velocity has been asked, 0 otherwise.
Definition: mbs_infos_struct.h:70
MbsInfoParameter::structure_header
char * structure_header
Header name with path (relative or absolute) of header describing a structure parameter.
Definition: mbs_infos_struct.h:334
mbs_msg_v
void mbs_msg_v(int v_opt, int v_lvl, const char *msg,...)
Send a message only of the message level is lower than the verbosity option.
Definition: mbs_message.c:143
MbsLoader
Definition: mbs_load_struct.h:93
MbsInfoParameter::val_ptr
void * val_ptr
Pointer to the memory storing the value.
Definition: mbs_infos_struct.h:305
json_is_on_base
int json_is_on_base(JsonNode *parent)
Check if a parent node (of body or joint) is the base.
Definition: mbs_load_json.c:3811
MbsInfoUserModel::n_parameter
int n_parameter
Definition: mbs_infos_struct.h:351
MbsInfoSensor::reference_joint
char * reference_joint
joint of the reference frame - relative sensor (NULL if the sensor is relative to the base)....
Definition: mbs_infos_struct.h:65
MbsInfoExtforce::Acc
int Acc
1 if the computation of the sensor linear acceleration has been asked, 0 otherwise....
Definition: mbs_infos_struct.h:91
MbsInfoSolid::endpoint2
MbsInfoRefPoint * endpoint2
Definition: mbs_infos_struct.h:240
mbs_info_tree_json_binder
int mbs_info_tree_json_binder(MbsInfos *mbs_infos, JsonNode *node, int mission)
Read or update the information from tree node to all MbsInfos.
Definition: mbs_load_json.c:750
MSG_PRE
#define MSG_PRE
Definition: mbs_load_json.c:17
mbs_json_info_to_loader
int mbs_json_info_to_loader(MbsLoader *mbs_loader, const char *filename)
Load and store the specified json file into the MbsLoader.
Definition: mbs_load_json.c:37
JsonNode::key
char * key
Definition: json.h:48
MbsInfoJoint::type
int type
Joint type: T1=1, T2=2, T3=3, R1=4, R2=5, R3=6.
Definition: mbs_infos_struct.h:133
mbs_new_info_extforce
MbsInfoExtforce * mbs_new_info_extforce(void)
Definition: mbs_loader_public.c:566
mbs_json_parent
int mbs_json_parent(JsonNode *node, MbsInfoRefPoint **point_parent, char **joint_parent, int mission, const char *key)
Link between a parent infomation and a parent node.
Definition: mbs_load_json.c:344
_MBS_ERR_LOW_NULL_PTR
#define _MBS_ERR_LOW_NULL_PTR
Low Level error number A called symbolic or user function is set to NULL;.
Definition: mbs_errors_names.h:142
mbs_info_ball_json_binder
int mbs_info_ball_json_binder(MbsInfoBall *ball_info, JsonNode *ball_node, int mission)
Read or update a ball json node with the infos.
Definition: mbs_load_json.c:960
UpdateShape::rotation
double * rotation
Rotation (around x, y, z) of the inline, Set to NULL to not update it.
Definition: mbs_saver_struct.h:87
json_get_shape
JsonNode * json_get_shape(JsonNode *shapes_node, char *shape_name, char *geometry, int allow_new, int *err)
Return the shape matching the name and geometry from the given list.
Definition: mbs_load_json.c:4041
count_json_elements
int count_json_elements(JsonNode *node)
Counts the number of element in the json node.
Definition: mbs_json.c:32
MbsInfoUserIOs
Definition: mbs_infos_struct.h:385
convert_dvec_1_to_0
double * convert_dvec_1_to_0(double *src, int size, int free_src)
Copy a dvec1 into a new allocated dvec0.
Definition: mbs_1D_array.c:1144
mbs_json_bool
int mbs_json_bool(JsonNode *node, int *val_ptr, char *key, int mission, int allow_missing)
Link between bool value (int) and the specific key of a Json node or the current node.
Definition: mbs_json.c:829
MbsInfoUserIO::name
char * name
Name of the user IO.
Definition: mbs_infos_struct.h:369
MbsInfoUserIOs::n_user_IO
int n_user_IO
Number of user IO in the system.
Definition: mbs_infos_struct.h:388
JSON_LOADED
@ JSON_LOADED
Definition: mbs_load_struct.h:91
UpdateShape::transparency
double transparency
Transparency (1 is invisible, 0 is fully visible) of the inline, Set to negative value to not update ...
Definition: mbs_saver_struct.h:89
json_get_body
JsonNode * json_get_body(JsonNode *bodies_node, char *body_name, int create, int *err)
Find the first body with matching name inside the bodies list.
Definition: mbs_load_json.c:3884
MbsInfoUserCstr::user_cstr_mat
int ** user_cstr_mat
Definition: mbs_infos_struct.h:402
UpdateInline::transparency
double transparency
Transparency (1 is invisible, 0 is fully visible) of the inline, Set to negative value to not update ...
Definition: mbs_saver_struct.h:44
json_get_basebody
JsonNode * json_get_basebody(JsonNode *bodies_node, int create, int *err)
Find the first body linked to the base inside the bodies list.
Definition: mbs_load_json.c:3828
MBS_INFO_INIT
#define MBS_INFO_INIT
Definition: mbs_define.h:27
MbsInfoUserCstr
Definition: mbs_infos_struct.h:398
mbs_load_struct.h
MbsInfoSolid::name
char * name
Definition: mbs_infos_struct.h:237
MSG_ERR
#define MSG_ERR
Definition: mbs_load_json.c:16
UpdateShape::shape_nature
ShapeIds shape_nature
Indicate if the shape is a box, cylinder, cone or sphere:
Definition: mbs_saver_struct.h:68
mbs_new_info_base
MbsInfoBase * mbs_new_info_base(void)
Definition: mbs_loader_public.c:656
mbs_info_json_linker
int mbs_info_json_linker(MbsInfos *mbs_info, int mission)
Definition: mbs_load_json.c:3249
mbs_info_point_list_json_binder
int mbs_info_point_list_json_binder(MbsInfoPoint ***point_list, JsonNode *node, int mission, char *body_name, int *n_point)
Link between points array value and all "points" key of a Json object node.
Definition: mbs_load_json.c:1262
MbsInfoJoint::parent
MbsInfoRefPoint * parent
Definition: mbs_infos_struct.h:150
mbs_info_body_json_binder
int mbs_info_body_json_binder(MbsInfoBody *mbs_info_body, JsonNode *node, int mission)
Read or update the information from body node to its MbsInfo.
Definition: mbs_load_json.c:524
SHAPE_BOX
@ SHAPE_BOX
Definition: mbs_saver_struct.h:14
MbsInfos::n_sensor
int n_sensor
Number of sensor in the model.
Definition: mbs_infos_struct.h:448
MbsInfoBodytree::body_list
MbsInfoBody ** body_list
Definition: mbs_infos_struct.h:180
mbs_info_update_shapes_json
int mbs_info_update_shapes_json(MbsLoader *mbs_loader, UpdateInline *up_in, UpdateShape *up_sh, int allow_new)
Update, or create this shape/inline and all next in the linked list.
Definition: mbs_load_json.c:4416
MbsInfoBody::n_point
int n_point
Number of point defined on the body.
Definition: mbs_infos_struct.h:172
MbsInfos::user_cstr
MbsInfoUserCstr * user_cstr
Definition: mbs_infos_struct.h:433
UpdateShape::radius
double * radius
Radius, except for SHAPE_BOX, of the shape. Set to NULL to not update it.
Definition: mbs_saver_struct.h:78
MbsInfoSensor::Pos
int Pos
1 if the computation of the sensor position has been asked, 0 otherwise.
Definition: mbs_infos_struct.h:67
MbsInfoBody
This structure contains all informations about a body.
Definition: mbs_infos_struct.h:158
mbs_new_info_ref_point
MbsInfoRefPoint * mbs_new_info_ref_point(void)
Definition: mbs_loader_public.c:504
JSON_STRING
@ JSON_STRING
Definition: json.h:33
UpdateInline::on_base
int on_base
True (1) if the shape is on the basebody.
Definition: mbs_saver_struct.h:27
mbs_info_sensor_json_binder
int mbs_info_sensor_json_binder(MbsInfoSensor *sensor_info, JsonNode *sensor_node, int mission)
Read or update a sensor json node with the infos.
Definition: mbs_load_json.c:2429
mbs_json_joint_nature
int mbs_json_joint_nature(JsonNode *nature_node, int *nature_int, int mission)
Read or update the information in an joint nature node with an integer.
Definition: mbs_load_json.c:3627
mbs_info_point_json_binder
int mbs_info_point_json_binder(MbsInfoPoint *mbs_info_point, JsonNode *node, int mission)
Definition: mbs_load_json.c:1493
convert_dvec_0_to_1
double * convert_dvec_0_to_1(double *src, int size, int free_src)
Copy a dvec0 into a new allocated dvec1.
Definition: mbs_1D_array.c:1128
MbsInfoPoint::extforce
MbsInfoExtforce * extforce
Pointer to an external force sensor structure if it is defined on the point.
Definition: mbs_infos_struct.h:108
json_get_body_3Dshapes
JsonNode * json_get_body_3Dshapes(JsonNode *body_node, int create, int *err)
Return the shapes array on the provided body node.
Definition: mbs_load_json.c:3961
MbsLoader::mbs_infos
MbsInfos * mbs_infos
Contains the multibody structure with more informations than used by computation.
Definition: mbs_load_struct.h:99
MbsInfoParameter::string_name
char * string_name
Pointer containing the string name (if type is 8). NULL otherwise.
Definition: mbs_infos_struct.h:303
mbs_info_json_binder
int mbs_info_json_binder(MbsInfos *mbs_infos, JsonNode *root_node, int mission, int verbose)
Read or update the information from root node to all MbsInfo.
Definition: mbs_load_json.c:138
mbs_info_user_models_json_binder
int mbs_info_user_models_json_binder(MbsInfoUserModels *ums_info, JsonNode *ums_node, int mission, int verbose)
Read or update the user models list json node with the infos.
Definition: mbs_load_json.c:1902
load_and_create_json
JsonNode * load_and_create_json(const char *mbs_json_filename, int *err)
Definition: mbs_json.c:116
MbsInfos::links
MbsInfoLinks * links
Definition: mbs_infos_struct.h:430
mbs_info_user_IOs_json_binder
int mbs_info_user_IOs_json_binder(MbsInfoUserIOs *mbs_info_user_IOs, JsonNode *node, int mission, int verbose)
Read the user Input output variables list json node with the infos.
Definition: mbs_load_json.c:2045
mbs_message.h
mbs_info_cuts_json_binder
int mbs_info_cuts_json_binder(MbsInfoCuts *cuts_info, JsonNode *cuts_node, int mission)
Read or update the cuts list json node with the infos.
Definition: mbs_load_json.c:1109
MbsInfoSensor::name
char * name
Name of the sensor.
Definition: mbs_infos_struct.h:62
mbs_json_string
int mbs_json_string(JsonNode *node, char **str_ptr, const char *key, int mission, int allow_missing)
Link between string value and the specific key of a Json node.
Definition: mbs_json.c:432
ShapeIds
ShapeIds
Definition: mbs_saver_struct.h:12
MbsInfoUserCstr::constr_process
int constr_process
Definition: mbs_infos_struct.h:401
json_find_member
JsonNode * json_find_member(JsonNode *object, const char *name)
Definition: json.c:465
MbsInfoCuts::n_solid
int n_solid
Definition: mbs_infos_struct.h:250
get_ivec_0
int * get_ivec_0(int l_v)
create (with memory allocation) a vector (length l_v) of integers, starting at index 0....
Definition: mbs_1D_array.c:555
MbsInfoUserIO
Definition: mbs_infos_struct.h:366
UpdateInline::visible
int visible
Flag to show the shape (1) or hide it (0). Set to -1 to not update it.
Definition: mbs_saver_struct.h:50
MbsInfoBody::joint_parent
char * joint_parent
parent joint of the current body (NULL if it is a parent point)
Definition: mbs_infos_struct.h:163
MbsInfoRod
Definition: mbs_infos_struct.h:219
MbsInfoParameter::n_value
int n_value
Number of values in the parameter.
Definition: mbs_infos_struct.h:297
MbsInfoUserModels::n_user_model
int n_user_model
Definition: mbs_infos_struct.h:358
MbsInfoBody::com
double * com
Array with the coordinate (x, y, z) of the center of mass of the body relative to the origin of the b...
Definition: mbs_infos_struct.h:169
MbsInfoSensor
This structure contains all information about a sensor defined on the MBS structure.
Definition: mbs_infos_struct.h:60
json_is_on_base
int json_is_on_base(JsonNode *parent)
Check if a parent node (of body or joint) is the base.
Definition: mbs_load_json.c:3811
mbs_info_parameter_json_binder
int mbs_info_parameter_json_binder(MbsInfoParameter *param_info, JsonNode *param_node, int mission, int verbose)
Read or update a user model parameter json node with the infos.
Definition: mbs_load_json.c:1541
MbsInfoJoint::symb_q
int symb_q
Flag to generate symbol for position.
Definition: mbs_infos_struct.h:146
MbsInfoParameter::structure_lutfile
char * structure_lutfile
File and path (relative or absolute) to the file containing the Look-up-Table dats.
Definition: mbs_infos_struct.h:341
_MBS_ERR_MOD_SPEC_18
#define _MBS_ERR_MOD_SPEC_18
Genericerror number Module specific errors range from -11 to -19 please read the error message an...
Definition: mbs_errors_names.h:214
UpdateShape
Define modifications to be done on a basic shape.
Definition: mbs_saver_struct.h:59
mbs_info_coordinates_json_binder
int mbs_info_coordinates_json_binder(double *coordinates_pointer, JsonNode *node, int mission)
Definition: mbs_load_json.c:919
MbsInfoJoint::nature
int nature
Nature of the joint: independent=1, dependent=2, driven=3, locked=4.
Definition: mbs_infos_struct.h:134
MbsInfoBase
Structure handling the informations defined on the base of the MBS.
Definition: mbs_infos_struct.h:119
MbsInfoSensor::Rot
int Rot
1 if the computation of the sensor rotation matrix has been asked, 0 otherwise.
Definition: mbs_infos_struct.h:68
mbs_json_info_to_loader
int mbs_json_info_to_loader(MbsLoader *mbs_loader, const char *filename)
Load and store the specified json file into the MbsLoader.
Definition: mbs_load_json.c:37
mbs_json_inertia
int mbs_json_inertia(JsonNode *bdy_node, MbsInfoBody *mbs_info_body, int mission)
Translate the inertia key of a node from array (3,3) in node to array (6) in info.
Definition: mbs_load_json.c:3698
MBS_INFO_CMP
#define MBS_INFO_CMP
Definition: mbs_define.h:28
mbs_new_info_point
MbsInfoPoint * mbs_new_info_point(void)
Definition: mbs_loader_public.c:595
MbsInfoPoint
This structure handle everything that a point on a MBS structure can handle (sensor,...
Definition: mbs_infos_struct.h:101
MbsInfos::n_joint
int n_joint
Number of joints in the model
Definition: mbs_infos_struct.h:472
MBS_VERBOSE_WARNING
#define MBS_VERBOSE_WARNING
Definition: mbs_define.h:46
SHAPE_CONE
@ SHAPE_CONE
Definition: mbs_saver_struct.h:16
JsonNode::tag
JsonTag tag
Definition: json.h:50
MbsInfoRefPoint::pointname
char * pointname
Name of the reference point on the previous body.
Definition: mbs_infos_struct.h:53
MbsInfoRod::endpoint1
MbsInfoRefPoint * endpoint1
Definition: mbs_infos_struct.h:223
json_get_shape
JsonNode * json_get_shape(JsonNode *shapes_node, char *shape_name, char *geometry, int allow_new, int *err)
Return the shape matching the name and geometry from the given list.
Definition: mbs_load_json.c:4041
mbs_tree_cleaner
int mbs_tree_cleaner(MbsInfos *mbs_info, int mission)
Correct the parents of joints.
Definition: mbs_load_json.c:3072
mbs_free
void * mbs_free(void *__ptr)
Free the pointor ptr and set it to NULL.
Definition: useful_functions.c:21
MbsInfoJoint::children_body
MbsInfoBody * children_body
Body direct children of the joint.
Definition: mbs_infos_struct.h:152
MbsInfoCuts::solid_list
MbsInfoSolid ** solid_list
Definition: mbs_infos_struct.h:254
mbs_json_get_double
int mbs_json_get_double(JsonNode *node, double *val_ptr)
Get the node value content a double.
Definition: mbs_json.c:342
mbs_info_user_cstr_json_binder
int mbs_info_user_cstr_json_binder(MbsInfoUserCstr *mbs_info_user_cstr, JsonNode *node, int mission)
Definition: mbs_load_json.c:2113
mbs_info_extforces_json_binder
int mbs_info_extforces_json_binder(MbsInfos *mbs_info, JsonNode *forces_node, int mission)
Read or update a external forces list json node with the infos.
Definition: mbs_load_json.c:2685
MbsInfoSolid::endpoint1
MbsInfoRefPoint * endpoint1
Definition: mbs_infos_struct.h:239
MbsInfos::bodytree
MbsInfoBodytree * bodytree
Definition: mbs_infos_struct.h:428
json_get_body
JsonNode * json_get_body(JsonNode *bodies_node, char *body_name, int create, int *err)
Find the first body with matching name inside the bodies list.
Definition: mbs_load_json.c:3884
json_append_member
void json_append_member(JsonNode *object, const char *key, JsonNode *value)
Definition: json.c:584
UpdateShape::scale
double * scale
Scale (x, y, z) of the shape, Set to NULL to not update it.
Definition: mbs_saver_struct.h:85
mbs_info_ref_point_json_binder
int mbs_info_ref_point_json_binder(MbsInfoRefPoint *mbs_info_ref_point, JsonNode *node, int mission)
Definition: mbs_load_json.c:899
UpdateShape::position
double * position
Position (x, y, z) of the shape, Set to NULL to not update it.
Definition: mbs_saver_struct.h:83
MbsLoadOptions::verbose
int verbose
Verbosity level (not yet implemented everywhere): Verbosity level propagated to other compatible modu...
Definition: mbs_load_struct.h:39
MbsInfoRod::length
double length
Definition: mbs_infos_struct.h:226
free_ivec_1
void free_ivec_1(int *vec)
release memory for a vector of integers, starting with index 1
Definition: mbs_1D_array.c:595
json.h
mbs_json_set_string
int mbs_json_set_string(JsonNode *node, const char *string)
Set a char into a node.
Definition: mbs_json.c:561
MbsInfoUserModels::user_model_list
MbsInfoUserModel ** user_model_list
Definition: mbs_infos_struct.h:359
mbs_info_links3d_json_binder
int mbs_info_links3d_json_binder(MbsInfoLinks *mbs_info_links, JsonNode *node, int mission)
Definition: mbs_load_json.c:2381
mbs_new_info_user_model
MbsInfoUserModel * mbs_new_info_user_model(void)
Definition: mbs_loader_public.c:1154
SHAPE_CYLINDER
@ SHAPE_CYLINDER
Definition: mbs_saver_struct.h:15
MbsInfoCuts::ball_list
MbsInfoBall ** ball_list
Definition: mbs_infos_struct.h:252
mbs_new_info_cuts
MbsInfoCuts * mbs_new_info_cuts(void)
Definition: mbs_loader_public.c:956
MbsInfoBall
Definition: mbs_infos_struct.h:208
mbs_info_extforce_json_binder
int mbs_info_extforce_json_binder(MbsInfoExtforce *mbs_info_extf, JsonNode *node, int mission)
Read or update a external force json node with the infos.
Definition: mbs_load_json.c:2604
MbsInfoBody::joint_list
MbsInfoJoint ** joint_list
Array of pointers to the MDS_joint_strct describing each joint leaving the body.
Definition: mbs_infos_struct.h:166
MbsInfoSensor::parent_point
MbsInfoRefPoint * parent_point
parent point of the sensor (NULL if it is a parent joint)
Definition: mbs_infos_struct.h:63
mbs_info_user_IO_json_binder
int mbs_info_user_IO_json_binder(MbsInfoUserIO *mbs_info_user_IO, JsonNode *node, int mission)
Definition: mbs_load_json.c:1997
MbsInfoExtforce::Rot
int Rot
1 if the computation of the sensor rotation matrix has been asked, 0 otherwise.
Definition: mbs_infos_struct.h:88
mbs_json_double
int mbs_json_double(JsonNode *node, double *val_ptr, char *key, int mission, int allow_missing)
Link between double value and the specific key of a Json node or the current node.
Definition: mbs_json.c:286
get_dvec_1
double * get_dvec_1(int l_v)
create (with memory allocation) a vector (length l_v) of doubles, starting at index 1
Definition: mbs_1D_array.c:1071
mbs_new_info_user_models
MbsInfoUserModels * mbs_new_info_user_models(void)
Definition: mbs_loader_public.c:1188
MbsInfoParameter::description
char * description
Description of the parameter in the user model.
Definition: mbs_infos_struct.h:283
MbsInfoBodytree::n_body
int n_body
Definition: mbs_infos_struct.h:179
SHAPE_NONE
@ SHAPE_NONE
Definition: mbs_saver_struct.h:13
free_dvec_0
void free_dvec_0(double *vec)
release memory for a vector of doubles, starting at index 0
Definition: mbs_1D_array.c:1090
MbsLoader::loaded_nature
int loaded_nature
Flag to specifying either if the deep mbs file specific structure must be kept in memory (before load...
Definition: mbs_load_struct.h:119
MbsInfoRod::endpoint2
MbsInfoRefPoint * endpoint2
Definition: mbs_infos_struct.h:224
MBS_INFO_SUCCESS
#define MBS_INFO_SUCCESS
Definition: mbs_define.h:30
UpdateShape::shape_name
char * shape_name
Name of the shape in the shape list.
Definition: mbs_saver_struct.h:65
MbsInfos::user_models
MbsInfoUserModels * user_models
Definition: mbs_infos_struct.h:431
MbsInfoJoint::q0
double q0
Initial position of the joint.
Definition: mbs_infos_struct.h:136
UpdateShape::next
struct UpdateShape * next
Pointer to next shape to be updated.
Definition: mbs_saver_struct.h:94
MBS_INFO_READER
#define MBS_INFO_READER
Definition: mbs_define.h:23
mbs_saver_struct.h
Declare saver structure and enumeration.
mbs_info_point_json_binder
int mbs_info_point_json_binder(MbsInfoPoint *mbs_info_point, JsonNode *node, int mission)
Definition: mbs_load_json.c:1493
JsonNode::string_
char * string_
Definition: json.h:56
mbs_info_json_binder
int mbs_info_json_binder(MbsInfos *mbs_infos, JsonNode *root_node, int mission, int verbose)
Read or update the information from root node to all MbsInfo.
Definition: mbs_load_json.c:138
mbs_body_joint_recursive_linker
int mbs_body_joint_recursive_linker(MbsInfos *mbs_info, int *ind_body_joint, int mission, int body_index)
Definition: mbs_load_json.c:3035
MbsInfoJoint::symb_qdd
int symb_qdd
Flag to generate symbol for acceleration.
Definition: mbs_infos_struct.h:148
json_append_element
void json_append_element(JsonNode *array, JsonNode *element)
Definition: json.c:568
mbs_info_user_IOs_json_binder
int mbs_info_user_IOs_json_binder(MbsInfoUserIOs *mbs_info_user_IOs, JsonNode *node, int mission, int verbose)
Read the user Input output variables list json node with the infos.
Definition: mbs_load_json.c:2045
JSON_ARRAY
@ JSON_ARRAY
Definition: json.h:35
MbsInfos::extforce_list
MbsInfoExtforce ** extforce_list
Pointer to a list of external force sensor
Definition: mbs_infos_struct.h:476
MbsInfoBase::base_body_name
char * base_body_name
baseBodyName as defined in the base body in mbs/json file
Definition: mbs_infos_struct.h:124
JsonNode::parent
JsonNode * parent
Definition: json.h:44
UpdateInline::body_name
char * body_name
Name of the body with the shape, disregarded if on_base is true.
Definition: mbs_saver_struct.h:29
MbsInfoUserModel::name
char * name
Definition: mbs_infos_struct.h:349
MbsInfoExtforce::Jac
int Jac
1 if the computation of the sensor Jacobian ( ) has been asked, 0 otherwise.
Definition: mbs_infos_struct.h:94
MbsInfoJoint::joint_parent
char * joint_parent
Definition: mbs_infos_struct.h:151
MbsInfoBody::name
char * name
Name of the body.
Definition: mbs_infos_struct.h:160
mbs_info_ball_json_binder
int mbs_info_ball_json_binder(MbsInfoBall *mbs_info_ball, JsonNode *node, int mission)
Read or update a ball json node with the infos.
Definition: mbs_load_json.c:960
MBS_INFO_COUNTER
#define MBS_INFO_COUNTER
Definition: mbs_define.h:26
MbsInfoParameter::flag_PRJPATH
int flag_PRJPATH
Flag to indicate that the path to the data file start from the project path (stored as "PRJPATH" in m...
Definition: mbs_infos_struct.h:339
mbs_json_parent
int mbs_json_parent(JsonNode *node, MbsInfoRefPoint **point_parent, char **joint_parent, int mission, const char *key)
Link between a parent infomation and a parent node.
Definition: mbs_load_json.c:344
mbs_info_joints_list_json_binder
int mbs_info_joints_list_json_binder(MbsInfos *mbs_infos, JsonNode *joints_node, int mission)
To Be Defined.
Definition: mbs_load_json.c:2963
MBS_INFO_WARNING
#define MBS_INFO_WARNING
Definition: mbs_define.h:31
UpdateShape::body_name
char * body_name
Name of the body with the shape, disregarded if on_base is true.
Definition: mbs_saver_struct.h:63
MbsInfoSensor::Jdqd
int Jdqd
1 if the computation of the sensor jdqd term has been asked, 0 otherwise. Mutually exclusive with Acc...
Definition: mbs_infos_struct.h:72
JsonNode::number_
double number_
Definition: json.h:59
MbsInfos::mbsname
char * mbsname
Name of the project in the multibody system file.
Definition: mbs_infos_struct.h:438
MbsInfos::padversion
char * padversion
Version number of the MBsysPAD that last modified the file.
Definition: mbs_infos_struct.h:440
MbsInfos::n_extforce
int n_extforce
Number of external force in the model.
Definition: mbs_infos_struct.h:453
UpdateShape::size
double * size
Size, SHAPE_BOX only, along x, y, z. Set to NULL to not update it.
Definition: mbs_saver_struct.h:76
UpdateInline
Define modification to be done on a inline.
Definition: mbs_saver_struct.h:25
mbs_new_info_link
MbsInfoLink * mbs_new_info_link(void)
Definition: mbs_loader_public.c:1009
mbs_json_array
int mbs_json_array(JsonNode *node, double **tab_ptr, int *size, const char *key, int mission, int allow_missing)
Link an array (1D) value and the specific key of a Json node or the current node.
Definition: mbs_json.c:597
MbsInfoBody::point_parent
MbsInfoRefPoint * point_parent
Description of the parent point of the current body. (NULL if it is a parent joint)
Definition: mbs_infos_struct.h:162
mbs_info_coordinates_json_binder
int mbs_info_coordinates_json_binder(double *coordinates_pointer, JsonNode *node, int mission)
Definition: mbs_load_json.c:919
MbsInfoUserIOs::n_in
int n_in
Number of INPUT user IO in the system.
Definition: mbs_infos_struct.h:390
json_get_basebody
JsonNode * json_get_basebody(JsonNode *bodies_node, int create, int *err)
Find the first body linked to the base inside the bodies list.
Definition: mbs_load_json.c:3828
mbs_info_synch_shape
int mbs_info_synch_shape(JsonNode *shape, UpdateInline *up_in, UpdateShape *up_sh)
Synchronize, or fill with default value, a shape Json object node.
Definition: mbs_load_json.c:4139
mbs_info_solid_json_binder
int mbs_info_solid_json_binder(MbsInfoSolid *solid_info, JsonNode *solid_node, int mission)
Read or update a solid cut json node with the infos.
Definition: mbs_load_json.c:1062
mbs_new_info_rod
MbsInfoRod * mbs_new_info_rod(void)
Definition: mbs_loader_public.c:885
SHAPE_SPHERE
@ SHAPE_SPHERE
Definition: mbs_saver_struct.h:17
count_json_array_elements
int count_json_array_elements(JsonNode *node)
Counts the number of element in the Json array.
Definition: mbs_json.c:18
mbs_info_parameter_json_binder
int mbs_info_parameter_json_binder(MbsInfoParameter *mbs_info_parameter, JsonNode *node, int mission, int verbose)
Read or update a user model parameter json node with the infos.
Definition: mbs_load_json.c:1541
mbs_json.h
MbsInfoUserModels
Definition: mbs_infos_struct.h:356
mbs_info_joint_json_binder
int mbs_info_joint_json_binder(MbsInfoJoint *joint_info, JsonNode *joint_node, int mission, int verbose)
Read or update the information in joints node to MbsInfoBase, MbsInfoJoints.
Definition: mbs_load_json.c:2770
MbsInfoSensor::Omp
int Omp
1 if the computation of the sensor angular acceleration has been asked, 0 otherwise.
Definition: mbs_infos_struct.h:73
mbs_info_point_list_json_binder
int mbs_info_point_list_json_binder(MbsInfoPoint ***point_list, JsonNode *node, int mission, char *body_name, int *n_point)
Link between points array value and all "points" key of a Json object node.
Definition: mbs_load_json.c:1262
mbs_info_rod_json_binder
int mbs_info_rod_json_binder(MbsInfoRod *rod_info, JsonNode *rod_node, int mission)
Read or update a rod json node with the infos.
Definition: mbs_load_json.c:1007
mbs_info_tree_json_binder
int mbs_info_tree_json_binder(MbsInfos *mbs_infos, JsonNode *tree_node, int mission)
Read or update the information from tree node to all MbsInfos.
Definition: mbs_load_json.c:750
json_mknumber
JsonNode * json_mknumber(double n)
Definition: json.c:519
MbsInfoJoint::symb_qd
int symb_qd
Flag to generate symbol for velocity.
Definition: mbs_infos_struct.h:147
mbs_errors_names.h
MbsInfoSensor::Vit
int Vit
1 if the computation of the sensor linear velocity has been asked, 0 otherwise.
Definition: mbs_infos_struct.h:69
MbsInfos::all_joint_list
MbsInfoJoint ** all_joint_list
Ordered list of all joints in the model
Definition: mbs_infos_struct.h:470
MbsInfoExtforce
This structure contains all information about an external force sensor defined on the MBS structure.
Definition: mbs_infos_struct.h:81
UpdateInline::shape_url
char * shape_url
Path to the shape file.
Definition: mbs_saver_struct.h:34
MbsInfoSensor::Jac
int Jac
1 if the computation of the sensor Jacobian ( ) has been asked, 0 otherwise.
Definition: mbs_infos_struct.h:74
MbsInfoBody::n_joint
int n_joint
Number of joints leaving the body.
Definition: mbs_infos_struct.h:165