|
Robotran C Documentation
|
Go to the documentation of this file.
7 #ifndef MBS_INFO_XML_BINDER_PRIVATE_h
8 #define MBS_INFO_XML_BINDER_PRIVATE_h
10 #include <libxml/tree.h>
11 #include <libxml/parser.h>
105 xmlNodePtr
get_body_node(xmlNodePtr bodytree,
const char *body_name);
119 xmlNodePtr
get_point_node(xmlNodePtr body_node,
const char *point_name,
120 int allow_new,
double coords_2d[2]);
143 xmlNodePtr
get_body_point(xmlDocPtr doc,
const char *body_name,
const char *point_name,
int allow_new);
185 xmlNodePtr
get_inline_shape(xmlNodePtr shape3D_node,
const char *shape_name,
198 xmlNodePtr
get_base_shape(xmlNodePtr shape3D_node,
const char *shape_name,
199 int nature,
int allow_creation);
MbsLoadOptions * opts
Contains the options that must be used when loading the project.
Definition: mbs_load_struct.h:78
xmlNodePtr get_links_node(xmlDocPtr doc, int create)
Look for the node containing all the links.
Definition: mbs_xml_binder.c:1040
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
int * comp_rotation
Definition: mbs_saver.h:136
int * color_y
Definition: mbs_saver.h:113
int mbs_info_user_IOs_xml_binder(MbsInfoUserIOs *mbs_info_user_IOs, xmlNodePtr node, int mission, int verbose)
Definition: mbs_xml_binder.c:2496
#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
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
xmlNodePtr mbs_xmlNewDocNode_xyz(xmlDocPtr doc, xmlNsPtr ns, const xmlChar *name, const xmlChar *content, double value)
Definition: mbs_xml_binder.c:204
void mbs_msg(const char *msg,...)
Send a message.
Definition: mbs_message.c:87
double * scale
Scale (x, y, z) of the inline, Set to NULL to not update it.
Definition: mbs_saver.h:41
int * color_z
Definition: mbs_saver.h:114
int set_double_xlm_node(xmlNodePtr in_node, double value)
SET functions ///////////////////////.
Definition: mbs_xml_binder.c:134
xmlNodePtr get_base_shape(xmlNodePtr shape3D_node, const char *shape_name, int nature, int allow_creation)
Look for the specified basic shape.
Definition: mbs_xml_binder.c:895
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
Declare required stuffs to update mbs files from MbsData state and user wishes.
void * loaded_structure
Pointer to the loaded mbs file specific structure (related to file format).
Definition: mbs_load_struct.h:103
int prj_relative_url
True (1) if the shape url (shape_url) start for project folder (without initial path separator).
Definition: mbs_saver.h:48
char * name
Definition: mbs_binder_public.h:224
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_mbs_linker(MbsInfos *mbs_info, int mission)
Definition: mbs_xml_binder.c:2797
double * value_list
Vector (index starting at 1) containing the values retrieved from the multibody file.
Definition: mbs_binder_public.h:302
xmlNodePtr get_inline_shape(xmlNodePtr shape3D_node, const char *shape_name, int allow_creation)
Look for the specified inline shape.
Definition: mbs_xml_binder.c:835
int mbs_info_joint_xml_binder(MbsInfoJoint *mbs_info_joint, xmlNodePtr node, int mission, int verbose)
Definition: mbs_xml_binder.c:1236
char * name
Name of the parameter in the user model.
Definition: mbs_binder_public.h:285
int mbs_info_mbsDescR7_binder(MbsInfos *mbs_infos, xmlDocPtr doc, int mission)
Definition: mbs_xml_binder.c:2556
int show_x
Definition: mbs_saver.h:103
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
double * rotation
Rotation (around x, y, z) of the inline, Set to NULL to not update it.
Definition: mbs_saver.h:43
@ SHAPE_NONE
Definition: mbs_saver.h:15
int mbs_info_mbsDescR7_binder(MbsInfos *mbs_infos, xmlDocPtr doc, int mission)
Definition: mbs_xml_binder.c:2556
int show_resultant
Flags to activate (1), desactivate (0), or no modification (-1) to the visibility of the force global...
Definition: mbs_saver.h:106
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
char * first_body
Definition: mbs_saver.h:153
int mbs_info_user_model_xml_binder(MbsInfoUserModel *mbs_info_user_model, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:2348
int mbs_info_update_extforces_xml(MbsLoader *mbs_loader, UpdateExtForces *frc, int allow_new)
Update, or create this external force all next ExtFrc in the linked list.
Definition: mbs_xml_binder.c:3508
int mbs_info_ref_point_xml_binder(MbsInfoRefPoint *mbs_info_ref_point, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:1563
MbsInfoBase * base
Definition: mbs_binder_public.h:430
int mbs_info_user_models_xml_binder(MbsInfoUserModels *mbs_info_user_models, xmlNodePtr node, int mission, int verbose)
Definition: mbs_xml_binder.c:2398
int mbs_info_sensor_xml_binder(MbsInfoSensor *mbs_info_sensor, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:1132
double scale
Scale of the arrow, use 0 to not update the diameter.
Definition: mbs_saver.h:119
int get_string_xml_attr(xmlAttrPtr in_node, char **dest)
Definition: mbs_xml_binder.c:96
xmlNodePtr get_basebody_3Dshapes(xmlDocPtr doc, int create)
Look for the node containing the 3D shape (x3D) of the base node.
Definition: mbs_xml_binder.c:434
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
int fill_all_joint_list(MbsInfos *mbs_infos)
Fill the joints list with children parent...
Definition: mbs_loader_public.c:1483
int on_base
True (1) if the shape is on the basebody.
Definition: mbs_saver.h:62
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
#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
ExtForces_3D * torque_3d
Determine 3D force visualization parameters, set to null to not modify.
Definition: mbs_saver.h:139
int mbs_info_cuts_xml_binder(MbsInfoCuts *mbs_info_cuts, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:1978
This structure contains all informations about a joint.
Definition: mbs_binder_public.h:133
Definition: mbs_binder_public.h:249
int visible
Flag to show the shape (1) or hide it (0). Set to -1 to not update it.
Definition: mbs_saver.h:91
xmlNodePtr new_char_xlm_node(xmlDocPtr doc, xmlNsPtr ns, const xmlChar *name, const xmlChar *content, const char *text)
Definition: mbs_xml_binder.c:195
int Omp
1 if the computation of the sensor angular acceleration has been asked, 0 otherwise.
Definition: mbs_binder_public.h:96
int mbs_info_rod_xml_binder(MbsInfoRod *mbs_info_rod, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:1875
int Om
1 if the computation of the sensor angular velocity has been asked, 0 otherwise.
Definition: mbs_binder_public.h:93
int show
Definition: mbs_saver.h:102
int mbs_info_joint_xml_binder(MbsInfoJoint *mbs_info_joint, xmlNodePtr node, int mission, int verbose)
Definition: mbs_xml_binder.c:1236
int mbs_strcmp(const char *__s1, const char *__s2)
Compare two char with strcmp.
Definition: useful_functions.c:388
MbsInfoRefPoint * parent_point
parent point of the sensor (NULL if it is a parent joint)
Definition: mbs_binder_public.h:87
MbsInfoDData ** d_value
d_data for the value.
Definition: mbs_binder_public.h:324
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 n_ball
Definition: mbs_binder_public.h:251
xmlNodePtr get_body_node(xmlNodePtr bodytree, const char *body_name)
Look for the specified body node in the tree.
Definition: mbs_xml_binder.c:374
double mass
Mass of the body.
Definition: mbs_binder_public.h:171
xmlDocPtr mbs_xml_get_doc(const char *mbs_xml_name)
Load an xml file to memory.
Definition: mbs_xml_binder.c:2685
int cmp_string_xml_attr(xmlAttrPtr in_node, const char *string)
other functions /////////////////////
Definition: mbs_xml_binder.c:236
int visible
Flag to modify the visibility in the 3D view.
Definition: mbs_saver.h:163
xmlNodePtr get_bodytree_node(xmlDocPtr doc)
Look for the bodytree node in the document.
Definition: mbs_xml_binder.c:337
char * second_point
The second attachment point, body name and point name.
Definition: mbs_saver.h:158
int mbs_info_body_xml_binder(MbsInfoBody *mbs_info_body, xmlNodePtr node, int mission, int verbose)
Definition: mbs_xml_binder.c:1637
MbsInfoParameter * mbs_new_info_parameter(void)
Definition: mbs_loader_public.c:1066
@ KEEP_LOADED
Definition: mbs_load_struct.h:74
int mbs_info_user_IOs_xml_binder(MbsInfoUserIOs *mbs_info_user_IOs, xmlNodePtr node, int mission, int verbose)
Definition: mbs_xml_binder.c:2496
MbsInfoSensor * mbs_new_info_sensor(void)
Definition: mbs_loader_public.c:518
void * mbs_xml_free_clean(xmlDocPtr doc)
Free the xml document and clean the xml library parser.
Definition: mbs_xml_binder.c:2732
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_info_parameter_xml_binder(MbsInfoParameter *mbs_info_parameter, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:2150
xmlDocPtr mbs_xml_get_doc(const char *mbs_xml_name)
Load an xml file to memory.
Definition: mbs_xml_binder.c:2685
@ SHAPE_CYLINDER
Definition: mbs_saver.h:17
Definition: mbs_binder_public.h:428
struct UpdateExtForces * next
Pointer to next force to be updated.
Definition: mbs_saver.h:141
int * comp_jacobian
Flag (0/1) determining informations to compute.
Definition: mbs_saver.h:136
int on_base
True (1) if the shape is on the basebody.
Definition: mbs_saver.h:128
int mbs_info_joint_list_xml_binder(MbsInfoJoint **joint_list, xmlNodePtr node, int mission, int verbose)
Definition: mbs_xml_binder.c:1417
int type
Nature of the user IO:
Definition: mbs_binder_public.h:376
double * position
Position (x, y, z) of the inline, Set to NULL to not update it.
Definition: mbs_saver.h:39
Define modifications to be done on external forces, or new to add.
Definition: mbs_saver.h:126
xmlNodePtr new_double_xlm_node(xmlDocPtr doc, xmlNsPtr ns, const xmlChar *name, const xmlChar *content, double value)
Creation functions //////////////////.
Definition: mbs_xml_binder.c:186
int mbs_info_base_xml_binder(MbsInfoBase *mbs_info_base, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:1585
char * name
Name of the point.
Definition: mbs_binder_public.h:106
int * comp_acceleration
Definition: mbs_saver.h:136
char * name
Definition: mbs_binder_public.h:263
xmlNodePtr get_basebody_point(xmlDocPtr doc, const char *point_name, int allow_new)
Look for the specified point node on the base.
Definition: mbs_xml_binder.c:976
int mbs_info_user_IO_xml_binder(MbsInfoUserIO *mbs_info_user_IO, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:2449
int compare_char_xml_node(xmlNodePtr in_node, const char *text)
COMPARE functions ///////////////////.
Definition: mbs_xml_binder.c:167
MbsInfoSensor * sensor
Pointer to a sensor structure if a sensor is defined on the point.
Definition: mbs_binder_public.h:110
int mbs_info_ball_xml_binder(MbsInfoBall *mbs_info_ball, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:1817
int mbs_info_extforce_xml_binder(MbsInfoExtforce *mbs_info_extforce, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:1186
void * mbs_xml_free_clean(xmlDocPtr doc)
Free the xml document and clean the xml library parser.
Definition: mbs_xml_binder.c:2732
int mbs_info_update_linkforce_xml(MbsLoader *mbs_loader, UpdateLinkForces *lnk, int allow_new)
Update, or create the provided link force.
Definition: mbs_xml_binder.c:3969
xmlNodePtr get_body_point(xmlDocPtr doc, const char *body_name, const char *point_name, int allow_new)
Look for the specified point node on the specified body.
Definition: mbs_xml_binder.c:1003
MbsInfoPoint ** base_point_list
Array of pointers to the MDS_point_strct describing each point of the MBS.
Definition: mbs_binder_public.h:126
char * second_body
Definition: mbs_saver.h:158
char * name
Name of the joint.
Definition: mbs_binder_public.h:135
int mbs_info_rod_xml_binder(MbsInfoRod *mbs_info_rod, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:1875
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
Definition: mbs_binder_public.h:350
xmlNodePtr get_body_node(xmlNodePtr bodytree, const char *body_name)
Look for the specified body node in the tree.
Definition: mbs_xml_binder.c:374
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
struct UpdateInline * next
Pointer to next inline to be updated.
Definition: mbs_saver.h:53
MbsInfoRefPoint * endpoint1
Definition: mbs_binder_public.h:265
double * height
Height, except for SHAPE_BOX and SHAPE_SPHERE, of the shape.
Definition: mbs_saver.h:79
int show_y
Definition: mbs_saver.h:104
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
xmlNodePtr get_bodytree_node(xmlDocPtr doc)
Look for the bodytree node in the document.
Definition: mbs_xml_binder.c:337
int mbs_info_bodytree_xml_binder(MbsInfoBodytree *mbs_info_bodytree, xmlNodePtr node, int mission, int verbose)
Definition: mbs_xml_binder.c:1772
char * shape_name
Name of the shape in the shape list.
Definition: mbs_saver.h:32
int mbs_info_mbs_linker(MbsInfos *mbs_info, int mission)
Definition: mbs_xml_binder.c:2797
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_init_and_binderXML(MbsInfos *mbs_infos, const char *mbs_xml_name, int mission)
Definition: mbs_xml_binder.c:2879
int mbs_info_coordinates_xml_binder(double *coordinates_pointer, xmlNodePtr node, int mission)
Binders /////////////////////////////.
Definition: mbs_xml_binder.c:1088
int actuated
For inverse dynamic only: 1 if actuated, 0 otherwise.
Definition: mbs_binder_public.h:143
int mbs_info_cuts_xml_binder(MbsInfoCuts *mbs_info_cuts, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:1978
int Pos
1 if the computation of the sensor position has been asked, 0 otherwise.
Definition: mbs_binder_public.h:90
int * comp_velocity
Definition: mbs_saver.h:136
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
xmlNodePtr get_body_3Dshapes(xmlDocPtr doc, const char *body_name)
Look for the node containing the 3D shape (x3D) of the specified body.
Definition: mbs_xml_binder.c:700
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 * description
Description of the user model.
Definition: mbs_binder_public.h:353
int mbs_info_sensor_xml_binder(MbsInfoSensor *mbs_info_sensor, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:1132
int mbs_info_coordinates_xml_binder(double *coordinates_pointer, xmlNodePtr node, int mission)
Binders /////////////////////////////.
Definition: mbs_xml_binder.c:1088
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 mbs_info_solid_xml_binder(MbsInfoSolid *mbs_info_solid, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:1920
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 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
Definition: mbs_load_struct.h:76
void * val_ptr
Pointer to the memory storing the value.
Definition: mbs_binder_public.h:308
#define MSG_ERR
Definition: mbs_xml_binder.c:19
xmlNodePtr get_inline_shape(xmlNodePtr shape3D_node, const char *shape_name, int allow_creation)
Look for the specified inline shape.
Definition: mbs_xml_binder.c:835
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 mbs_info_update_shapes_xml(MbsLoader *mbs_loader, UpdateShape *up_in, int allow_new)
Update, or create this 3D shape and all next 3D shapes in the linked list.
Definition: mbs_xml_binder.c:3192
int Acc
1 if the computation of the sensor linear acceleration has been asked, 0 otherwise....
Definition: mbs_binder_public.h:94
@ SHAPE_BOX
Definition: mbs_saver.h:16
MbsInfoRefPoint * endpoint2
Definition: mbs_binder_public.h:243
xmlNodePtr get_base_shape(xmlNodePtr shape3D_node, const char *shape_name, int nature, int allow_creation)
Look for the specified basic shape.
Definition: mbs_xml_binder.c:895
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
double * rotation
Rotation (around x, y, z) of the inline, Set to NULL to not update it.
Definition: mbs_saver.h:86
MbsInfoDData * mbs_new_info_d_data(void)
Definition: mbs_loader_public.c:462
int * ignore
Definition: mbs_binder_public.h:245
Definition: mbs_binder_public.h:388
char * name
Name of the external force, should be unique.
Definition: mbs_saver.h:134
double get_double_xlm_node(xmlNodePtr in_node)
Definition: mbs_xml_binder.c:47
char * name
Name of the user IO.
Definition: mbs_binder_public.h:372
int mbs_info_bodytree_xml_binder(MbsInfoBodytree *mbs_info_bodytree, xmlNodePtr node, int mission, int verbose)
Definition: mbs_xml_binder.c:1772
int * comp_position
Definition: mbs_saver.h:136
int n_user_IO
Number of user IO in the system.
Definition: mbs_binder_public.h:391
double transparency
Transparency (1 is invisible, 0 is fully visible) of the inline, Set to negative value to not update ...
Definition: mbs_saver.h:88
double transparency
Transparency (1 is invisible, 0 is fully visible) of the inline, Set to negative value to not update ...
Definition: mbs_saver.h:45
#define MBS_INFO_INIT
Definition: mbs_define.h:27
int mbs_info_update_linkforce_xml(MbsLoader *mbs_loader, UpdateLinkForces *lnk, int allow_new)
Update, or create the provided link force.
Definition: mbs_xml_binder.c:3969
int set_char_xlm_node(xmlNodePtr in_node, const char *text)
Definition: mbs_xml_binder.c:147
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_user_models_xml_binder(MbsInfoUserModels *mbs_info_user_models, xmlNodePtr node, int mission, int verbose)
Definition: mbs_xml_binder.c:2398
#define MBS_VERBOSE_ERROR
Definition: mbs_define.h:44
int get_string_xml_node(xmlNodePtr in_node, char **dest)
Definition: mbs_xml_binder.c:68
int n_sensor
Number of sensor in the model.
Definition: mbs_binder_public.h:451
MbsInfoBody ** body_list
Definition: mbs_binder_public.h:183
xmlNodePtr get_point_node(xmlNodePtr body_node, const char *point_name, int allow_new, double coords_2d[2])
Look for the specified point node in the body or base node.
Definition: mbs_xml_binder.c:503
int n_point
Number of point defined on the body.
Definition: mbs_binder_public.h:175
double * radius
Radius, except for SHAPE_BOX, of the shape. Set to NULL to not update it.
Definition: mbs_saver.h:77
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
int mbs_info_links_xml_binder(MbsInfoLinks *mbs_info_links, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:2089
MbsInfoRefPoint * mbs_new_info_ref_point(void)
Definition: mbs_loader_public.c:487
@ SHAPE_CONE
Definition: mbs_saver.h:18
int on_base
True (1) if the shape is on the basebody.
Definition: mbs_saver.h:28
Definition: mbs_binder_public.h:261
MbsInfoExtforce * extforce
Pointer to an external force sensor structure if it is defined on the point.
Definition: mbs_binder_public.h:111
xmlNodePtr mbs_info_find_children_xml(xmlNodePtr node, const char *name)
Return the children whose name matches.
Definition: mbs_xml_binder.c:273
int mbs_info_parameter_xml_binder(MbsInfoParameter *mbs_info_parameter, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:2150
MbsInfos * mbs_infos
Contains the multibody structure with more informations than used by computation.
Definition: mbs_load_struct.h:80
char * string_name
Pointer containing the string name (if type is 8). NULL otherwise.
Definition: mbs_binder_public.h:306
MbsInfoLinks * links
Definition: mbs_binder_public.h:433
xmlNodePtr get_basebody_node(xmlDocPtr doc)
Look for the base node in the document.
Definition: mbs_xml_binder.c:300
xmlNodePtr find_xmlNodePtr(xmlNodePtr node, char *name)
Definition: mbs_xml_binder.c:248
xmlNodePtr get_point_node(xmlNodePtr body_node, const char *point_name, int allow_new, double coords_2d[2])
Look for the specified point node in the body or base node.
Definition: mbs_xml_binder.c:503
int mbs_info_point_list_xml_binder(MbsInfoPoint **mbs_info_point_list, xmlNodePtr node, int mission, char *body_name)
Definition: mbs_xml_binder.c:1514
int mbs_xml_info_to_loader(MbsLoader *mbs_loader, const char *mbs_xml_name)
Load and store the specified xml file into both MbsInfo and xmlDocPtr format.
Definition: mbs_xml_binder.c:2742
char * name
Name of the sensor.
Definition: mbs_binder_public.h:65
int mbs_info_base_xml_binder(MbsInfoBase *mbs_info_base, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:1585
int mbs_info_links_xml_binder(MbsInfoLinks *mbs_info_links, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:2089
int set_char_cpy(char **dest, const char *fmt,...)
Set a copy the provided formatted string into a newly allocated memory.
Definition: useful_functions.c:228
int mbs_info_link_xml_binder(MbsInfoLink *mbs_info_link, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:2055
int n_solid
Definition: mbs_binder_public.h:253
Definition: mbs_binder_public.h:369
int visible
Flag to show the shape (1) or hide it (0). Set to -1 to not update it.
Definition: mbs_saver.h:51
char * joint_parent
parent joint of the current body (NULL if it is a parent point)
Definition: mbs_binder_public.h:166
int get_int_xlm_attr(xmlAttrPtr in_node)
Definition: mbs_xml_binder.c:36
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
int mbs_info_body_xml_binder(MbsInfoBody *mbs_info_body, xmlNodePtr node, int mission, int verbose)
Definition: mbs_xml_binder.c:1637
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
xmlNodePtr get_basebody_point(xmlDocPtr doc, const char *point_name, int allow_new)
Look for the specified point node on the base.
Definition: mbs_xml_binder.c:976
int symb_q
Flag to generate symbol for position.
Definition: mbs_binder_public.h:149
Definition: mbs_binder_public.h:32
int position_at_end
Put the end of the arrow on the sensor (1) or the beginning (0).
Definition: mbs_saver.h:109
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 modifications to be done on a basic shape.
Definition: mbs_saver.h:60
int mbs_info_point_xml_binder(MbsInfoPoint *mbs_info_point, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:1450
@ XML_LOADED
Definition: mbs_load_struct.h:74
char * first_point
The first attachment point, body name and point name.
Definition: mbs_saver.h:153
int nature
Nature of the joint: independent=1, dependent=2, driven=3, locked=4.
Definition: mbs_binder_public.h:137
char * point_name
Name of the point with the force.
Definition: mbs_saver.h:132
int * ignore
Definition: mbs_binder_public.h:218
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
MbsInfoPoint * mbs_new_info_point(void)
Definition: mbs_loader_public.c:578
int get_string_xml_node_2(char **string_ptr, xmlNodePtr in_node)
Definition: mbs_xml_binder.c:120
@ IGNORE_LOADED
Definition: mbs_load_struct.h:74
This structure handle everything that a point on a MBS structure can handle (sensor,...
Definition: mbs_binder_public.h:104
char * body_name
Name of the body with the force, disregarded if on_base is true.
Definition: mbs_saver.h:130
int mbs_info_link_xml_binder(MbsInfoLink *mbs_info_link, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:2055
char * pointname
Name of the reference point on the previous body.
Definition: mbs_binder_public.h:56
int mbs_is_dir_or_file(const char *path)
Check if the path is valid and lead to a file or directory.
Definition: mbs_path.c:547
MbsInfoRefPoint * endpoint1
Definition: mbs_binder_public.h:226
@ SHAPE_SPHERE
Definition: mbs_saver.h:19
#define MSG_PRE
Definition: mbs_xml_binder.c:20
MbsInfoSolid ** solid_list
Definition: mbs_binder_public.h:257
MbsInfoRefPoint * endpoint1
Definition: mbs_binder_public.h:242
MbsInfoBodytree * bodytree
Definition: mbs_binder_public.h:431
xmlNodePtr create_shape(xmlNodePtr parent_node, const char *shape_name, char *shape_nature)
Definition: mbs_xml_binder.c:768
double * scale
Scale (x, y, z) of the shape, Set to NULL to not update it.
Definition: mbs_saver.h:84
double * position
Position (x, y, z) of the shape, Set to NULL to not update it.
Definition: mbs_saver.h:82
int mbs_info_solid_xml_binder(MbsInfoSolid *mbs_info_solid, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:1920
int mbs_info_init_and_binderXML(MbsInfos *mbs_infos, const char *mbs_xml_name, int mission)
Definition: mbs_xml_binder.c:2879
int verbose
Verbosity level (not yet implemented everywhere): Verbosity level propagated to other compatible modu...
Definition: mbs_load_struct.h:39
char * name
Name of the linkforce, should be unique.
Definition: mbs_saver.h:150
int * color_resultant
Color of each arrow in RGB format.
Definition: mbs_saver.h:115
int mbs_info_update_inlines_xml(MbsLoader *mbs_loader, UpdateInline *up_in, int allow_new)
Update, or create this inline and all next inlines in the linked list.
Definition: mbs_xml_binder.c:2930
ExtForces_3D * force_3d
Definition: mbs_saver.h:138
double length
Definition: mbs_binder_public.h:229
int mbs_info_ref_point_xml_binder(MbsInfoRefPoint *mbs_info_ref_point, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:1563
MbsInfoUserModel ** user_model_list
Definition: mbs_binder_public.h:362
int * color_x
Definition: mbs_saver.h:112
xmlNodePtr mbs_info_find_children_xml(xmlNodePtr node, const char *name)
Return the children whose name matches.
Definition: mbs_xml_binder.c:273
MbsInfoUserModel * mbs_new_info_user_model(void)
Definition: mbs_loader_public.c:1137
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
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 Rot
1 if the computation of the sensor rotation matrix has been asked, 0 otherwise.
Definition: mbs_binder_public.h:91
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
xmlNodePtr get_basebody_node(xmlDocPtr doc)
Look for the base node in the document.
Definition: mbs_xml_binder.c:300
xmlNodePtr get_links_node(xmlDocPtr doc, int create)
Look for the node containing all the links.
Definition: mbs_xml_binder.c:1040
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
int get_int_xlm_node(xmlNodePtr in_node)
GET functions ///////////////////////.
Definition: mbs_xml_binder.c:25
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:100
MbsInfoRefPoint * endpoint2
Definition: mbs_binder_public.h:227
#define MBS_INFO_SUCCESS
Definition: mbs_define.h:29
char * shape_name
Name of the shape in the shape list.
Definition: mbs_saver.h:66
MbsInfoUserModels * user_models
Definition: mbs_binder_public.h:434
double q0
Initial position of the joint.
Definition: mbs_binder_public.h:139
struct UpdateShape * next
Pointer to next shape to be updated.
Definition: mbs_saver.h:93
#define MBS_INFO_READER
Definition: mbs_define.h:23
int mbs_info_joint_list_xml_binder(MbsInfoJoint **joint_list, xmlNodePtr node, int mission, int verbose)
Definition: mbs_xml_binder.c:1417
int symb_qdd
Flag to generate symbol for acceleration.
Definition: mbs_binder_public.h:151
int mbs_info_update_shapes_xml(MbsLoader *mbs_loader, UpdateShape *up_in, int allow_new)
Update, or create this 3D shape and all next 3D shapes in the linked list.
Definition: mbs_xml_binder.c:3192
xmlNodePtr get_basebody_3Dshapes(xmlDocPtr doc, int create)
Look for the node containing the 3D shape (x3D) of the base node.
Definition: mbs_xml_binder.c:434
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
int show_z
Definition: mbs_saver.h:105
int mbs_info_update_extforces_xml(MbsLoader *mbs_loader, UpdateExtForces *frc, int allow_new)
Update, or create this external force all next ExtFrc in the linked list.
Definition: mbs_xml_binder.c:3508
char * body_name
Name of the body with the shape, disregarded if on_base is true.
Definition: mbs_saver.h:30
char * name
Definition: mbs_binder_public.h:352
int mbs_info_extforce_xml_binder(MbsInfoExtforce *mbs_info_extforce, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:1186
int Jac
1 if the computation of the sensor Jacobian ( ) has been asked, 0 otherwise.
Definition: mbs_binder_public.h:97
MbsInfoLink ** link3D_list
Definition: mbs_binder_public.h:276
char * name
Name of the body.
Definition: mbs_binder_public.h:163
xmlNodePtr get_body_point(xmlDocPtr doc, const char *body_name, const char *point_name, int allow_new)
Look for the specified point node on the specified body.
Definition: mbs_xml_binder.c:1003
Define modifications to be done on link force (1D), or new to add.
Definition: mbs_saver.h:148
#define MBS_INFO_COUNTER
Definition: mbs_define.h:26
int shape_nature
Indicate if the shape is a box, cylinder, cone or sphere:
Definition: mbs_saver.h:69
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_ball_xml_binder(MbsInfoBall *mbs_info_ball, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:1817
char * body_name
Name of the body with the shape, disregarded if on_base is true.
Definition: mbs_saver.h:64
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
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 mbs_info_point_list_xml_binder(MbsInfoPoint **point_list, xmlNodePtr node, int mission, char *body_name)
Definition: mbs_xml_binder.c:1514
int n_extforce
Number of external force in the model.
Definition: mbs_binder_public.h:456
double * size
Size, SHAPE_BOX only, along x, y, z. Set to NULL to not update it.
Definition: mbs_saver.h:75
Define modification to be done on a inline.
Definition: mbs_saver.h:26
MbsInfoLink * mbs_new_info_link(void)
Definition: mbs_loader_public.c:992
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 n_in
Number of INPUT user IO in the system.
Definition: mbs_binder_public.h:393
int mbs_info_update_inlines_xml(MbsLoader *mbs_loader, UpdateInline *up_in, int allow_creation)
Update, or create this inline and all next inlines in the linked list.
Definition: mbs_xml_binder.c:2930
MbsInfoRod * mbs_new_info_rod(void)
Definition: mbs_loader_public.c:868
double diameter
Diameter of the arrow, use 0 to not update the diameter.
Definition: mbs_saver.h:118
int mbs_info_point_xml_binder(MbsInfoPoint *mbs_info_point, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:1450
Definition: mbs_binder_public.h:359
int mbs_xml_info_to_loader(MbsLoader *mbs_loader, const char *mbs_xml_name)
Load and store the specified xml file into both MbsInfo and xmlDocPtr format.
Definition: mbs_xml_binder.c:2742
int Omp
1 if the computation of the sensor angular acceleration has been asked, 0 otherwise.
Definition: mbs_binder_public.h:76
int n_link3D
Definition: mbs_binder_public.h:275
xmlNodePtr mbs_xmlNewDocNode_attr_rgb(xmlDocPtr doc, xmlNsPtr ns, const xmlChar *name, const xmlChar *content, char *R, char *G, char *B)
Definition: mbs_xml_binder.c:218
int mbs_info_user_model_xml_binder(MbsInfoUserModel *mbs_info_user_model, xmlNodePtr node, int mission)
Definition: mbs_xml_binder.c:2348
int symb_qd
Flag to generate symbol for velocity.
Definition: mbs_binder_public.h:150
xmlNodePtr get_body_3Dshapes(xmlDocPtr doc, const char *body_name)
Look for the node containing the 3D shape (x3D) of the specified body.
Definition: mbs_xml_binder.c:700
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
This structure contains all information about an external force sensor defined on the MBS structure.
Definition: mbs_binder_public.h:84
char * shape_url
Path to the shape file.
Definition: mbs_saver.h:35
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