|
Robotran C Documentation
|
Go to the documentation of this file.
59 const char *filename_out,
int verbose);
172 const char *body_name,
const char *shape_name,
173 const char *shape_url,
double position[3],
174 double scale[3],
double rotation[3],
175 double transparency,
int prj_relative_url,
237 const char *body_name,
const char *shape_name,
238 ShapeIds shape_nature,
double size[3],
239 double *radius,
double *height,
double position[3],
240 double scale[3],
double rotation[3],
241 double transparency,
int visible);
282 int show_resultant,
int position_at_end,
283 int color_x[3],
int color_y[3],
int color_z[3],
284 int color_resultant[3],
double diameter,
double scale);
314 const char *first_body,
const char *first_point,
315 const char *second_body,
const char *second_point,
334 int new_col_y[3],
int new_col_z[3],
418 const char *point_name,
char *name,
int comp_position,
419 int comp_rotation,
int comp_velocity,
int comp_acceleration,
UserUpdates * mbs_update_new_user()
Allocate and initialize an user update structure.
Definition: mbs_saver.c:754
MbsLoadOptions * opts
Contains the options that must be used when loading the project.
Definition: mbs_load_struct.h:95
int * qdriven
Definition: mbs_infos_struct.h:198
int n_d_related
Definition: mbs_infos_struct.h:420
int n_d_simplified
Definition: mbs_infos_struct.h:408
int n_rod
Definition: mbs_infos_struct.h:249
MbsInfoRefPoint * endpoint1
Definition: mbs_infos_struct.h:212
MbsInfoCuts * cuts
Definition: mbs_infos_struct.h:429
int mbs_synchronize(MbsData *mbs_data, MbsLoader *mbs_loader)
Synchronize the value of the loaded MBS with the data in the computed MBS.
Definition: mbs_saver.c:161
int * comp_rotation
Definition: mbs_saver_struct.h:137
int * color_y
Definition: mbs_saver_struct.h:114
int mbs_unix_separator(char *path)
In-place replacement of windows-style path separator (\) by Unix separator (/).
Definition: mbs_path.c:34
#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_infos_struct.h:105
int mbs_update_insert_extforce(UserUpdates *user_update, int on_base, const char *body_name, const char *point_name, char *name, int comp_position, int comp_rotation, int comp_velocity, int comp_acceleration, int comp_jacobian, ExtForces_3D *force_3d, ExtForces_3D *torque_3d)
Insert instruction to update the content of an external force.
Definition: mbs_saver.c:1375
char * name
Definition: mbs_infos_struct.h:83
void mbs_delete_infos(MbsInfos *mbs_infos)
Definition: mbs_loader_public.c:1388
char * structure_name
Name of the structure, filled if the parameter is a structure.
Definition: mbs_infos_struct.h:332
int Vit
1 if the computation of the sensor linear velocity has been asked, 0 otherwise.
Definition: mbs_infos_struct.h:89
MbsInfoRefPoint * endpoint2
Definition: mbs_infos_struct.h:213
#define MBS_INFO_FAILURE
Definition: mbs_define.h:32
MbsInfoJoint * find_joint_in_bodytree(MbsInfos *mbs_infos, char *jointname)
Definition: mbs_loader_public.c:1469
int n_state
Number of different named user state variable in the model.
Definition: mbs_infos_struct.h:459
Definition: mbs_infos_struct.h:177
void mbs_msg(const char *msg,...)
Send a message.
Definition: mbs_message.c:87
UpdateShape * mbs_update_new_shape()
Initialize and allocate an 3D shape modification structure.
Definition: mbs_saver.c:811
double * scale
Scale (x, y, z) of the inline, Set to NULL to not update it.
Definition: mbs_saver_struct.h:40
int * color_z
Definition: mbs_saver_struct.h:115
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
int verbose
Verbosity level (not yet implemented everywhere):
Definition: mbs_infos_struct.h:485
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:122
double d_opti
result value of optimization
Definition: mbs_infos_struct.h:35
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
int mbs_update_insert_inline(UserUpdates *user_update, int on_base, const char *body_name, const char *shape_name, const char *shape_url, double position[3], double scale[3], double rotation[3], double transparency, int prj_relative_url, int visible)
Insert instruction to update the content of a visualization inline shape.
Definition: mbs_saver.c:925
char * name
Definition: mbs_infos_struct.h:221
char * get_char_cpy(const char *fmt,...)
Copy the provided formatted string into a newly allocated memory.
Definition: useful_functions.c:235
int n_qv
Definition: mbs_infos_struct.h:188
double * value_list
Vector (index starting at 1) containing the values retrieved from the multibody file.
Definition: mbs_infos_struct.h:299
double * qd
Array with the current values of the generalized velocities.
Definition: mbs_data.h:286
MbsInfoJoint * mbs_new_info_joint(void)
Definition: mbs_loader_public.c:691
MbsInfoJoint * mbs_get_info_joint(MbsInfos *mbs_infos, const char *name, int verbose, int *err)
Retrieve the joint matching the given name.
Definition: mbs_infos_helper.c:328
char * name
Name of the parameter in the user model.
Definition: mbs_infos_struct.h:282
int mbs_info_mbsDescR7_binder(MbsInfos *mbs_infos, xmlDocPtr doc, int mission)
Definition: mbs_xml_binder.c:2839
double * m
Array containing the mass of each body.
Definition: mbs_data.h:253
int show_x
Definition: mbs_saver_struct.h:104
MbsInfoParameter ** state_list
List of the user state variables, there are MbsInfos::n_state elements.
Definition: mbs_infos_struct.h:463
int n_out
Number of OUTPUT user IO in the system.
Definition: mbs_infos_struct.h:392
void mbs_delete_info_body(MbsInfoBody *mbs_info_body, void *all_joints_lists)
Definition: mbs_loader_public.c:759
double * rotation
Rotation (around x, y, z) of the inline, Set to NULL to not update it.
Definition: mbs_saver_struct.h:42
void mbs_delete_info_parameter(MbsInfoParameter *mbs_info_parameter)
Definition: mbs_loader_public.c:1113
int show_resultant
Flags to activate (1), desactivate (0), or no modification (-1) to the visibility of the force global...
Definition: mbs_saver_struct.h:107
Define 3D field for showing an external force sensor.
Definition: mbs_saver_struct.h:101
Structure defining the parent point of a body.
Definition: mbs_infos_struct.h:50
double qdd0
Initial acceleration of the joint.
Definition: mbs_infos_struct.h:138
MbsInfoDData ** d_forced_list
Definition: mbs_infos_struct.h:412
char * first_body
Definition: mbs_saver_struct.h:154
int nqrot
Number of rotational joint (R1, R2 or R3)
Definition: mbs_data.h:270
int Nlink3D
Number of 3D links.
Definition: mbs_data.h:338
void * mbs_delete_info_ref_point(MbsInfoRefPoint *mbs_info_ref_point)
Definition: mbs_loader_public.c:515
void mbs_update_free_user(UserUpdates *uu)
Free the provided user update structure.
Definition: mbs_saver.c:770
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:3816
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
MbsSaveOptions * opts_saver
Contains the options that must be used when loading the project.
Definition: mbs_load_struct.h:97
MbsInfoBase * base
Definition: mbs_infos_struct.h:427
int n_d_optimized
Definition: mbs_infos_struct.h:414
double scale
Scale of the arrow, use 0 to not update the diameter.
Definition: mbs_saver_struct.h:120
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
int on_base
True (1) if the shape is on the basebody.
Definition: mbs_saver_struct.h:61
double * ux0
Array with the initial values of the user variables.
Definition: mbs_data.h:397
void mbs_delete_info_ball(MbsInfoBall *mbs_info_ball)
Definition: mbs_loader_public.c:868
void mbs_delete_info_solid(MbsInfoSolid *mbs_info_solid)
Definition: mbs_loader_public.c:938
@ IGNORE_LOADED
Definition: mbs_load_struct.h:91
char * body_name
Name of the body holding the point.
Definition: mbs_infos_struct.h:104
@ LOAD_NONE
Definition: mbs_load_struct.h:81
@ UM_LUT2D
Definition: mbs_infos_struct.h:20
@ KEEP_LOADED
Definition: mbs_load_struct.h:91
void mbs_error_msg(int err, const char *msg,...)
Send an error message.
Definition: mbs_message.c:131
char * mbsfile
Provided filepath of the loaded multibody system.
Definition: mbs_infos_struct.h:436
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
#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_infos_struct.h:394
ExtForces_3D * torque_3d
Determine 3D force visualization parameters, set to null to not modify.
Definition: mbs_saver_struct.h:140
This structure contains all informations about a joint.
Definition: mbs_infos_struct.h:130
MbsLoader * mbs_new_loader()
Create a new structure loader used for the loading with options.
Definition: mbs_loader.c:988
double * MBSdata_d_ptr
link in the creation of mbs_data
Definition: mbs_infos_struct.h:43
int is_related
unrelated = 0, master = 1, equal salve = 2, opposite slave = 3
Definition: mbs_infos_struct.h:38
int njoint
Number of joints in the system.
Definition: mbs_data.h:260
Definition: mbs_infos_struct.h:246
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
int mbs_json_get_string(JsonNode *node, char **str_ptr)
Get the node value content as a string.
Definition: mbs_json.c:514
@ UM_STATE
Definition: mbs_infos_struct.h:21
@ UM_VECTOR
Definition: mbs_infos_struct.h:18
void free_ivec_0(int *vec)
release memory for a vector of integers, starting with index 0
Definition: mbs_1D_array.c:590
MbsInfoParameter * mbs_get_um_info_parameter(MbsInfos *mbs_infos, const char *um_name, const char *param_name, int verbose, int *err)
Retrieve a parameter in a user model matching the names in the User Models list of MbsInfos.
Definition: mbs_infos_helper.c:252
int npt
Number of anchor points.
Definition: mbs_data.h:250
UpdateShape * shapes
Definition: mbs_saver_struct.h:173
MbsInfoLinks * mbs_new_info_links(void)
Definition: mbs_loader_public.c:1039
#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_infos_struct.h:93
int Om
1 if the computation of the sensor angular velocity has been asked, 0 otherwise.
Definition: mbs_infos_struct.h:90
int show
Definition: mbs_saver_struct.h:103
int n_qrot
Definition: mbs_infos_struct.h:203
int n_ball
Number of ball constraint in the system.
Definition: mbs_data.h:314
int mbs_strcmp(const char *__s1, const char *__s2)
Compare two char with strcmp.
Definition: useful_functions.c:568
double d_max
bounds values for optimization
Definition: mbs_infos_struct.h:34
int n_usercstr
Definition: mbs_infos_struct.h:400
int update_joint0
In the input MbsData struct, this flag allow to replace the joint initial values (MbsData::q0,...
Definition: mbs_load_struct.h:68
MbsInfoRefPoint * parent_point
parent point of the sensor (NULL if it is a parent joint)
Definition: mbs_infos_struct.h:84
void mbs_update_free_extforce(UpdateExtForces *force)
Free the provided external forces modifications structure.
Definition: mbs_saver.c:1353
MbsInfoDData ** d_value
d_data for the value.
Definition: mbs_infos_struct.h:321
double * gravity
Array with the component (x, y, z) of the gravity vector expressed in the inertial frame.
Definition: mbs_infos_struct.h:121
#define MSG_ERR
Definition: mbs_loader_public.c:17
int n_ball
Definition: mbs_infos_struct.h:248
MbsInfoUserCstr * mbs_new_info_user_cstr(void)
Definition: mbs_loader_public.c:1256
@ XML_LOADED
Definition: mbs_load_struct.h:91
double mass
Mass of the body.
Definition: mbs_infos_struct.h:168
int mbs_update_insert_link(UserUpdates *user_update, const char *name, const char *first_body, const char *first_point, const char *second_body, const char *second_point, int visible)
Insert instruction to update the content of an link force.
Definition: mbs_saver.c:1165
int mbs_splitext(const char *path, char **prefix, char **extension)
Split the path into a pair (root, ext).
Definition: mbs_path.c:460
int * qu
Definition: mbs_infos_struct.h:186
int mbs_save(const char *filename, MbsLoader *mbs_loader)
Save the mbs_info to disk.
Definition: mbs_saver.c:452
int visible
Flag to modify the visibility in the 3D view.
Definition: mbs_saver_struct.h:164
char * symmetric_rod_name
Definition: mbs_infos_struct.h:230
char * second_point
The second attachment point, body name and point name.
Definition: mbs_saver_struct.h:159
int n_joint
Definition: mbs_infos_struct.h:182
int mbs_copy_info_body(MbsInfoBody *mbs_info_body_src, MbsInfoBody *mbs_info_body_dest)
Definition: mbs_loader_public.c:1632
void mbs_update_free_extforce_3d(ExtForces_3D *force_3d)
Free the provided 3D force visualization structure.
Definition: mbs_saver.c:1305
@ JSON_OBJECT
Definition: json.h:36
void * mbs_delete_info_joint(MbsInfoJoint *mbs_info_joint)
Definition: mbs_loader_public.c:719
int size
Number of values in the user IO.
Definition: mbs_infos_struct.h:375
int Acc
1 if the computation of the sensor linear acceleration has been asked, 0 otherwise....
Definition: mbs_infos_struct.h:71
int mbs_update_insert_shape(UserUpdates *user_update, int on_base, const char *body_name, const char *shape_name, ShapeIds shape_nature, double size[3], double *radius, double *height, double position[3], double scale[3], double rotation[3], double transparency, int visible)
Insert instruction to update the content of a visualization 3D shape.
Definition: mbs_saver.c:1051
@ UM_INT
Definition: mbs_infos_struct.h:23
int mbs_update_user(UserUpdates *user_update, MbsLoader *mbs_loader)
Synchronize the value of the loaded MBS with user specific modification.
Definition: mbs_saver.c:278
Definition: mbs_infos_struct.h:425
MbsInfoLink * mbs_new_info_link(void)
Definition: mbs_loader_public.c:1009
int Nux
Number of user variable.
Definition: mbs_data.h:398
struct UpdateExtForces * next
Pointer to next force to be updated.
Definition: mbs_saver_struct.h:142
int * comp_jacobian
Flag (0/1) determining informations to compute.
Definition: mbs_saver_struct.h:137
int on_base
True (1) if the shape is on the basebody.
Definition: mbs_saver_struct.h:129
This header includes the functions to bind the JSON information to the MbsInfos structure.
int type
Nature of the user IO:
Definition: mbs_infos_struct.h:373
double * position
Position (x, y, z) of the inline, Set to NULL to not update it.
Definition: mbs_saver_struct.h:38
Define modifications to be done on external forces, or new to add.
Definition: mbs_saver_struct.h:127
MbsInfoBase * mbs_new_info_base(void)
Definition: mbs_loader_public.c:656
UpdateInline * mbs_update_new_inline()
Initialize and allocate an inline shape modification structure.
Definition: mbs_saver.c:788
char * name
Name of the point.
Definition: mbs_infos_struct.h:103
UpdateInline * inlines
Definition: mbs_saver_struct.h:172
MbsInfoSensor * mbs_new_info_sensor(void)
Definition: mbs_loader_public.c:535
int * comp_acceleration
Definition: mbs_saver_struct.h:137
char * name
Definition: mbs_infos_struct.h:260
JsonNode * mbs_info_configuration(MbsInfos *mbs_infos, const char *config_file, int *err)
Modify the MbsInfo contents according to the configuration file.
Definition: mbs_loader_public.c:1682
MbsInfoJoint * find_joint_with_parent_in_joint_list(MbsInfos *mbs_infos, char *jointname)
Definition: mbs_loader_public.c:1589
MbsInfoSensor * sensor
Pointer to a sensor structure if a sensor is defined on the point.
Definition: mbs_infos_struct.h:107
MbsInfoBodytree * mbs_new_info_bodytree(void)
Definition: mbs_loader_public.c:792
MbsInfos * mbs_new_infos(void)
Definition: mbs_loader_public.c:1346
UpdateLinkForces * mbs_update_new_link()
Definition: mbs_saver.c:836
MbsInfoPoint ** base_point_list
Array of pointers to the MDS_point_strct describing each point of the MBS.
Definition: mbs_infos_struct.h:123
ShapeIds get_shape_id(const char *name)
Get the id of the shape from its geometry.
Definition: mbs_saver.c:1019
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
char * second_body
Definition: mbs_saver_struct.h:159
char * name
Name of the joint.
Definition: mbs_infos_struct.h:132
char * mbs_dirname(const char *path, int verbose)
mbs_dirname returns the leading part of the path (UNIX and MAC).
Definition: mbs_path.c:407
void mbs_update_free_user(UserUpdates *uu)
Free the provided user update structure.
Definition: mbs_saver.c:770
int allow_new
Flag to create the shape (1) if not found on the body or generating an error (0).
Definition: mbs_saver_struct.h:174
int * qv
Definition: mbs_infos_struct.h:189
int Nxfrc
Number of points where an external force is applied into a body.
Definition: mbs_data.h:363
#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_infos_struct.h:235
MbsInfoRod ** rod_list
Definition: mbs_infos_struct.h:253
Definition: mbs_infos_struct.h:347
char * symmetric_point_name
Definition: mbs_infos_struct.h:112
MbsInfoRod * mbs_new_info_rod(void)
Definition: mbs_loader_public.c:885
int * qa
Definition: mbs_infos_struct.h:201
MbsInfoBody * mbs_new_info_body(void)
Definition: mbs_loader_public.c:736
int * extforce_point_list
List of the point index (in MbsInfos::point_list) that has a external force.
Definition: mbs_infos_struct.h:455
MbsInfoParameter ** parameter_list
Definition: mbs_infos_struct.h:352
double * qd0
Array with the initial values of the generalized velocities.
Definition: mbs_data.h:290
ExtForces_3D * mbs_update_new_extforce_3d(int show, int show_x, int show_y, int show_z, int show_resultant, int position_at_end, int color_x[3], int color_y[3], int color_z[3], int color_resultant[3], double diameter, double scale)
Allocate and initialize a external force/torque visualization parameter.
Definition: mbs_saver.c:1214
int * qc
Definition: mbs_infos_struct.h:192
MbsInfoPoint ** point_list
Array of pointers to the MDS_point_strct describing each point of current body.
Definition: mbs_infos_struct.h:173
struct UpdateInline * next
Pointer to next inline to be updated.
Definition: mbs_saver_struct.h:52
void mbs_delete_info_base(MbsInfoBase *mbs_info_base)
Definition: mbs_loader_public.c:671
MbsInfoRefPoint * endpoint1
Definition: mbs_infos_struct.h:262
double * height
Height, except for SHAPE_BOX and SHAPE_SPHERE, of the shape.
Definition: mbs_saver_struct.h:80
UpdateExtForces * mbs_update_new_extforce()
Initialize and allocate an external force modification structure.
Definition: mbs_saver.c:1329
int show_y
Definition: mbs_saver_struct.h:105
int Nlink
Number of forces acting between two points of the system (force law implemented in user_LinkForces())...
Definition: mbs_data.h:337
ExtForces_3D * mbs_update_dup_extforce_3d(ExtForces_3D *orig, int new_col_x[3], int new_col_y[3], int new_col_z[3], int new_col_res[3])
Clone an existing 3D forces visualization and apply the colors change.
Definition: mbs_saver.c:1286
char * shape_name
Name of the shape in the shape list.
Definition: mbs_saver_struct.h:31
MbsInfoSolid * mbs_new_info_solid(void)
Definition: mbs_loader_public.c:923
void json_delete(JsonNode *node)
Definition: json.c:407
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
MbsInfoCuts * mbs_new_info_cuts(void)
Definition: mbs_loader_public.c:956
char * symmetric_joint_name
the name of the symmetric joint (filed if master, NULL if slave or non symmetric)
Definition: mbs_infos_struct.h:144
MbsInfoBall * mbs_new_info_ball(void)
Definition: mbs_loader_public.c:853
#define MSG_PRE
Definition: mbs_saver.c:23
JsonNode * json_find_element(JsonNode *array, int index)
Definition: json.c:448
int actuated
For inverse dynamic only: 1 if actuated, 0 otherwise.
Definition: mbs_infos_struct.h:140
int Pos
1 if the computation of the sensor position has been asked, 0 otherwise.
Definition: mbs_infos_struct.h:87
int * comp_velocity
Definition: mbs_saver_struct.h:137
MbsInfoDData * d_qf
d_data for the forced q
Definition: mbs_infos_struct.h:142
@ SHAPE_INLINE
Definition: mbs_saver_struct.h:18
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
int * qlocked
Definition: mbs_infos_struct.h:195
int n_qa
Definition: mbs_infos_struct.h:200
char * name
Definition: mbs_infos_struct.h:210
void mbs_delete_info_user_IO(MbsInfoUserIO *mbs_info_user_IO)
Definition: mbs_loader_public.c:1234
MbsInfoSensor ** sensor_list
Pointer to a list of sensor.
Definition: mbs_infos_struct.h:474
int type
Type of the parameter between 1 and 7.
Definition: mbs_infos_struct.h:285
MbsInfoExtforce * mbs_new_info_extforce(void)
Definition: mbs_loader_public.c:566
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
double qd0
Initial velocity of the joint.
Definition: mbs_infos_struct.h:137
char * joint_parent
parent joint of the current body (NULL if it is a parent point)
Definition: mbs_infos_struct.h:64
char * description
Description of the user model.
Definition: mbs_infos_struct.h:350
#define MSG_PRE
Definition: mbs_loader_public.c:18
MbsInfoUserIOs * user_IOs
Definition: mbs_infos_struct.h:432
Description of a user model parameter loaded from the mbs file.
Definition: mbs_infos_struct.h:280
@ JSON_NUMBER
Definition: json.h:34
void mbs_update_free_link(UpdateLinkForces *link)
Free the provided link forces modifications structure.
Definition: mbs_saver.c:903
int mbs_update_insert_link(UserUpdates *user_update, const char *name, const char *first_body, const char *first_point, const char *second_body, const char *second_point, int visible)
Insert instruction to update the content of an link force.
Definition: mbs_saver.c:1165
void mbs_delete_info_link(MbsInfoLink *mbs_info_link)
Definition: mbs_loader_public.c:1022
int Om
1 if the computation of the sensor angular velocity has been asked, 0 otherwise.
Definition: mbs_infos_struct.h:70
char * structure_header
Header name with path (relative or absolute) of header describing a structure parameter.
Definition: mbs_infos_struct.h:334
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:93
void * val_ptr
Pointer to the memory storing the value.
Definition: mbs_infos_struct.h:305
int mbs_save(const char *filename, MbsLoader *mbs_loader)
Save the mbs_info to disk.
Definition: mbs_saver.c:452
int Nloopc
Number of loop constraints.
Definition: mbs_data.h:317
int n_parameter
Definition: mbs_infos_struct.h:351
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
char * symmetric_parameter_name
The name of the symmetric parameter.
Definition: mbs_infos_struct.h:327
int Acc
1 if the computation of the sensor linear acceleration has been asked, 0 otherwise....
Definition: mbs_infos_struct.h:91
MbsInfoRefPoint * endpoint2
Definition: mbs_infos_struct.h:240
int mbs_info_updater(MbsInfos *mbs_infos, const char *mbs_filename, int verbose)
Definition: mbs_loader_public.c:146
void mbs_update_free_extforce_3d(ExtForces_3D *force_3d)
Free the provided 3D force visualization structure.
Definition: mbs_saver.c:1305
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
char * key
Definition: json.h:48
int type
Joint type: T1=1, T2=2, T3=3, R1=4, R2=5, R3=6.
Definition: mbs_infos_struct.h:133
int mbs_update_user(UserUpdates *user_update, MbsLoader *mbs_loader)
Synchronize the value of the loaded MBS with user specific modification.
Definition: mbs_saver.c:278
double * rotation
Rotation (around x, y, z) of the inline, Set to NULL to not update it.
Definition: mbs_saver_struct.h:87
MbsInfoPoint * mbs_new_info_point(void)
Definition: mbs_loader_public.c:595
int * ignore
Definition: mbs_infos_struct.h:242
Definition: mbs_infos_struct.h:385
char * name
Name of the external force, should be unique.
Definition: mbs_saver_struct.h:135
double * q
Array with the current values of the generalized coordinates.
Definition: mbs_data.h:285
void mbs_delete_info_user_cstr(MbsInfoUserCstr *mbs_info_user_cstr)
Definition: mbs_loader_public.c:1288
char * name
Name of the user IO.
Definition: mbs_infos_struct.h:369
MbsInfoDData ** d_resulting_list
Definition: mbs_infos_struct.h:418
int * comp_position
Definition: mbs_saver_struct.h:137
void free_dvec_1(double *vec)
release memory for a vector of doubles, starting at index 1
Definition: mbs_1D_array.c:1095
int n_user_IO
Number of user IO in the system.
Definition: mbs_infos_struct.h:388
@ JSON_LOADED
Definition: mbs_load_struct.h:91
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
void * mbs_delete_info_point(MbsInfoPoint *mbs_info_point)
Definition: mbs_loader_public.c:622
int n_state_value
Number of user state values.
Definition: mbs_infos_struct.h:461
UpdateInline * mbs_update_new_inline()
Initialize and allocate an inline shape modification structure.
Definition: mbs_saver.c:788
MbsInfoUserIO * mbs_new_info_user_IO(void)
Definition: mbs_loader_public.c:1221
double ** In
Array containing the inertia tensor component of each body (in the body fixed frame,...
Definition: mbs_data.h:254
int ** user_cstr_mat
Definition: mbs_infos_struct.h:402
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
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:4277
int is_symmmetric
asymmetric = 0, symmetric master = 1, symmetric salve = 2
Definition: mbs_infos_struct.h:143
Definition: mbs_infos_struct.h:398
int Nsensor
< Array of l3DWr vector for each 3D link forces.
Definition: mbs_data.h:360
void mbs_delete_info_d_data(MbsInfoDData *mbs_info_d_data)
Definition: mbs_loader_public.c:499
MbsInfoDData * mbs_new_info_d_data(void)
Definition: mbs_loader_public.c:479
void mbs_delete_info_rod(MbsInfoRod *mbs_info_rod)
Definition: mbs_loader_public.c:905
MbsInfoLink ** link_list
Definition: mbs_infos_struct.h:270
char * name
Definition: mbs_infos_struct.h:237
int mbs_update(MbsData *mbs_data, UserUpdates *user_update, const char *filename_in, const char *filename_out, int verbose)
Open the specified MBS file, update it and save it on the specified name.
Definition: mbs_saver.c:25
char * project_path
Path to the mbs project folder.
Definition: mbs_data.h:423
Definition: mbs_infos_struct.h:267
int n_qc
Definition: mbs_infos_struct.h:191
char * get_shape_geometry(ShapeIds id)
Get the geometry of the shape from its id.
Definition: mbs_saver.c:996
MbsInfoRefPoint * mbs_new_info_ref_point(void)
Definition: mbs_loader_public.c:504
int is_symmmetric
Definition: mbs_infos_struct.h:111
MbsInfoBody * find_body_in_bodytree(MbsInfos *mbs_infos, char *bodyname)
Definition: mbs_loader_public.c:1453
int fill_all_joint_list(MbsInfos *mbs_infos)
Fill the joints list with children parent...
Definition: mbs_loader_public.c:1500
ShapeIds shape_nature
Indicate if the shape is a box, cylinder, cone or sphere:
Definition: mbs_saver_struct.h:68
ShapeIds get_shape_id(const char *name)
Get the id of the shape from its geometry.
Definition: mbs_saver.c:1019
#define MBS_VERBOSE_ERROR
Definition: mbs_define.h:45
int find_project_path(const char *mbsfile, char *prjpath)
Find the project directory (containing dataR, symbolicR, ...) from Mbs filepath.
Definition: mbs_path.c:74
MbsInfoRefPoint * parent
Definition: mbs_infos_struct.h:150
Definition: mbs_infos_struct.h:406
MbsInfoBody * mbs_get_info_body(MbsInfos *mbs_infos, const char *name, int verbose, int *err)
Retrieve the body matching the given name.
Definition: mbs_infos_helper.c:261
@ SHAPE_BOX
Definition: mbs_saver_struct.h:14
MbsInfoUserModel * mbs_new_info_user_model(void)
Definition: mbs_loader_public.c:1154
MbsInfoDData ** d_optimized_list
Definition: mbs_infos_struct.h:415
int n_sensor
Number of sensor in the model.
Definition: mbs_infos_struct.h:448
MbsInfoUserModels * mbs_new_info_user_models(void)
Definition: mbs_loader_public.c:1188
MbsInfoDData ** d_simplified_list
Definition: mbs_infos_struct.h:409
MbsInfoBody ** body_list
Definition: mbs_infos_struct.h:180
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
int n_point
Number of point defined on the body.
Definition: mbs_infos_struct.h:172
MbsInfoUserCstr * user_cstr
Definition: mbs_infos_struct.h:433
double * radius
Radius, except for SHAPE_BOX, of the shape. Set to NULL to not update it.
Definition: mbs_saver_struct.h:78
int Pos
1 if the computation of the sensor position has been asked, 0 otherwise.
Definition: mbs_infos_struct.h:67
void mbs_delete_loader(MbsLoader *loader)
Free the memory associated to the given MbsLoader.
Definition: mbs_loader.c:1034
int mbs_synchronize(MbsData *mbs_data, MbsLoader *mbs_loader)
Synchronize the value of the loaded MBS with the data in the computed MBS.
Definition: mbs_saver.c:161
This structure contains all informations about a body.
Definition: mbs_infos_struct.h:158
int is_symmmetric
Definition: mbs_infos_struct.h:229
int load_symb_user
Specify the project libraries to be loaded, an enumeration gives possible values:
Definition: mbs_load_struct.h:33
@ UM_SCALAR
Definition: mbs_infos_struct.h:17
UpdateExtForces * mbs_update_new_extforce()
Initialize and allocate an external force modification structure.
Definition: mbs_saver.c:1329
int on_base
True (1) if the shape is on the basebody.
Definition: mbs_saver_struct.h:27
Definition: mbs_infos_struct.h:258
int mbs_update_insert_extforce(UserUpdates *user_update, int on_base, const char *body_name, const char *point_name, char *name, int comp_position, int comp_rotation, int comp_velocity, int comp_acceleration, int comp_jacobian, ExtForces_3D *force_3d, ExtForces_3D *torque_3d)
Insert instruction to update the content of an external force.
Definition: mbs_saver.c:1375
int mbs_info_loader(MbsLoader *mbs_loader, const char *mbs_filename, int verbose)
Read the mbs file and store all used file description.
Definition: mbs_loader_public.c:82
int n_d_forced
Definition: mbs_infos_struct.h:411
int n_qu
Definition: mbs_infos_struct.h:185
int n_qdriven
Definition: mbs_infos_struct.h:197
UpdateExtForces * extforces
Definition: mbs_saver_struct.h:177
MbsInfoExtforce * extforce
Pointer to an external force sensor structure if it is defined on the point.
Definition: mbs_infos_struct.h:108
MbsInfos * mbs_infos
Contains the multibody structure with more informations than used by computation.
Definition: mbs_load_struct.h:99
char * string_name
Pointer containing the string name (if type is 8). NULL otherwise.
Definition: mbs_infos_struct.h:303
JsonNode * load_and_create_json(const char *mbs_json_filename, int *err)
Definition: mbs_json.c:116
MbsInfoLinks * links
Definition: mbs_infos_struct.h:430
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:3046
MbsInfoDData ** d_pt
Definition: mbs_infos_struct.h:110
MbsInfoDData ** d_related_list
Definition: mbs_infos_struct.h:421
void mbs_delete_info_user_IOs(MbsInfoUserIOs *mbs_info_user_IOs)
Definition: mbs_loader_public.c:1269
char * name
Name of the sensor.
Definition: mbs_infos_struct.h:62
int json_save(const char *filepath, JsonNode *node, int verbosity, int *err)
Save the current json node to file.
Definition: mbs_json.c:210
double ** dpt
Array containing the coordinate of all anchor points (3+1 lines, npt+1 columns).
Definition: mbs_data.h:251
void mbs_delete_info_bodytree(MbsInfoBodytree *mbs_info_bodytree, void *all_joints_lists)
Definition: mbs_loader_public.c:827
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
void mbs_delete_info_extforce(MbsInfoExtforce *mbs_info_extforce)
Definition: mbs_loader_public.c:587
ShapeIds
Definition: mbs_saver_struct.h:12
int constr_process
Definition: mbs_infos_struct.h:401
JsonNode * json_find_member(JsonNode *object, const char *name)
Definition: json.c:465
MbsInfoParameter * mbs_new_info_parameter(void)
Definition: mbs_loader_public.c:1083
int n_solid
Definition: mbs_infos_struct.h:250
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
Definition: mbs_infos_struct.h:366
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
char * joint_parent
parent joint of the current body (NULL if it is a parent point)
Definition: mbs_infos_struct.h:163
int n_d_resulting
Definition: mbs_infos_struct.h:417
Definition: mbs_infos_struct.h:219
int n_value
Number of values in the parameter.
Definition: mbs_infos_struct.h:297
char * mbs_name
Name of the mbs project as it is stored in the xml file.
Definition: mbs_data.h:424
int n_user_model
Definition: mbs_infos_struct.h:358
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
This structure contains all information about a sensor defined on the MBS structure.
Definition: mbs_infos_struct.h:60
void mbs_delete_info_user_models(MbsInfoUserModels *mbs_info_user_models)
Definition: mbs_loader_public.c:1199
double * q0
Array with the initial values of the generalized coordinates.
Definition: mbs_data.h:289
int symb_q
Flag to generate symbol for position.
Definition: mbs_infos_struct.h:146
Definition: mbs_infos_struct.h:29
int position_at_end
Put the end of the arrow on the sensor (1) or the beginning (0).
Definition: mbs_saver_struct.h:110
char * structure_lutfile
File and path (relative or absolute) to the file containing the Look-up-Table dats.
Definition: mbs_infos_struct.h:341
#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
Define modifications to be done on a basic shape.
Definition: mbs_saver_struct.h:59
Definition: mbs_data.h:247
int n_qlocked
Definition: mbs_infos_struct.h:194
int n_solid
Number of solid constraint in the system.
Definition: mbs_data.h:313
void mbs_delete_info_user_model(MbsInfoUserModel *mbs_info_user_model)
Definition: mbs_loader_public.c:1167
MbsInfoOpti * opti
DEPRECATED Specific structure dedicated to a previous project using optimization.
Definition: mbs_infos_struct.h:467
char * first_point
The first attachment point, body name and point name.
Definition: mbs_saver_struct.h:154
int nature
Nature of the joint: independent=1, dependent=2, driven=3, locked=4.
Definition: mbs_infos_struct.h:134
MbsInfoPoint ** point_list
List of all anchors point in the model
Definition: mbs_infos_struct.h:445
char * point_name
Name of the point with the force.
Definition: mbs_saver_struct.h:133
int * ignore
Definition: mbs_infos_struct.h:215
Structure handling the informations defined on the base of the MBS.
Definition: mbs_infos_struct.h:119
int Rot
1 if the computation of the sensor rotation matrix has been asked, 0 otherwise.
Definition: mbs_infos_struct.h:68
int n_rod
Number of rod constraint in the system.
Definition: mbs_data.h:315
This structure handle everything that a point on a MBS structure can handle (sensor,...
Definition: mbs_infos_struct.h:101
char * body_name
Name of the body with the force, disregarded if on_base is true.
Definition: mbs_saver_struct.h:131
int n_joint
Number of joints in the model
Definition: mbs_infos_struct.h:472
#define MBS_VERBOSE_WARNING
Definition: mbs_define.h:46
@ SHAPE_CONE
Definition: mbs_saver_struct.h:16
@ UM_STRING
Definition: mbs_infos_struct.h:24
void mbs_delete_info_sensor(MbsInfoSensor *mbs_info_sensor)
Definition: mbs_loader_public.c:557
double d_0
initial value for optimization
Definition: mbs_infos_struct.h:32
void mbs_update_free_inline(UpdateInline *ui)
Free the provided inline shape modification structure.
Definition: mbs_saver.c:855
JsonTag tag
Definition: json.h:50
char * pointname
Name of the reference point on the previous body.
Definition: mbs_infos_struct.h:53
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
int Nuser_model
Number of declared user models in MBsysPad, retrieved from the multibody file.
Definition: mbs_data.h:376
MbsInfoRefPoint * endpoint1
Definition: mbs_infos_struct.h:223
@ UM_LUT1D
Definition: mbs_infos_struct.h:19
void * mbs_free(void *__ptr)
Free the pointor ptr and set it to NULL.
Definition: useful_functions.c:21
void mbs_delete_info_opti(MbsInfoOpti *mbs_info_opti)
Definition: mbs_loader_public.c:1333
MbsInfoBody * children_body
Body direct children of the joint.
Definition: mbs_infos_struct.h:152
MbsInfoSolid ** solid_list
Definition: mbs_infos_struct.h:254
int mbs_json_get_double(JsonNode *node, double *val_ptr)
Get the node value content a double.
Definition: mbs_json.c:342
int * qrot
Definition: mbs_infos_struct.h:204
MbsInfoRefPoint * endpoint1
Definition: mbs_infos_struct.h:239
int d_type
other = 0; simplified = 1, forced = 2, optimized = 3, resulting = 4, related = 5,
Definition: mbs_infos_struct.h:31
MbsInfoBodytree * bodytree
Definition: mbs_infos_struct.h:428
MbsInfoUserIOs * mbs_new_info_user_IOs(void)
Definition: mbs_loader_public.c:1241
int nbody
Number of bodies in the system.
Definition: mbs_data.h:258
int mbs_info_structurer(MbsInfos *mbs_infos)
mbs_info_structurer
Definition: mbs_loader_public.c:183
double * scale
Scale (x, y, z) of the shape, Set to NULL to not update it.
Definition: mbs_saver_struct.h:85
UserUpdates * mbs_update_new_user()
Allocate and initialize an user update structure.
Definition: mbs_saver.c:754
double * position
Position (x, y, z) of the shape, Set to NULL to not update it.
Definition: mbs_saver_struct.h:83
double ** l
Array containing the center of mass coordinates (in the body fixed frame, one column per body includi...
Definition: mbs_data.h:252
int mbs_info_init_and_binderXML(MbsInfos *mbs_infos, const char *mbs_xml_name, int mission)
Definition: mbs_xml_binder.c:3184
int mbs_update(MbsData *mbs_data, UserUpdates *user_update, const char *filename_in, const char *filename_out, int verbose)
Open the specified MBS file, update it and save it on the specified name.
Definition: mbs_saver.c:25
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_struct.h:151
int * color_resultant
Color of each arrow in RGB format.
Definition: mbs_saver_struct.h:116
char * get_shape_geometry(ShapeIds id)
Get the geometry of the shape from its id.
Definition: mbs_saver.c:996
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:3238
ExtForces_3D * force_3d
Definition: mbs_saver_struct.h:139
int mbs_info_loader(MbsLoader *mbs_loader, const char *mbs_filename, int verbose)
Read the mbs file and store all used file description.
Definition: mbs_loader_public.c:82
double length
Definition: mbs_infos_struct.h:226
void free_ivec_1(int *vec)
release memory for a vector of integers, starting with index 1
Definition: mbs_1D_array.c:595
@ JSON_NULL
Definition: json.h:31
void copy_ivec_0(int *vec_src, int *vec_dest, int l_v)
Copy the content of a vector(of size l_v) of integers to a second vector, starting with index 0.
Definition: mbs_1D_array.c:600
MbsInfoUserModel ** user_model_list
Definition: mbs_infos_struct.h:359
int * color_x
Definition: mbs_saver_struct.h:113
@ SHAPE_CYLINDER
Definition: mbs_saver_struct.h:15
int save_joints
Specify if the current joint coordinates (q, qd, qdd) must be saved as the initial joint value in the...
Definition: mbs_load_struct.h:59
void mbs_delete_info_links(MbsInfoLinks *mbs_info_links)
Definition: mbs_loader_public.c:1053
MbsInfoBall ** ball_list
Definition: mbs_infos_struct.h:252
Definition: mbs_infos_struct.h:208
MbsInfoOpti * mbs_new_info_opti(void)
Definition: mbs_loader_public.c:1312
MbsInfoJoint ** joint_list
Array of pointers to the MDS_joint_strct describing each joint leaving the body.
Definition: mbs_infos_struct.h:166
MbsInfoRefPoint * parent_point
parent point of the sensor (NULL if it is a parent joint)
Definition: mbs_infos_struct.h:63
void mbs_update_free_extforce(UpdateExtForces *force)
Free the provided external forces modifications structure.
Definition: mbs_saver.c:1353
double g[3+1]
The 3 gravity components.
Definition: mbs_data.h:256
int Rot
1 if the computation of the sensor rotation matrix has been asked, 0 otherwise.
Definition: mbs_infos_struct.h:88
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
int mbs_data_to_info(MbsData *mbs_data, MbsLoader *mbs_loader)
Update the MbsInfos with the given MbsData.
Definition: mbs_saver.c:495
UpdateShape * mbs_update_new_shape()
Initialize and allocate an 3D shape modification structure.
Definition: mbs_saver.c:811
double * d_ptr
Definition: mbs_infos_struct.h:41
double * value
Value set at loading.
Definition: mbs_infos_struct.h:379
char * description
Description of the parameter in the user model.
Definition: mbs_infos_struct.h:283
int n_body
Definition: mbs_infos_struct.h:179
void copy_dvec_0(double *vec_src, double *vec_dest, int l_v)
Copy the content of a vector (of sizel_v) of doubles to a second vector, starting with index 0.
Definition: mbs_1D_array.c:1100
int mbs_update_insert_inline(UserUpdates *user_update, int on_base, const char *body_name, const char *shape_name, const char *shape_url, double position[3], double scale[3], double rotation[3], double transparency, int prj_relative_url, int visible)
Insert instruction to update the content of a visualization inline shape.
Definition: mbs_saver.c:925
@ SHAPE_NONE
Definition: mbs_saver_struct.h:13
void free_dvec_0(double *vec)
release memory for a vector of doubles, starting at index 0
Definition: mbs_1D_array.c:1090
@ UM_STRUCTURE
Definition: mbs_infos_struct.h:22
Definition: mbs_saver_struct.h:170
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
MbsInfoRefPoint * endpoint2
Definition: mbs_infos_struct.h:224
#define MBS_INFO_SUCCESS
Definition: mbs_define.h:30
char * shape_name
Name of the shape in the shape list.
Definition: mbs_saver_struct.h:65
MbsInfoUserModels * user_models
Definition: mbs_infos_struct.h:431
double q0
Initial position of the joint.
Definition: mbs_infos_struct.h:136
struct UpdateShape * next
Pointer to next shape to be updated.
Definition: mbs_saver_struct.h:94
#define MBS_INFO_READER
Definition: mbs_define.h:23
int mbs_data_to_info(MbsData *s, MbsLoader *mbs_loader)
Update the MbsInfos with the given MbsData.
Definition: mbs_saver.c:495
Declare saver structure and enumeration.
int mbs_update_insert_shape(UserUpdates *user_update, int on_base, const char *body_name, const char *shape_name, ShapeIds shape_nature, double size[3], double *radius, double *height, double position[3], double scale[3], double rotation[3], double transparency, int visible)
Insert instruction to update the content of a visualization 3D shape.
Definition: mbs_saver.c:1051
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
void mbs_update_free_link(UpdateLinkForces *link)
Free the provided link forces modifications structure.
Definition: mbs_saver.c:903
double d_min
bounds values for optimization
Definition: mbs_infos_struct.h:33
int symb_qdd
Flag to generate symbol for acceleration.
Definition: mbs_infos_struct.h:148
double * qdd0
Array with the initial values of the generalized acceleration.
Definition: mbs_data.h:291
@ JSON_ARRAY
Definition: json.h:35
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:3500
MbsInfoExtforce ** extforce_list
Pointer to a list of external force sensor
Definition: mbs_infos_struct.h:476
char * base_body_name
baseBodyName as defined in the base body in mbs/json file
Definition: mbs_infos_struct.h:124
int show_z
Definition: mbs_saver_struct.h:106
char * body_name
Name of the body with the shape, disregarded if on_base is true.
Definition: mbs_saver_struct.h:29
char * name
Definition: mbs_infos_struct.h:349
int Jac
1 if the computation of the sensor Jacobian ( ) has been asked, 0 otherwise.
Definition: mbs_infos_struct.h:94
char * joint_parent
Definition: mbs_infos_struct.h:151
int mbs_copy_info_joint(MbsInfoJoint *mbs_info_joint_src, MbsInfoJoint *mbs_info_joint_dest)
Definition: mbs_loader_public.c:1611
#define MSG_ERR
Definition: mbs_saver.c:22
MbsInfoLink ** link3D_list
Definition: mbs_infos_struct.h:273
char * name
Name of the body.
Definition: mbs_infos_struct.h:160
double * qdd
Array with the current values of the generalized acceleration.
Definition: mbs_data.h:287
Define modifications to be done on link force (1D), or new to add.
Definition: mbs_saver_struct.h:149
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
#define MBS_INFO_WARNING
Definition: mbs_define.h:31
MbsInfoJoint ** joint_list
Definition: mbs_infos_struct.h:183
char * body_name
Name of the body with the shape, disregarded if on_base is true.
Definition: mbs_saver_struct.h:63
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
MbsInfoDData * d_length
Definition: mbs_infos_struct.h:228
int n_link
Definition: mbs_infos_struct.h:269
int mbs_makedirs(char *path)
Create (recursively) the specified directory.
Definition: mbs_path.c:586
char * mbsname
Name of the project in the multibody system file.
Definition: mbs_infos_struct.h:438
char * padversion
Version number of the MBsysPAD that last modified the file.
Definition: mbs_infos_struct.h:440
MbsInfoJoint * find_joint_in_joint_list(MbsInfos *mbs_infos, char *jointname)
Definition: mbs_loader_public.c:1484
int remove_prjpath(char **path, char *project_source_dir)
If the path start with PRJPATH, an new path is allocated replacing it.
Definition: mbs_path.c:524
int n_extforce
Number of external force in the model.
Definition: mbs_infos_struct.h:453
double * size
Size, SHAPE_BOX only, along x, y, z. Set to NULL to not update it.
Definition: mbs_saver_struct.h:76
int n_point
Number of anchor points.
Definition: mbs_infos_struct.h:443
Define modification to be done on a inline.
Definition: mbs_saver_struct.h:25
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
int is_symmmetric
asymmetric = 0, symmetric master = 1, symmetric salve = 2.
Definition: mbs_infos_struct.h:325
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
int n_in
Number of INPUT user IO in the system.
Definition: mbs_infos_struct.h:390
UpdateLinkForces * linkforces
Definition: mbs_saver_struct.h:178
int * sensor_point_list
List of the point index (in MbsInfos::point_list) that has a sensor.
Definition: mbs_infos_struct.h:450
static int xmlSaveFormatFile(const char *filename, xmlDocPtr cur, int format)
Definition: mbs_xml.h:100
@ SHAPE_SPHERE
Definition: mbs_saver_struct.h:17
double diameter
Diameter of the arrow, use 0 to not update the diameter.
Definition: mbs_saver_struct.h:119
int count_json_array_elements(JsonNode *node)
Counts the number of element in the Json array.
Definition: mbs_json.c:18
void mbs_delete_info_cuts(MbsInfoCuts *mbs_info_cuts)
Definition: mbs_loader_public.c:972
MbsInfos * mbs_info_reader(const char *mbs_filename, int verbose)
Read the mbs file to retrieve size informations (number of joints...).
Definition: mbs_loader_public.c:20
struct UpdateLinkForces * next
Pointer to next force to be updated.
Definition: mbs_saver_struct.h:166
struct MbsInfoDData * master_d_ptr
Definition: mbs_infos_struct.h:39
int mbs_stricmp(const char *__s1, const char *__s2)
Compare two char with _stricmp (convert strings to lower case, ignoring case sensitive).
Definition: useful_functions.c:584
Definition: mbs_infos_struct.h:356
void mbs_update_free_inline(UpdateInline *ui)
Free the provided inline shape modification structure.
Definition: mbs_saver.c:855
int custom_mbs_info
Internal flag to specify if a custom MbsInfo was set in the structure ( and thus must not be freed) o...
Definition: mbs_load_struct.h:103
ExtForces_3D * mbs_update_new_extforce_3d(int show, int show_x, int show_y, int show_z, int show_resultant, int position_at_end, int color_x[3], int color_y[3], int color_z[3], int color_resultant[3], double diameter, double scale)
Allocate and initialize a external force/torque visualization parameter.
Definition: mbs_saver.c:1214
int Omp
1 if the computation of the sensor angular acceleration has been asked, 0 otherwise.
Definition: mbs_infos_struct.h:73
double * lrod
Array with the length of each rod.
Definition: mbs_data.h:316
void mbs_update_free_shape(UpdateShape *us)
Free the provided 3D shape modification structure.
Definition: mbs_saver.c:878
int n_link3D
Definition: mbs_infos_struct.h:272
void mbs_update_free_shape(UpdateShape *ui)
Free the provided 3D shape modification structure.
Definition: mbs_saver.c:878
int n_user_IO
Number of declared user IO in MBsysPad, retrieved from the file.
Definition: mbs_data.h:383
int symb_qd
Flag to generate symbol for velocity.
Definition: mbs_infos_struct.h:147
ExtForces_3D * mbs_update_dup_extforce_3d(ExtForces_3D *orig, int new_col_x[3], int new_col_y[3], int new_col_z[3], int new_col_res[3])
Clone an existing 3D forces visualization and apply the colors change.
Definition: mbs_saver.c:1286
MbsInfoRefPoint * endpoint2
Definition: mbs_infos_struct.h:263
int Vit
1 if the computation of the sensor linear velocity has been asked, 0 otherwise.
Definition: mbs_infos_struct.h:69
MbsInfoJoint ** all_joint_list
Ordered list of all joints in the model
Definition: mbs_infos_struct.h:470
This structure contains all information about an external force sensor defined on the MBS structure.
Definition: mbs_infos_struct.h:81
char * shape_url
Path to the shape file.
Definition: mbs_saver_struct.h:34
int Jac
1 if the computation of the sensor Jacobian ( ) has been asked, 0 otherwise.
Definition: mbs_infos_struct.h:74
int n_joint
Number of joints leaving the body.
Definition: mbs_infos_struct.h:165
MbsInfoPoint * mbs_get_info_point(MbsInfoBody *mbs_body, const char *name, int verbose, int *err)
Retrieve the point matching the given name on a body.
Definition: mbs_infos_helper.c:395