|
Robotran C Documentation
|
Go to the documentation of this file.
8 #ifndef MBS_LOAD_JSON_h
9 #define MBS_LOAD_JSON_h
293 int mission,
int verbose);
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:2241
int n_rod
Definition: mbs_binder_public.h:252
MbsInfoRefPoint * endpoint1
Definition: mbs_binder_public.h:215
MbsInfoCuts * cuts
Definition: mbs_binder_public.h:432
#define MBS_BASENAME
Definition: mbs_define.h:36
JsonNode * mbs_info_init_and_binderJSON_rtn(MbsInfos *mbs_infos, const char *mbs_json_name, int *err, int mission)
Init and bind the MBS information contained in the .json file Returns a newly allocated JsonNode....
Definition: mbs_load_json.c:29
int mbs_info_init_and_binderJSON(MbsInfos *mbs_infos, const char *mbs_json_name, int mission)
Init and bind the MBs information contained in the .json file It calls mbs_info_init_and_binderJSON_r...
Definition: mbs_load_json.c:17
#define MBS_INFO_UPDATER
Definition: mbs_define.h:24
double * pt
Array with the coordinates (x, y, z) of the point relative to the origin of the body expressed in the...
Definition: mbs_binder_public.h:108
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:840
char * name
Definition: mbs_binder_public.h:86
MbsInfoBody * mbs_new_info_body(void)
Definition: mbs_loader_public.c:719
char * structure_name
Name of the structure, filled if the parameter is a structure.
Definition: mbs_binder_public.h:335
int Vit
1 if the computation of the sensor linear velocity has been asked, 0 otherwise.
Definition: mbs_binder_public.h:92
MbsInfoRefPoint * endpoint2
Definition: mbs_binder_public.h:216
#define MBS_INFO_FAILURE
Definition: mbs_define.h:31
Definition: mbs_binder_public.h:180
void mbs_msg(const char *msg,...)
Send a message.
Definition: mbs_message.c:87
char * bodyname
Name of the body that bear the reference point (origin of the joint chain until first body encounter)...
Definition: mbs_binder_public.h:55
int verbose
Verbosity level (not yet implemented everywhere):
Definition: mbs_binder_public.h:488
char * name
Definition: mbs_binder_public.h:224
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:566
char * get_char_cpy(const char *fmt,...)
Copy the provided formatted string into a newly allocated memory.
Definition: useful_functions.c:196
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:1759
double * value_list
Vector (index starting at 1) containing the values retrieved from the multibody file.
Definition: mbs_binder_public.h:302
int mbs_info_user_models_json_binder(MbsInfoUserModels *mbs_info_user_models, JsonNode *node, int mission)
Read or update the user models list json node with the infos.
Definition: mbs_load_json.c:1481
int mbs_info_user_IOs_json_binder(MbsInfoUserIOs *mbs_info_user_IOs, JsonNode *node, int mission)
Definition: mbs_load_json.c:1618
char * name
Name of the parameter in the user model.
Definition: mbs_binder_public.h:285
int mbs_info_json_binder(MbsInfos *mbs_infos, JsonNode *node, int mission)
Read or update the information from root node to all MbsInfo.
Definition: mbs_load_json.c:75
int n_out
Number of OUTPUT user IO in the system.
Definition: mbs_binder_public.h:395
MbsInfoBodytree * mbs_new_info_bodytree(void)
Definition: mbs_loader_public.c:775
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:227
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:3107
Structure defining the parent point of a body.
Definition: mbs_binder_public.h:53
double qdd0
Initial acceleration of the joint.
Definition: mbs_binder_public.h:141
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:785
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:1890
struct JsonNode::@9::@11 children
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_binder_public.h:88
MbsInfoBase * base
Definition: mbs_binder_public.h:430
int mbs_info_joints_list_json_binder(MbsInfos *mbs_infos, JsonNode *joints_node, int mission)
To Be Defined.
Definition: mbs_load_json.c:2519
int n_base_point
Number of point of interest (extremities of joint bearing a sensor plus anchor point) defined on the ...
Definition: mbs_binder_public.h:125
char * body_name
Name of the body holding the point.
Definition: mbs_binder_public.h:107
MbsInfoSolid * mbs_new_info_solid(void)
Definition: mbs_loader_public.c:906
void mbs_error_msg(int err, const char *msg,...)
Send an error message.
Definition: mbs_message.c:131
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:955
#define _MBS_ERR_LOW_FILES
Low Level error number Error during opening/writing files = -9.
Definition: mbs_errors_names.h:157
MbsInfoUserIO ** user_IO_list
The detail of each user IO in the system.
Definition: mbs_binder_public.h:397
MbsInfoUserCstr * mbs_new_info_user_cstr(void)
Definition: mbs_loader_public.c:1239
This structure contains all informations about a joint.
Definition: mbs_binder_public.h:133
Definition: mbs_binder_public.h:249
int mbs_json_get_string(JsonNode *node, char **str_ptr)
Get the node value content a double.
Definition: mbs_json.c:329
int mbs_info_parameter_json_binder(MbsInfoParameter *mbs_info_parameter, JsonNode *node, int mission)
Read or update a user model parameter json node with the infos.
Definition: mbs_load_json.c:1202
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:1890
void free_ivec_0(int *vec)
release memory for a vector of integers, starting with index 0
Definition: mbs_1D_array.c:490
int mbs_info_bodies_json_binder(MbsInfos *mbs_infos, JsonNode *bdies_node, int mission)
Definition: mbs_load_json.c:464
#define json_foreach(i, object_or_array)
Definition: json.h:100
int Omp
1 if the computation of the sensor angular acceleration has been asked, 0 otherwise.
Definition: mbs_binder_public.h:96
int Om
1 if the computation of the sensor angular velocity has been asked, 0 otherwise.
Definition: mbs_binder_public.h:93
int mbs_strcmp(const char *__s1, const char *__s2)
Compare two char with strcmp.
Definition: useful_functions.c:388
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:2075
int n_usercstr
Definition: mbs_binder_public.h:403
void free_dmat_0(double **mat)
release memory for a matrix of doubles, starting at index 0
Definition: mbs_matrix.c:332
MbsInfoRefPoint * parent_point
parent point of the sensor (NULL if it is a parent joint)
Definition: mbs_binder_public.h:87
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:3178
double * gravity
Array with the component (x, y, z) of the gravity vector expressed in the inertial frame.
Definition: mbs_binder_public.h:124
int mbs_info_user_IO_json_binder(MbsInfoUserIO *mbs_info_user_IO, JsonNode *node, int mission)
Definition: mbs_load_json.c:1573
int n_ball
Definition: mbs_binder_public.h:251
JsonNode * prev
Definition: json.h:45
double mass
Mass of the body.
Definition: mbs_binder_public.h:171
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.
MbsInfoParameter * mbs_new_info_parameter(void)
Definition: mbs_loader_public.c:1066
int mbs_info_init_and_binderJSON(MbsInfos *mbs_infos, const char *mbs_json_name, int mission)
Init and bind the MBs information contained in the .json file It calls mbs_info_init_and_binderJSON_r...
Definition: mbs_load_json.c:17
MbsInfoSensor * mbs_new_info_sensor(void)
Definition: mbs_loader_public.c:518
@ JSON_OBJECT
Definition: json.h:36
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:2075
int size
Number of values in the user IO.
Definition: mbs_binder_public.h:378
int Acc
1 if the computation of the sensor linear acceleration has been asked, 0 otherwise....
Definition: mbs_binder_public.h:74
void mbs_warning_msg(const char *msg,...)
Send a warning message.
Definition: mbs_message.c:100
int mbs_body_joint_recursive_linker(MbsInfos *mbs_info, int *ind_body_joint, int mission, int body_index)
Definition: mbs_load_json.c:2586
Definition: mbs_binder_public.h:428
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:1759
This header includes the functions to bind the JSON information to the MbsInfos structure.
int type
Nature of the user IO:
Definition: mbs_binder_public.h:376
JsonNode * next
Definition: json.h:45
char * name
Name of the point.
Definition: mbs_binder_public.h:106
char * name
Definition: mbs_binder_public.h:263
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:3249
MbsInfoSensor * sensor
Pointer to a sensor structure if a sensor is defined on the point.
Definition: mbs_binder_public.h:110
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:1985
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:3107
int mbs_info_json_linker(MbsInfos *mbs_info, int mission)
Definition: mbs_load_json.c:2800
int mbs_tree_cleaner(MbsInfos *mbs_info, int mission)
Correct the parents of joints.
Definition: mbs_load_json.c:2623
int mbs_info_base_json_binder(MbsInfoBase *mbs_info_base, JsonNode *base_node, int mission)
Binders /////////////////////////////.
Definition: mbs_load_json.c:227
MbsInfoPoint ** base_point_list
Array of pointers to the MDS_point_strct describing each point of the MBS.
Definition: mbs_binder_public.h:126
int mbs_info_user_cstr_json_binder(MbsInfoUserCstr *mbs_info_user_cstr, JsonNode *node, int mission)
Definition: mbs_load_json.c:1672
char * name
Name of the joint.
Definition: mbs_binder_public.h:135
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
Definition: mbs_matrix.c:277
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:2326
#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
Definition: mbs_binder_public.h:238
MbsInfoUserIO * mbs_new_info_user_IO(void)
Definition: mbs_loader_public.c:1204
MbsInfoJoint * mbs_new_info_joint(void)
Definition: mbs_loader_public.c:674
MbsInfoRod ** rod_list
Definition: mbs_binder_public.h:256
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:385
Definition: mbs_binder_public.h:350
int mbs_info_ref_point_json_binder(MbsInfoRefPoint *mbs_info_ref_point, JsonNode *node, int mission)
Definition: mbs_load_json.c:677
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:479
MbsInfoParameter ** parameter_list
Definition: mbs_binder_public.h:355
This header defines MbsInfos (and its substructures) as well as the loading/deleting functions.
MbsInfoPoint ** point_list
Array of pointers to the MDS_point_strct describing each point of current body.
Definition: mbs_binder_public.h:176
MbsInfoRefPoint * endpoint1
Definition: mbs_binder_public.h:265
int mbs_info_links3d_json_binder(MbsInfoLinks *mbs_info_links, JsonNode *node, int mission)
Definition: mbs_load_json.c:1937
MbsInfoUserIOs * mbs_new_info_user_IOs(void)
Definition: mbs_loader_public.c:1224
MbsInfoBall * mbs_new_info_ball(void)
Definition: mbs_loader_public.c:836
double * inertia
Array with the inertia tensor (Ixx, Ixy, Ixz, Iyy, Iyz, Izz) of the body relative to the center of ma...
Definition: mbs_binder_public.h:173
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:2160
int actuated
For inverse dynamic only: 1 if actuated, 0 otherwise.
Definition: mbs_binder_public.h:143
int Pos
1 if the computation of the sensor position has been asked, 0 otherwise.
Definition: mbs_binder_public.h:90
int Jdqd
1 if the computation of the sensor jdqd term has been asked, 0 otherwise. Mutually exclusive with Acc...
Definition: mbs_binder_public.h:95
char * name
Definition: mbs_binder_public.h:213
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:887
MbsInfoJoint * find_joint_with_parent_in_joint_list(MbsInfos *mbs_infos, char *jointname)
Definition: mbs_loader_public.c:1572
MbsInfoSensor ** sensor_list
Pointer to a list of sensor.
Definition: mbs_binder_public.h:477
int type
Type of the parameter between 1 and 7.
Definition: mbs_binder_public.h:288
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:1634
double qd0
Initial velocity of the joint.
Definition: mbs_binder_public.h:140
char * joint_parent
parent joint of the current body (NULL if it is a parent point)
Definition: mbs_binder_public.h:67
char * description
Description of the user model.
Definition: mbs_binder_public.h:353
MbsInfoUserIOs * user_IOs
Definition: mbs_binder_public.h:435
Description of a user model parameter loaded from the mbs file.
Definition: mbs_binder_public.h:283
MbsInfoLinks * mbs_new_info_links(void)
Definition: mbs_loader_public.c:1022
int Om
1 if the computation of the sensor angular velocity has been asked, 0 otherwise.
Definition: mbs_binder_public.h:73
char * structure_header
Header name with path (relative or absolute) of header describing a structure parameter.
Definition: mbs_binder_public.h:337
void * val_ptr
Pointer to the memory storing the value.
Definition: mbs_binder_public.h:308
int n_parameter
Definition: mbs_binder_public.h:354
char * reference_joint
joint of the reference frame - relative sensor (NULL if the sensor is relative to the base)....
Definition: mbs_binder_public.h:68
int Acc
1 if the computation of the sensor linear acceleration has been asked, 0 otherwise....
Definition: mbs_binder_public.h:94
MbsInfoRefPoint * endpoint2
Definition: mbs_binder_public.h:243
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:554
char * key
Definition: json.h:48
int type
Joint type: T1=1, T2=2, T3=3, R1=4, R2=5, R3=6.
Definition: mbs_binder_public.h:136
MbsInfoExtforce * mbs_new_info_extforce(void)
Definition: mbs_loader_public.c:549
int mbs_json_parent(JsonNode *node, MbsInfoRefPoint **point_parent, char **joint_parent, int mission, const char *key)
Definition: mbs_load_json.c:257
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:738
int count_json_elements(JsonNode *node)
Counts the number of element in the json node.
Definition: mbs_json.c:28
Definition: mbs_binder_public.h:388
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:1025
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:644
int mbs_info_parameter_json_binder(MbsInfoParameter *param_info, JsonNode *param_node, int mission)
Read or update a user model parameter json node with the infos.
Definition: mbs_load_json.c:1202
char * name
Name of the user IO.
Definition: mbs_binder_public.h:372
int n_user_IO
Number of user IO in the system.
Definition: mbs_binder_public.h:391
int ** user_cstr_mat
Definition: mbs_binder_public.h:405
#define MBS_INFO_INIT
Definition: mbs_define.h:27
Definition: mbs_binder_public.h:401
MbsInfoLink ** link_list
Definition: mbs_binder_public.h:273
char * name
Definition: mbs_binder_public.h:240
Definition: mbs_binder_public.h:270
MbsInfoBase * mbs_new_info_base(void)
Definition: mbs_loader_public.c:639
int mbs_info_json_linker(MbsInfos *mbs_info, int mission)
Definition: mbs_load_json.c:2800
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:1040
MbsInfoRefPoint * parent
Definition: mbs_binder_public.h:153
JsonNode * json_find_element(JsonNode *array, int index)
Definition: json.cc:490
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:385
int n_sensor
Number of sensor in the model.
Definition: mbs_binder_public.h:451
int mbs_info_json_binder(MbsInfos *mbs_infos, JsonNode *root_node, int mission)
Read or update the information from root node to all MbsInfo.
Definition: mbs_load_json.c:75
MbsInfoBody ** body_list
Definition: mbs_binder_public.h:183
int n_point
Number of point defined on the body.
Definition: mbs_binder_public.h:175
MbsInfoUserCstr * user_cstr
Definition: mbs_binder_public.h:436
int Pos
1 if the computation of the sensor position has been asked, 0 otherwise.
Definition: mbs_binder_public.h:70
This structure contains all informations about a body.
Definition: mbs_binder_public.h:161
MbsInfoRefPoint * mbs_new_info_ref_point(void)
Definition: mbs_loader_public.c:487
@ JSON_STRING
Definition: json.h:33
Definition: mbs_binder_public.h:261
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:1985
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:3178
int mbs_info_point_json_binder(MbsInfoPoint *mbs_info_point, JsonNode *node, int mission)
Definition: mbs_load_json.c:1157
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:1009
MbsInfoExtforce * extforce
Pointer to an external force sensor structure if it is defined on the point.
Definition: mbs_binder_public.h:111
char * string_name
Pointer containing the string name (if type is 8). NULL otherwise.
Definition: mbs_binder_public.h:306
JsonNode * load_and_create_json(const char *mbs_json_filename, int *err)
Definition: mbs_json.c:44
MbsInfoLinks * links
Definition: mbs_binder_public.h:433
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:887
char * name
Name of the sensor.
Definition: mbs_binder_public.h:65
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:284
int mbs_info_user_IOs_json_binder(MbsInfoUserIOs *mbs_info_user_IOs, JsonNode *node, int mission)
Definition: mbs_load_json.c:1618
int constr_process
Definition: mbs_binder_public.h:404
int n_solid
Definition: mbs_binder_public.h:253
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:474
Definition: mbs_binder_public.h:369
char * joint_parent
parent joint of the current body (NULL if it is a parent point)
Definition: mbs_binder_public.h:166
Definition: mbs_binder_public.h:222
int n_value
Number of values in the parameter.
Definition: mbs_binder_public.h:300
int n_user_model
Definition: mbs_binder_public.h:361
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_binder_public.h:172
This structure contains all information about a sensor defined on the MBS structure.
Definition: mbs_binder_public.h:63
int symb_q
Flag to generate symbol for position.
Definition: mbs_binder_public.h:149
char * structure_lutfile
File and path (relative or absolute) to the file containing the Look-up-Table dats.
Definition: mbs_binder_public.h:344
#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
int mbs_info_coordinates_json_binder(double *coordinates_pointer, JsonNode *node, int mission)
Definition: mbs_load_json.c:697
int nature
Nature of the joint: independent=1, dependent=2, driven=3, locked=4.
Definition: mbs_binder_public.h:137
Structure handling the informations defined on the base of the MBS.
Definition: mbs_binder_public.h:122
int Rot
1 if the computation of the sensor rotation matrix has been asked, 0 otherwise.
Definition: mbs_binder_public.h:71
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:3249
MbsInfoPoint * mbs_new_info_point(void)
Definition: mbs_loader_public.c:578
This structure handle everything that a point on a MBS structure can handle (sensor,...
Definition: mbs_binder_public.h:104
int n_joint
Number of joints in the model
Definition: mbs_binder_public.h:475
JsonTag tag
Definition: json.h:50
char * pointname
Name of the reference point on the previous body.
Definition: mbs_binder_public.h:56
MbsInfoRefPoint * endpoint1
Definition: mbs_binder_public.h:226
int mbs_tree_cleaner(MbsInfos *mbs_info, int mission)
Correct the parents of joints.
Definition: mbs_load_json.c:2623
void * mbs_free(void *__ptr)
Free the pointor ptr and set it to NULL.
Definition: useful_functions.c:18
MbsInfoBody * children_body
Body direct children of the joint.
Definition: mbs_binder_public.h:155
MbsInfoSolid ** solid_list
Definition: mbs_binder_public.h:257
int mbs_json_get_double(JsonNode *node, double *val_ptr)
Get the node value content a double.
Definition: mbs_json.c:194
int mbs_info_user_cstr_json_binder(MbsInfoUserCstr *mbs_info_user_cstr, JsonNode *node, int mission)
Definition: mbs_load_json.c:1672
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:2241
MbsInfoRefPoint * endpoint1
Definition: mbs_binder_public.h:242
MbsInfoBodytree * bodytree
Definition: mbs_binder_public.h:431
int mbs_info_ref_point_json_binder(MbsInfoRefPoint *mbs_info_ref_point, JsonNode *node, int mission)
Definition: mbs_load_json.c:677
int mbs_info_user_model_json_binder(MbsInfoUserModel *mbs_info_user_model, JsonNode *node, int mission)
Read or update a user model json node with the infos.
Definition: mbs_load_json.c:1370
double length
Definition: mbs_binder_public.h:229
void free_ivec_1(int *vec)
release memory for a vector of integers, starting with index 1
Definition: mbs_1D_array.c:495
JsonNode * mbs_info_init_and_binderJSON_rtn(MbsInfos *mbs_infos, const char *mbs_json_name, int *err, int mission)
Init and bind the MBS information contained in the .json file Returns a newly allocated JsonNode....
Definition: mbs_load_json.c:29
int mbs_json_set_string(JsonNode *node, const char *string)
Set a double into a node.
Definition: mbs_json.c:376
MbsInfoUserModel ** user_model_list
Definition: mbs_binder_public.h:362
int mbs_info_links3d_json_binder(MbsInfoLinks *mbs_info_links, JsonNode *node, int mission)
Definition: mbs_load_json.c:1937
MbsInfoUserModel * mbs_new_info_user_model(void)
Definition: mbs_loader_public.c:1137
void json_delete(JsonNode *node)
Definition: json.cc:445
MbsInfoBall ** ball_list
Definition: mbs_binder_public.h:255
MbsInfoCuts * mbs_new_info_cuts(void)
Definition: mbs_loader_public.c:939
Definition: mbs_binder_public.h:211
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:2160
MbsInfoJoint ** joint_list
Array of pointers to the MDS_joint_strct describing each joint leaving the body.
Definition: mbs_binder_public.h:169
MbsInfoRefPoint * parent_point
parent point of the sensor (NULL if it is a parent joint)
Definition: mbs_binder_public.h:66
int mbs_info_user_IO_json_binder(MbsInfoUserIO *mbs_info_user_IO, JsonNode *node, int mission)
Definition: mbs_load_json.c:1573
int Rot
1 if the computation of the sensor rotation matrix has been asked, 0 otherwise.
Definition: mbs_binder_public.h:91
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:138
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:960
MbsInfoUserModels * mbs_new_info_user_models(void)
Definition: mbs_loader_public.c:1171
char * description
Description of the parameter in the user model.
Definition: mbs_binder_public.h:286
int n_body
Definition: mbs_binder_public.h:182
MbsInfoRefPoint * endpoint2
Definition: mbs_binder_public.h:227
#define MBS_INFO_SUCCESS
Definition: mbs_define.h:29
MbsInfoUserModels * user_models
Definition: mbs_binder_public.h:434
double q0
Initial position of the joint.
Definition: mbs_binder_public.h:139
JsonNode * json_first_child(const JsonNode *node)
Definition: json.cc:531
#define MBS_INFO_READER
Definition: mbs_define.h:23
int mbs_info_point_json_binder(MbsInfoPoint *mbs_info_point, JsonNode *node, int mission)
Definition: mbs_load_json.c:1157
char * string_
Definition: json.h:56
int mbs_body_joint_recursive_linker(MbsInfos *mbs_info, int *ind_body_joint, int mission, int body_index)
Definition: mbs_load_json.c:2586
int symb_qdd
Flag to generate symbol for acceleration.
Definition: mbs_binder_public.h:151
@ JSON_ARRAY
Definition: json.h:35
MbsInfoExtforce ** extforce_list
Pointer to a list of external force sensor
Definition: mbs_binder_public.h:479
char * base_body_name
baseBodyName as defined in the base body in mbs/json file
Definition: mbs_binder_public.h:127
char * name
Definition: mbs_binder_public.h:352
int Jac
1 if the computation of the sensor Jacobian ( ) has been asked, 0 otherwise.
Definition: mbs_binder_public.h:97
char * joint_parent
Definition: mbs_binder_public.h:154
MbsInfoLink ** link3D_list
Definition: mbs_binder_public.h:276
char * name
Name of the body.
Definition: mbs_binder_public.h:163
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:738
#define MBS_INFO_COUNTER
Definition: mbs_define.h:26
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_binder_public.h:342
int mbs_info_joints_list_json_binder(MbsInfos *mbs_infos, JsonNode *joints_node, int mission)
To Be Defined.
Definition: mbs_load_json.c:2519
#define MBS_INFO_WARNING
Definition: mbs_define.h:30
int mbs_info_user_models_json_binder(MbsInfoUserModels *ums_info, JsonNode *ums_node, int mission)
Read or update the user models list json node with the infos.
Definition: mbs_load_json.c:1481
int Jdqd
1 if the computation of the sensor jdqd term has been asked, 0 otherwise. Mutually exclusive with Acc...
Definition: mbs_binder_public.h:75
int n_link
Definition: mbs_binder_public.h:272
double number_
Definition: json.h:59
char * mbsname
Name of the project in the multibody system file.
Definition: mbs_binder_public.h:441
char * padversion
Version number of the MBsysPAD that last modified the file.
Definition: mbs_binder_public.h:443
int n_extforce
Number of external force in the model.
Definition: mbs_binder_public.h:456
MbsInfoLink * mbs_new_info_link(void)
Definition: mbs_loader_public.c:992
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:412
MbsInfoRefPoint * point_parent
Description of the parent point of the current body. (NULL if it is a parent joint)
Definition: mbs_binder_public.h:165
int mbs_info_coordinates_json_binder(double *coordinates_pointer, JsonNode *node, int mission)
Definition: mbs_load_json.c:697
int n_in
Number of INPUT user IO in the system.
Definition: mbs_binder_public.h:393
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:840
MbsInfoRod * mbs_new_info_rod(void)
Definition: mbs_loader_public.c:868
int count_json_array_elements(JsonNode *node)
Counts the number of element in the Json array.
Definition: mbs_json.c:14
int mbs_info_user_model_json_binder(MbsInfoUserModel *um_info, JsonNode *um_node, int mission)
Read or update a user model json node with the infos.
Definition: mbs_load_json.c:1370
Definition: mbs_binder_public.h:359
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:2326
int Omp
1 if the computation of the sensor angular acceleration has been asked, 0 otherwise.
Definition: mbs_binder_public.h:76
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:1040
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:785
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:554
int n_link3D
Definition: mbs_binder_public.h:275
int symb_qd
Flag to generate symbol for velocity.
Definition: mbs_binder_public.h:150
MbsInfoRefPoint * endpoint2
Definition: mbs_binder_public.h:266
int Vit
1 if the computation of the sensor linear velocity has been asked, 0 otherwise.
Definition: mbs_binder_public.h:72
MbsInfoJoint ** all_joint_list
Ordered list of all joints in the model
Definition: mbs_binder_public.h:473
This structure contains all information about an external force sensor defined on the MBS structure.
Definition: mbs_binder_public.h:84
int Jac
1 if the computation of the sensor Jacobian ( ) has been asked, 0 otherwise.
Definition: mbs_binder_public.h:77
int n_joint
Number of joints leaving the body.
Definition: mbs_binder_public.h:168
JsonNode * json_find_member(JsonNode *object, const char *name)
Definition: json.cc:511