Robotran C Documentation
mbs_saver.h
Go to the documentation of this file.
1 
9 #ifndef MBS_SAVER_h
10 #define MBS_SAVER_h
11 
12 #include "mbs_data.h"
13 
14 enum {
20 };
21 
22 
26 typedef struct UpdateInline
27 {
28  int on_base;
30  char *body_name;
32  char *shape_name;
35  char *shape_url;
39  double *position;
41  double *scale;
43  double *rotation;
45  double transparency;
51  int visible;
53  struct UpdateInline *next;
56 
60 typedef struct UpdateShape
61 {
62  int on_base;
64  char *body_name;
66  char *shape_name;
75  double *size;
77  double *radius;
79  double *height;
82  double *position;
84  double *scale;
86  double *rotation;
88  double transparency;
91  int visible;
93  struct UpdateShape *next;
95 } UpdateShape;
96 
100 typedef struct ExtForces_3D
101 {
102  int show;
103  int show_x;
104  int show_y;
105  int show_z;
112  int *color_x;
113  int *color_y;
114  int *color_z;
118  double diameter;
119  double scale;
120 
121 } ExtForces_3D;
122 
126 typedef struct UpdateExtForces
127 {
128  int on_base;
130  char *body_name;
132  char *point_name;
134  char *name;
144 
148 typedef struct UpdateLinkForces
149 {
150  char *name;
163  int visible;
168 
169 typedef struct UserUpdates
170 {
178 } UserUpdates;
179 
180 
200 int mbs_update(MbsData *mbs_data, UserUpdates *user_update, const char *filename_in,
201  const char *filename_out, int verbose);
202 
213 int mbs_synchronize(MbsData *mbs_data, MbsLoader *mbs_loader);
214 
226 int mbs_update_user(UserUpdates *user_update, MbsLoader *mbs_loader);
227 
236 int mbs_save(const char *filename, MbsLoader *mbs_loader);
237 
238 
247 int mbs_data_to_info(MbsData *mbs_data, MbsLoader *mbs_loader);
248 
255 
262 
272 
279 
313 int mbs_update_insert_inline(UserUpdates *user_update, int on_base,
314  const char *body_name, const char *shape_name,
315  const char *shape_url, double position[3],
316  double scale[3], double rotation[3],
317  double transparency, int prj_relative_url,
318  int visible);
319 
329 
336 
378 int mbs_update_insert_shape(UserUpdates *user_update, int on_base,
379  const char *body_name, const char *shape_name,
380  int shape_nature, double size[3],
381  double *radius, double *height, double position[3],
382  double scale[3], double rotation[3],
383  double transparency, int visible);
384 
423 ExtForces_3D *mbs_update_new_extforce_3d(int show, int show_x, int show_y, int show_z,
424  int show_resultant, int position_at_end,
425  int color_x[3], int color_y[3], int color_z[3],
426  int color_resultant[3], double diameter, double scale);
427 
434 
455 int mbs_update_insert_link(UserUpdates *user_update, const char *name,
456  const char *first_body, const char *first_point,
457  const char *second_body, const char *second_point,
458  int visible);
459 
475 ExtForces_3D *mbs_update_dup_extforce_3d(ExtForces_3D *orig, int new_col_x[3],
476  int new_col_y[3], int new_col_z[3],
477  int new_col_res[3]);
478 
489 
499 
506 
559 int mbs_update_insert_extforce(UserUpdates *user_update, int on_base, const char *body_name,
560  const char *point_name, char *name, int comp_position,
561  int comp_rotation, int comp_velocity, int comp_acceleration,
562  int comp_jacobian, ExtForces_3D *force_3d, ExtForces_3D *torque_3d);
563 
564 #endif
mbs_update_new_user
UserUpdates * mbs_update_new_user()
Allocate and initialize an user update structure.
Definition: mbs_saver.c:596
MbsLoader::opts
MbsLoadOptions * opts
Contains the options that must be used when loading the project.
Definition: mbs_load_struct.h:78
MbsInfoBodytree::qdriven
int * qdriven
Definition: mbs_binder_public.h:201
MbsInfoOpti::n_d_related
int n_d_related
Definition: mbs_binder_public.h:423
MbsInfoOpti::n_d_simplified
int n_d_simplified
Definition: mbs_binder_public.h:411
MbsInfoCuts::n_rod
int n_rod
Definition: mbs_binder_public.h:252
MbsInfoBall::endpoint1
MbsInfoRefPoint * endpoint1
Definition: mbs_binder_public.h:215
MbsInfos::cuts
MbsInfoCuts * cuts
Definition: mbs_binder_public.h:432
mbs_synchronize
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:155
UpdateExtForces::comp_rotation
int * comp_rotation
Definition: mbs_saver.h:136
ExtForces_3D::color_y
int * color_y
Definition: mbs_saver.h:113
mbs_info_init_and_binderJSON
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
mbs_unix_separator
int mbs_unix_separator(char *path)
In-place replacement of windows-style path separator (\) by Unix separator (/).
Definition: mbs_path.c:34
MBS_INFO_UPDATER
#define MBS_INFO_UPDATER
Definition: mbs_define.h:24
MbsInfoPoint::pt
double * pt
Array with the coordinates (x, y, z) of the point relative to the origin of the body expressed in the...
Definition: mbs_binder_public.h:108
mbs_update_insert_extforce
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:1131
MbsInfoExtforce::name
char * name
Definition: mbs_binder_public.h:86
mbs_delete_infos
void mbs_delete_infos(MbsInfos *mbs_infos)
Definition: mbs_loader_public.c:1371
MbsInfoParameter::structure_name
char * structure_name
Name of the structure, filled if the parameter is a structure.
Definition: mbs_binder_public.h:335
MbsInfoExtforce::Vit
int Vit
1 if the computation of the sensor linear velocity has been asked, 0 otherwise.
Definition: mbs_binder_public.h:92
MbsInfoBall::endpoint2
MbsInfoRefPoint * endpoint2
Definition: mbs_binder_public.h:216
MBS_INFO_FAILURE
#define MBS_INFO_FAILURE
Definition: mbs_define.h:31
find_joint_in_bodytree
MbsInfoJoint * find_joint_in_bodytree(MbsInfos *mbs_infos, char *jointname)
Definition: mbs_loader_public.c:1452
MbsInfos::n_state
int n_state
Number of different named user state variable in the model.
Definition: mbs_binder_public.h:462
MbsInfoBodytree
Definition: mbs_binder_public.h:180
mbs_msg
void mbs_msg(const char *msg,...)
Send a message.
Definition: mbs_message.c:87
mbs_update_new_shape
UpdateShape * mbs_update_new_shape()
Initialize and allocate an 3D shape modification structure.
Definition: mbs_saver.c:653
UpdateInline::scale
double * scale
Scale (x, y, z) of the inline, Set to NULL to not update it.
Definition: mbs_saver.h:41
mbs_update_insert_shape
int mbs_update_insert_shape(UserUpdates *user_update, int on_base, const char *body_name, const char *shape_name, int 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:838
ExtForces_3D::color_z
int * color_z
Definition: mbs_saver.h:114
MbsInfoRefPoint::bodyname
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
MbsInfos::verbose
int verbose
Verbosity level (not yet implemented everywhere):
Definition: mbs_binder_public.h:488
mbs_saver.h
Declare required stuffs to update mbs files from MbsData state and user wishes.
MbsLoader::loaded_structure
void * loaded_structure
Pointer to the loaded mbs file specific structure (related to file format).
Definition: mbs_load_struct.h:103
MbsInfoDData::d_opti
double d_opti
result value of optimization
Definition: mbs_binder_public.h:38
UpdateInline::prj_relative_url
int prj_relative_url
True (1) if the shape url (shape_url) start for project folder (without initial path separator).
Definition: mbs_saver.h:48
mbs_update_insert_inline
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:767
MbsInfoRod::name
char * name
Definition: mbs_binder_public.h:224
get_char_cpy
char * get_char_cpy(const char *fmt,...)
Copy the provided formatted string into a newly allocated memory.
Definition: useful_functions.c:196
MbsInfoBodytree::n_qv
int n_qv
Definition: mbs_binder_public.h:191
MbsInfoParameter::value_list
double * value_list
Vector (index starting at 1) containing the values retrieved from the multibody file.
Definition: mbs_binder_public.h:302
mbs_new_info_joint
MbsInfoJoint * mbs_new_info_joint(void)
Definition: mbs_loader_public.c:674
mbs_get_info_joint
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
MbsInfoParameter::name
char * name
Name of the parameter in the user model.
Definition: mbs_binder_public.h:285
mbs_info_mbsDescR7_binder
int mbs_info_mbsDescR7_binder(MbsInfos *mbs_infos, xmlDocPtr doc, int mission)
Definition: mbs_xml_binder.c:2556
MbsData::m
double * m
Array containing the mass of each body.
Definition: mbs_data.h:252
useful_functions.h
ExtForces_3D::show_x
int show_x
Definition: mbs_saver.h:103
MbsInfos::state_list
MbsInfoParameter ** state_list
List of the user state variables, there are MbsInfos::n_state elements.
Definition: mbs_binder_public.h:466
MbsInfoUserIOs::n_out
int n_out
Number of OUTPUT user IO in the system.
Definition: mbs_binder_public.h:395
mbs_delete_info_body
void mbs_delete_info_body(MbsInfoBody *mbs_info_body, void *all_joints_lists)
Definition: mbs_loader_public.c:742
UpdateInline::rotation
double * rotation
Rotation (around x, y, z) of the inline, Set to NULL to not update it.
Definition: mbs_saver.h:43
mbs_delete_info_parameter
void mbs_delete_info_parameter(MbsInfoParameter *mbs_info_parameter)
Definition: mbs_loader_public.c:1096
SHAPE_NONE
@ SHAPE_NONE
Definition: mbs_saver.h:15
ExtForces_3D::show_resultant
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
ExtForces_3D
Define 3D field for showing an external force sensor.
Definition: mbs_saver.h:100
MbsInfoRefPoint
Structure defining the parent point of a body.
Definition: mbs_binder_public.h:53
MbsInfoJoint::qdd0
double qdd0
Initial acceleration of the joint.
Definition: mbs_binder_public.h:141
MbsInfoOpti::d_forced_list
MbsInfoDData ** d_forced_list
Definition: mbs_binder_public.h:415
MbsData::nqrot
int nqrot
Number of rotational joint (R1, R2 or R3)
Definition: mbs_data.h:269
MbsData::Nlink3D
int Nlink3D
Number of 3D links.
Definition: mbs_data.h:337
mbs_delete_info_ref_point
void * mbs_delete_info_ref_point(MbsInfoRefPoint *mbs_info_ref_point)
Definition: mbs_loader_public.c:498
mbs_update_free_user
void mbs_update_free_user(UserUpdates *uu)
Free the provided user update structure.
Definition: mbs_saver.c:612
mbs_info_update_extforces_xml
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
MbsInfoExtforce::joint_parent
char * joint_parent
parent joint of the current body (should be always NULL, if it is a parent point) ExtForce on a joint...
Definition: mbs_binder_public.h:88
MbsInfos::base
MbsInfoBase * base
Definition: mbs_binder_public.h:430
MbsInfoOpti::n_d_optimized
int n_d_optimized
Definition: mbs_binder_public.h:417
ExtForces_3D::scale
double scale
Scale of the arrow, use 0 to not update the diameter.
Definition: mbs_saver.h:119
MbsInfoBase::n_base_point
int n_base_point
Number of point of interest (extremities of joint bearing a sensor plus anchor point) defined on the ...
Definition: mbs_binder_public.h:125
UpdateShape::on_base
int on_base
True (1) if the shape is on the basebody.
Definition: mbs_saver.h:62
UM_INT
@ UM_INT
Definition: mbs_binder_public.h:26
mbs_data.h
MbsData::ux0
double * ux0
Array with the initial values of the user variables.
Definition: mbs_data.h:386
mbs_delete_info_ball
void mbs_delete_info_ball(MbsInfoBall *mbs_info_ball)
Definition: mbs_loader_public.c:851
mbs_delete_info_solid
void mbs_delete_info_solid(MbsInfoSolid *mbs_info_solid)
Definition: mbs_loader_public.c:921
MbsInfoPoint::body_name
char * body_name
Name of the body holding the point.
Definition: mbs_binder_public.h:107
mbs_error_msg
void mbs_error_msg(int err, const char *msg,...)
Send an error message.
Definition: mbs_message.c:131
MbsInfos::mbsfile
char * mbsfile
Provided filepath of the loaded multibody system.
Definition: mbs_binder_public.h:439
get_dvec_0
double * get_dvec_0(int l_v)
create (with memory allocation) a vector (length l_v) of doubles, starting at index 0
Definition: mbs_1D_array.c:955
LOAD_NONE
@ LOAD_NONE
Definition: mbs_load_struct.h:64
_MBS_ERR_LOW_FILES
#define _MBS_ERR_LOW_FILES
Low Level error number Error during opening/writing files = -9.
Definition: mbs_errors_names.h:157
MbsInfoUserIOs::user_IO_list
MbsInfoUserIO ** user_IO_list
The detail of each user IO in the system.
Definition: mbs_binder_public.h:397
UpdateExtForces::torque_3d
ExtForces_3D * torque_3d
Determine 3D force visualization parameters, set to null to not modify.
Definition: mbs_saver.h:139
MbsInfoJoint
This structure contains all informations about a joint.
Definition: mbs_binder_public.h:133
mbs_new_loader
MbsLoader * mbs_new_loader()
Create a new structure loader used for the loading with options.
Definition: mbs_loader.c:940
MbsInfoDData::MBSdata_d_ptr
double * MBSdata_d_ptr
link in the creation of mbs_data
Definition: mbs_binder_public.h:46
MbsInfoDData::is_related
int is_related
unrelated = 0, master = 1, equal salve = 2, opposite slave = 3
Definition: mbs_binder_public.h:41
MbsData::njoint
int njoint
Number of joints in the system.
Definition: mbs_data.h:259
MbsInfoCuts
Definition: mbs_binder_public.h:249
UpdateShape::visible
int visible
Flag to show the shape (1) or hide it (0). Set to -1 to not update it.
Definition: mbs_saver.h:91
mbs_json_get_string
int mbs_json_get_string(JsonNode *node, char **str_ptr)
Get the node value content a double.
Definition: mbs_json.c:329
UM_LUT2D
@ UM_LUT2D
Definition: mbs_binder_public.h:23
free_ivec_0
void free_ivec_0(int *vec)
release memory for a vector of integers, starting with index 0
Definition: mbs_1D_array.c:490
mbs_get_um_info_parameter
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
MbsData::npt
int npt
Number of anchor points.
Definition: mbs_data.h:249
UserUpdates::shapes
UpdateShape * shapes
Definition: mbs_saver.h:172
mbs_new_info_links
MbsInfoLinks * mbs_new_info_links(void)
Definition: mbs_loader_public.c:1022
mbs_define.h
json_foreach
#define json_foreach(i, object_or_array)
Definition: json.h:100
MbsInfoExtforce::Omp
int Omp
1 if the computation of the sensor angular acceleration has been asked, 0 otherwise.
Definition: mbs_binder_public.h:96
mbs_binder_private.h
MbsInfoExtforce::Om
int Om
1 if the computation of the sensor angular velocity has been asked, 0 otherwise.
Definition: mbs_binder_public.h:93
ExtForces_3D::show
int show
Definition: mbs_saver.h:102
MbsInfoBodytree::n_qrot
int n_qrot
Definition: mbs_binder_public.h:206
MbsData::n_ball
int n_ball
Number of ball constraint in the system.
Definition: mbs_data.h:313
mbs_strcmp
int mbs_strcmp(const char *__s1, const char *__s2)
Compare two char with strcmp.
Definition: useful_functions.c:388
MbsInfoDData::d_max
double d_max
bounds values for optimization
Definition: mbs_binder_public.h:37
MbsInfoUserCstr::n_usercstr
int n_usercstr
Definition: mbs_binder_public.h:403
MbsInfoExtforce::parent_point
MbsInfoRefPoint * parent_point
parent point of the sensor (NULL if it is a parent joint)
Definition: mbs_binder_public.h:87
mbs_update_free_extforce
void mbs_update_free_extforce(UpdateExtForces *force)
Free the provided external forces modifications structure.
Definition: mbs_saver.c:1109
MbsInfoParameter::d_value
MbsInfoDData ** d_value
d_data for the value.
Definition: mbs_binder_public.h:324
MbsInfoBase::gravity
double * gravity
Array with the component (x, y, z) of the gravity vector expressed in the inertial frame.
Definition: mbs_binder_public.h:124
MbsInfoCuts::n_ball
int n_ball
Definition: mbs_binder_public.h:251
mbs_new_info_user_cstr
MbsInfoUserCstr * mbs_new_info_user_cstr(void)
Definition: mbs_loader_public.c:1239
MbsInfoBody::mass
double mass
Mass of the body.
Definition: mbs_binder_public.h:171
mbs_update_insert_link
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:921
mbs_splitext
int mbs_splitext(const char *path, char **prefix, char **extension)
Split the path into a pair (root, ext).
Definition: mbs_path.c:460
MbsInfoBodytree::qu
int * qu
Definition: mbs_binder_public.h:189
mbs_save
int mbs_save(const char *filename, MbsLoader *mbs_loader)
Save the mbs_info to disk.
Definition: mbs_saver.c:355
MbsInfoRod::symmetric_rod_name
char * symmetric_rod_name
Definition: mbs_binder_public.h:233
KEEP_LOADED
@ KEEP_LOADED
Definition: mbs_load_struct.h:74
MbsInfoBodytree::n_joint
int n_joint
Definition: mbs_binder_public.h:185
mbs_copy_info_body
int mbs_copy_info_body(MbsInfoBody *mbs_info_body_src, MbsInfoBody *mbs_info_body_dest)
Definition: mbs_loader_public.c:1615
mbs_update_free_extforce_3d
void mbs_update_free_extforce_3d(ExtForces_3D *force_3d)
Free the provided 3D force visualization structure.
Definition: mbs_saver.c:1061
JSON_OBJECT
@ JSON_OBJECT
Definition: json.h:36
mbs_delete_info_joint
void * mbs_delete_info_joint(MbsInfoJoint *mbs_info_joint)
Definition: mbs_loader_public.c:702
MbsInfoUserIO::size
int size
Number of values in the user IO.
Definition: mbs_binder_public.h:378
mbs_infos_helper.h
MbsInfoSensor::Acc
int Acc
1 if the computation of the sensor linear acceleration has been asked, 0 otherwise....
Definition: mbs_binder_public.h:74
mbs_warning_msg
void mbs_warning_msg(const char *msg,...)
Send a warning message.
Definition: mbs_message.c:100
SHAPE_CYLINDER
@ SHAPE_CYLINDER
Definition: mbs_saver.h:17
mbs_update_user
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:195
MbsInfos
Definition: mbs_binder_public.h:428
mbs_new_info_link
MbsInfoLink * mbs_new_info_link(void)
Definition: mbs_loader_public.c:992
MbsData::Nux
int Nux
Number of user variable.
Definition: mbs_data.h:387
UpdateExtForces::next
struct UpdateExtForces * next
Pointer to next force to be updated.
Definition: mbs_saver.h:141
UpdateExtForces::comp_jacobian
int * comp_jacobian
Flag (0/1) determining informations to compute.
Definition: mbs_saver.h:136
UpdateExtForces::on_base
int on_base
True (1) if the shape is on the basebody.
Definition: mbs_saver.h:128
mbs_load_json.h
This header includes the functions to bind the JSON information to the MbsInfos structure.
MbsInfoUserIO::type
int type
Nature of the user IO:
Definition: mbs_binder_public.h:376
UpdateInline::position
double * position
Position (x, y, z) of the inline, Set to NULL to not update it.
Definition: mbs_saver.h:39
UpdateExtForces
Define modifications to be done on external forces, or new to add.
Definition: mbs_saver.h:126
mbs_new_info_base
MbsInfoBase * mbs_new_info_base(void)
Definition: mbs_loader_public.c:639
mbs_update_new_inline
UpdateInline * mbs_update_new_inline()
Initialize and allocate an inline shape modification structure.
Definition: mbs_saver.c:630
MbsInfoPoint::name
char * name
Name of the point.
Definition: mbs_binder_public.h:106
UserUpdates::inlines
UpdateInline * inlines
Definition: mbs_saver.h:171
mbs_new_info_sensor
MbsInfoSensor * mbs_new_info_sensor(void)
Definition: mbs_loader_public.c:518
UpdateExtForces::comp_acceleration
int * comp_acceleration
Definition: mbs_saver.h:136
mbs_info_configuration
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:1667
find_joint_with_parent_in_joint_list
MbsInfoJoint * find_joint_with_parent_in_joint_list(MbsInfos *mbs_infos, char *jointname)
Definition: mbs_loader_public.c:1572
MbsInfoPoint::sensor
MbsInfoSensor * sensor
Pointer to a sensor structure if a sensor is defined on the point.
Definition: mbs_binder_public.h:110
mbs_new_info_bodytree
MbsInfoBodytree * mbs_new_info_bodytree(void)
Definition: mbs_loader_public.c:775
mbs_new_infos
MbsInfos * mbs_new_infos(void)
Definition: mbs_loader_public.c:1329
mbs_update_new_link
UpdateLinkForces * mbs_update_new_link()
Definition: mbs_saver.c:678
MbsInfoBase::base_point_list
MbsInfoPoint ** base_point_list
Array of pointers to the MDS_point_strct describing each point of the MBS.
Definition: mbs_binder_public.h:126
mbs_adapt_joint_nature
int mbs_adapt_joint_nature(MbsInfoJoint *joint_info, int verbose)
Check the symbols definition and changes the nature to locked if compatible.
Definition: mbs_loader_public.c:1634
MbsInfoJoint::name
char * name
Name of the joint.
Definition: mbs_binder_public.h:135
mbs_dirname
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
mbs_update_free_user
void mbs_update_free_user(UserUpdates *uu)
Free the provided user update structure.
Definition: mbs_saver.c:612
UserUpdates::allow_new
int allow_new
Flag to create the shape (1) if not found on the body or generating an error (0).
Definition: mbs_saver.h:173
MbsInfoBodytree::qv
int * qv
Definition: mbs_binder_public.h:192
MbsData::Nxfrc
int Nxfrc
Number of points where an external force is applied into a body.
Definition: mbs_data.h:362
UM_VECTOR
@ UM_VECTOR
Definition: mbs_binder_public.h:21
_MBS_ERR_MOD_SPEC_19
#define _MBS_ERR_MOD_SPEC_19
Generic error number Module specific errors range from -11 to -19 please read the error message a...
Definition: mbs_errors_names.h:220
MbsInfoSolid
Definition: mbs_binder_public.h:238
MbsInfoCuts::rod_list
MbsInfoRod ** rod_list
Definition: mbs_binder_public.h:256
MbsInfoUserModel
Definition: mbs_binder_public.h:350
MbsInfoPoint::symmetric_point_name
char * symmetric_point_name
Definition: mbs_binder_public.h:115
mbs_new_info_rod
MbsInfoRod * mbs_new_info_rod(void)
Definition: mbs_loader_public.c:868
MbsInfoBodytree::qa
int * qa
Definition: mbs_binder_public.h:204
mbs_new_info_body
MbsInfoBody * mbs_new_info_body(void)
Definition: mbs_loader_public.c:719
MbsInfos::extforce_point_list
int * extforce_point_list
List of the point index (in MbsInfos::point_list) that has a external force.
Definition: mbs_binder_public.h:458
mbs_info_updater
int mbs_info_updater(MbsInfos *mbs_infos, const char *mbs_filename)
Definition: mbs_loader_public.c:131
MbsInfoUserModel::parameter_list
MbsInfoParameter ** parameter_list
Definition: mbs_binder_public.h:355
MbsData::qd0
double * qd0
Array with the initial values of the generalized velocities.
Definition: mbs_data.h:289
mbs_update_new_extforce_3d
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:970
MbsInfoBodytree::qc
int * qc
Definition: mbs_binder_public.h:195
MbsInfoBody::point_list
MbsInfoPoint ** point_list
Array of pointers to the MDS_point_strct describing each point of current body.
Definition: mbs_binder_public.h:176
UpdateInline::next
struct UpdateInline * next
Pointer to next inline to be updated.
Definition: mbs_saver.h:53
mbs_delete_info_base
void mbs_delete_info_base(MbsInfoBase *mbs_info_base)
Definition: mbs_loader_public.c:654
UpdateShape::height
double * height
Height, except for SHAPE_BOX and SHAPE_SPHERE, of the shape.
Definition: mbs_saver.h:79
mbs_update_new_extforce
UpdateExtForces * mbs_update_new_extforce()
Initialize and allocate an external force modification structure.
Definition: mbs_saver.c:1085
ExtForces_3D::show_y
int show_y
Definition: mbs_saver.h:104
MbsData::Nlink
int Nlink
Number of forces acting between two points of the system (force law implemented in user_LinkForces())...
Definition: mbs_data.h:336
mbs_update_dup_extforce_3d
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:1042
UpdateInline::shape_name
char * shape_name
Name of the shape in the shape list.
Definition: mbs_saver.h:32
mbs_new_info_solid
MbsInfoSolid * mbs_new_info_solid(void)
Definition: mbs_loader_public.c:906
MbsInfoBody::inertia
double * inertia
Array with the inertia tensor (Ixx, Ixy, Ixz, Iyy, Iyz, Izz) of the body relative to the center of ma...
Definition: mbs_binder_public.h:173
JSON_LOADED
@ JSON_LOADED
Definition: mbs_load_struct.h:74
mbs_new_info_cuts
MbsInfoCuts * mbs_new_info_cuts(void)
Definition: mbs_loader_public.c:939
MbsInfoJoint::symmetric_joint_name
char * symmetric_joint_name
the name of the symmetric joint (filed if master, NULL if slave or non symmetric)
Definition: mbs_binder_public.h:147
mbs_new_info_ball
MbsInfoBall * mbs_new_info_ball(void)
Definition: mbs_loader_public.c:836
MSG_PRE
#define MSG_PRE
Definition: mbs_saver.c:21
MbsInfoJoint::actuated
int actuated
For inverse dynamic only: 1 if actuated, 0 otherwise.
Definition: mbs_binder_public.h:143
MbsInfoExtforce::Pos
int Pos
1 if the computation of the sensor position has been asked, 0 otherwise.
Definition: mbs_binder_public.h:90
UpdateExtForces::comp_velocity
int * comp_velocity
Definition: mbs_saver.h:136
MbsInfoJoint::d_qf
MbsInfoDData * d_qf
d_data for the forced q
Definition: mbs_binder_public.h:145
MbsInfoExtforce::Jdqd
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
MbsInfoBodytree::qlocked
int * qlocked
Definition: mbs_binder_public.h:198
MbsInfoBodytree::n_qa
int n_qa
Definition: mbs_binder_public.h:203
MbsInfoBall::name
char * name
Definition: mbs_binder_public.h:213
mbs_delete_info_user_IO
void mbs_delete_info_user_IO(MbsInfoUserIO *mbs_info_user_IO)
Definition: mbs_loader_public.c:1217
MbsInfos::sensor_list
MbsInfoSensor ** sensor_list
Pointer to a list of sensor.
Definition: mbs_binder_public.h:477
MbsInfoParameter::type
int type
Type of the parameter between 1 and 7.
Definition: mbs_binder_public.h:288
mbs_new_info_extforce
MbsInfoExtforce * mbs_new_info_extforce(void)
Definition: mbs_loader_public.c:549
MbsInfoJoint::qd0
double qd0
Initial velocity of the joint.
Definition: mbs_binder_public.h:140
MbsInfoSensor::joint_parent
char * joint_parent
parent joint of the current body (NULL if it is a parent point)
Definition: mbs_binder_public.h:67
MbsInfoUserModel::description
char * description
Description of the user model.
Definition: mbs_binder_public.h:353
MbsInfos::user_IOs
MbsInfoUserIOs * user_IOs
Definition: mbs_binder_public.h:435
MbsInfoParameter
Description of a user model parameter loaded from the mbs file.
Definition: mbs_binder_public.h:283
JsonNode
Definition: json.h:41
JSON_NUMBER
@ JSON_NUMBER
Definition: json.h:34
mbs_update_free_link
void mbs_update_free_link(UpdateLinkForces *link)
Free the provided link forces modifications structure.
Definition: mbs_saver.c:745
mbs_update_insert_shape
int mbs_update_insert_shape(UserUpdates *user_update, int on_base, const char *body_name, const char *shape_name, int 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:838
mbs_update_insert_link
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:921
mbs_delete_info_link
void mbs_delete_info_link(MbsInfoLink *mbs_info_link)
Definition: mbs_loader_public.c:1005
MbsInfoSensor::Om
int Om
1 if the computation of the sensor angular velocity has been asked, 0 otherwise.
Definition: mbs_binder_public.h:73
MbsInfoParameter::structure_header
char * structure_header
Header name with path (relative or absolute) of header describing a structure parameter.
Definition: mbs_binder_public.h:337
mbs_msg_v
void mbs_msg_v(int v_opt, int v_lvl, const char *msg,...)
Send a message only of the message level is lower than the verbosity option.
Definition: mbs_message.c:143
MbsLoader
Definition: mbs_load_struct.h:76
MbsInfoParameter::val_ptr
void * val_ptr
Pointer to the memory storing the value.
Definition: mbs_binder_public.h:308
mbs_save
int mbs_save(const char *filename, MbsLoader *mbs_loader)
Save the mbs_info to disk.
Definition: mbs_saver.c:355
MbsData::Nloopc
int Nloopc
Number of loop constraints.
Definition: mbs_data.h:316
MbsInfoUserModel::n_parameter
int n_parameter
Definition: mbs_binder_public.h:354
MbsInfoSensor::reference_joint
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
MbsInfoParameter::symmetric_parameter_name
char * symmetric_parameter_name
The name of the symmetric parameter.
Definition: mbs_binder_public.h:330
MbsInfoExtforce::Acc
int Acc
1 if the computation of the sensor linear acceleration has been asked, 0 otherwise....
Definition: mbs_binder_public.h:94
SHAPE_BOX
@ SHAPE_BOX
Definition: mbs_saver.h:16
MbsInfoSolid::endpoint2
MbsInfoRefPoint * endpoint2
Definition: mbs_binder_public.h:243
mbs_update_free_extforce_3d
void mbs_update_free_extforce_3d(ExtForces_3D *force_3d)
Free the provided 3D force visualization structure.
Definition: mbs_saver.c:1061
UM_STRING
@ UM_STRING
Definition: mbs_binder_public.h:27
JsonNode::key
char * key
Definition: json.h:48
MbsInfoJoint::type
int type
Joint type: T1=1, T2=2, T3=3, R1=4, R2=5, R3=6.
Definition: mbs_binder_public.h:136
UM_SCALAR
@ UM_SCALAR
Definition: mbs_binder_public.h:20
mbs_update_user
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:195
UpdateShape::rotation
double * rotation
Rotation (around x, y, z) of the inline, Set to NULL to not update it.
Definition: mbs_saver.h:86
mbs_new_info_point
MbsInfoPoint * mbs_new_info_point(void)
Definition: mbs_loader_public.c:578
MbsInfoSolid::ignore
int * ignore
Definition: mbs_binder_public.h:245
MbsInfoUserIOs
Definition: mbs_binder_public.h:388
UpdateExtForces::name
char * name
Name of the external force, should be unique.
Definition: mbs_saver.h:134
mbs_delete_info_user_cstr
void mbs_delete_info_user_cstr(MbsInfoUserCstr *mbs_info_user_cstr)
Definition: mbs_loader_public.c:1271
MbsInfoUserIO::name
char * name
Name of the user IO.
Definition: mbs_binder_public.h:372
MbsInfoOpti::d_resulting_list
MbsInfoDData ** d_resulting_list
Definition: mbs_binder_public.h:421
UpdateExtForces::comp_position
int * comp_position
Definition: mbs_saver.h:136
free_dvec_1
void free_dvec_1(double *vec)
release memory for a vector of doubles, starting at index 1
Definition: mbs_1D_array.c:976
MbsInfoUserIOs::n_user_IO
int n_user_IO
Number of user IO in the system.
Definition: mbs_binder_public.h:391
UpdateShape::transparency
double transparency
Transparency (1 is invisible, 0 is fully visible) of the inline, Set to negative value to not update ...
Definition: mbs_saver.h:88
mbs_delete_info_point
void * mbs_delete_info_point(MbsInfoPoint *mbs_info_point)
Definition: mbs_loader_public.c:605
MbsInfos::n_state_value
int n_state_value
Number of user state values.
Definition: mbs_binder_public.h:464
mbs_update_new_inline
UpdateInline * mbs_update_new_inline()
Initialize and allocate an inline shape modification structure.
Definition: mbs_saver.c:630
mbs_new_info_user_IO
MbsInfoUserIO * mbs_new_info_user_IO(void)
Definition: mbs_loader_public.c:1204
MbsData::In
double ** In
Array containing the inertia tensor component of each body (in the body fixed frame,...
Definition: mbs_data.h:253
MbsInfoUserCstr::user_cstr_mat
int ** user_cstr_mat
Definition: mbs_binder_public.h:405
UpdateInline::transparency
double transparency
Transparency (1 is invisible, 0 is fully visible) of the inline, Set to negative value to not update ...
Definition: mbs_saver.h:45
mbs_info_update_linkforce_xml
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
MbsInfoJoint::is_symmmetric
int is_symmmetric
asymmetric = 0, symmetric master = 1, symmetric salve = 2
Definition: mbs_binder_public.h:146
MbsInfoUserCstr
Definition: mbs_binder_public.h:401
MbsData::Nsensor
int Nsensor
< Array of l3DWr vector for each 3D link forces.
Definition: mbs_data.h:359
mbs_delete_info_d_data
void mbs_delete_info_d_data(MbsInfoDData *mbs_info_d_data)
Definition: mbs_loader_public.c:482
mbs_new_info_d_data
MbsInfoDData * mbs_new_info_d_data(void)
Definition: mbs_loader_public.c:462
mbs_delete_info_rod
void mbs_delete_info_rod(MbsInfoRod *mbs_info_rod)
Definition: mbs_loader_public.c:888
UM_STATE
@ UM_STATE
Definition: mbs_binder_public.h:24
MbsInfoSolid::name
char * name
Definition: mbs_binder_public.h:240
mbs_update
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:23
MbsInfoBodytree::n_qc
int n_qc
Definition: mbs_binder_public.h:194
mbs_new_info_ref_point
MbsInfoRefPoint * mbs_new_info_ref_point(void)
Definition: mbs_loader_public.c:487
MbsInfoPoint::is_symmmetric
int is_symmmetric
Definition: mbs_binder_public.h:114
find_body_in_bodytree
MbsInfoBody * find_body_in_bodytree(MbsInfos *mbs_infos, char *bodyname)
Definition: mbs_loader_public.c:1436
fill_all_joint_list
int fill_all_joint_list(MbsInfos *mbs_infos)
Fill the joints list with children parent...
Definition: mbs_loader_public.c:1483
MBS_VERBOSE_ERROR
#define MBS_VERBOSE_ERROR
Definition: mbs_define.h:44
find_project_path
int find_project_path(const char *mbsfile, char *prjpath)
Find the project directory (containing dataR, symbolicR, ...) from Mbs filepath.
Definition: mbs_path.c:74
MbsInfoJoint::parent
MbsInfoRefPoint * parent
Definition: mbs_binder_public.h:153
MbsInfoOpti
Definition: mbs_binder_public.h:409
json_find_element
JsonNode * json_find_element(JsonNode *array, int index)
Definition: json.cc:490
mbs_get_info_body
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
mbs_new_info_user_model
MbsInfoUserModel * mbs_new_info_user_model(void)
Definition: mbs_loader_public.c:1137
MbsInfoOpti::d_optimized_list
MbsInfoDData ** d_optimized_list
Definition: mbs_binder_public.h:418
MbsInfos::n_sensor
int n_sensor
Number of sensor in the model.
Definition: mbs_binder_public.h:451
mbs_new_info_user_models
MbsInfoUserModels * mbs_new_info_user_models(void)
Definition: mbs_loader_public.c:1171
MbsInfoOpti::d_simplified_list
MbsInfoDData ** d_simplified_list
Definition: mbs_binder_public.h:412
MbsInfoBodytree::body_list
MbsInfoBody ** body_list
Definition: mbs_binder_public.h:183
MbsInfoBody::n_point
int n_point
Number of point defined on the body.
Definition: mbs_binder_public.h:175
MbsInfos::user_cstr
MbsInfoUserCstr * user_cstr
Definition: mbs_binder_public.h:436
UpdateShape::radius
double * radius
Radius, except for SHAPE_BOX, of the shape. Set to NULL to not update it.
Definition: mbs_saver.h:77
MbsInfoSensor::Pos
int Pos
1 if the computation of the sensor position has been asked, 0 otherwise.
Definition: mbs_binder_public.h:70
mbs_delete_loader
void mbs_delete_loader(MbsLoader *loader)
Free the memory associated to the given MbsLoader.
Definition: mbs_loader.c:985
mbs_synchronize
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:155
MbsInfoBody
This structure contains all informations about a body.
Definition: mbs_binder_public.h:161
MbsInfoRod::is_symmmetric
int is_symmmetric
Definition: mbs_binder_public.h:232
MbsLoadOptions::load_symb_user
int load_symb_user
Specify the project libraries to be loaded, an enumeration gives possible values:
Definition: mbs_load_struct.h:33
SHAPE_CONE
@ SHAPE_CONE
Definition: mbs_saver.h:18
mbs_update_new_extforce
UpdateExtForces * mbs_update_new_extforce()
Initialize and allocate an external force modification structure.
Definition: mbs_saver.c:1085
UpdateInline::on_base
int on_base
True (1) if the shape is on the basebody.
Definition: mbs_saver.h:28
mbs_update_insert_extforce
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:1131
mbs_info_loader
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:66
MbsInfoOpti::n_d_forced
int n_d_forced
Definition: mbs_binder_public.h:414
MbsInfoBodytree::n_qu
int n_qu
Definition: mbs_binder_public.h:188
UM_LUT1D
@ UM_LUT1D
Definition: mbs_binder_public.h:22
MbsInfoBodytree::n_qdriven
int n_qdriven
Definition: mbs_binder_public.h:200
UserUpdates::extforces
UpdateExtForces * extforces
Definition: mbs_saver.h:176
mbs_xml_binder_private.h
MbsInfoPoint::extforce
MbsInfoExtforce * extforce
Pointer to an external force sensor structure if it is defined on the point.
Definition: mbs_binder_public.h:111
MbsLoader::mbs_infos
MbsInfos * mbs_infos
Contains the multibody structure with more informations than used by computation.
Definition: mbs_load_struct.h:80
MbsInfoParameter::string_name
char * string_name
Pointer containing the string name (if type is 8). NULL otherwise.
Definition: mbs_binder_public.h:306
load_and_create_json
JsonNode * load_and_create_json(const char *mbs_json_filename, int *err)
Definition: mbs_json.c:44
MbsInfos::links
MbsInfoLinks * links
Definition: mbs_binder_public.h:433
mbs_message.h
mbs_xml_info_to_loader
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
MbsInfoPoint::d_pt
MbsInfoDData ** d_pt
Definition: mbs_binder_public.h:113
MbsInfoOpti::d_related_list
MbsInfoDData ** d_related_list
Definition: mbs_binder_public.h:424
mbs_delete_info_user_IOs
void mbs_delete_info_user_IOs(MbsInfoUserIOs *mbs_info_user_IOs)
Definition: mbs_loader_public.c:1252
MbsInfoSensor::name
char * name
Name of the sensor.
Definition: mbs_binder_public.h:65
MbsData::dpt
double ** dpt
Array containing the coordinate of all anchor points (3+1 lines, npt+1 columns).
Definition: mbs_data.h:250
mbs_delete_info_bodytree
void mbs_delete_info_bodytree(MbsInfoBodytree *mbs_info_bodytree, void *all_joints_lists)
Definition: mbs_loader_public.c:810
mbs_json_string
int mbs_json_string(JsonNode *node, char **str_ptr, const char *key, int mission, int allow_missing)
Link between string value and the specific key of a Json node.
Definition: mbs_json.c:284
mbs_loader.h
mbs_delete_info_extforce
void mbs_delete_info_extforce(MbsInfoExtforce *mbs_info_extforce)
Definition: mbs_loader_public.c:570
MbsInfoUserCstr::constr_process
int constr_process
Definition: mbs_binder_public.h:404
mbs_new_info_parameter
MbsInfoParameter * mbs_new_info_parameter(void)
Definition: mbs_loader_public.c:1066
MbsInfoCuts::n_solid
int n_solid
Definition: mbs_binder_public.h:253
get_ivec_0
int * get_ivec_0(int l_v)
create (with memory allocation) a vector (length l_v) of integers, starting at index 0
Definition: mbs_1D_array.c:474
MbsInfoUserIO
Definition: mbs_binder_public.h:369
UpdateInline::visible
int visible
Flag to show the shape (1) or hide it (0). Set to -1 to not update it.
Definition: mbs_saver.h:51
MbsInfoBody::joint_parent
char * joint_parent
parent joint of the current body (NULL if it is a parent point)
Definition: mbs_binder_public.h:166
MbsInfoOpti::n_d_resulting
int n_d_resulting
Definition: mbs_binder_public.h:420
MbsInfoRod
Definition: mbs_binder_public.h:222
MbsInfoParameter::n_value
int n_value
Number of values in the parameter.
Definition: mbs_binder_public.h:300
MbsData::mbs_name
char * mbs_name
Name of the mbs project as it is stored in the xml file.
Definition: mbs_data.h:412
MbsInfoUserModels::n_user_model
int n_user_model
Definition: mbs_binder_public.h:361
MbsInfoBody::com
double * com
Array with the coordinate (x, y, z) of the center of mass of the body relative to the origin of the b...
Definition: mbs_binder_public.h:172
MbsInfoSensor
This structure contains all information about a sensor defined on the MBS structure.
Definition: mbs_binder_public.h:63
mbs_delete_info_user_models
void mbs_delete_info_user_models(MbsInfoUserModels *mbs_info_user_models)
Definition: mbs_loader_public.c:1182
MbsData::q0
double * q0
Array with the initial values of the generalized coordinates.
Definition: mbs_data.h:288
MbsInfoJoint::symb_q
int symb_q
Flag to generate symbol for position.
Definition: mbs_binder_public.h:149
MbsInfoDData
Definition: mbs_binder_public.h:32
ExtForces_3D::position_at_end
int position_at_end
Put the end of the arrow on the sensor (1) or the beginning (0).
Definition: mbs_saver.h:109
MbsInfoParameter::structure_lutfile
char * structure_lutfile
File and path (relative or absolute) to the file containing the Look-up-Table dats.
Definition: mbs_binder_public.h:344
_MBS_ERR_MOD_SPEC_18
#define _MBS_ERR_MOD_SPEC_18
Genericerror number Module specific errors range from -11 to -19 please read the error message an...
Definition: mbs_errors_names.h:214
UpdateShape
Define modifications to be done on a basic shape.
Definition: mbs_saver.h:60
MbsData
Definition: mbs_data.h:246
MbsInfoBodytree::n_qlocked
int n_qlocked
Definition: mbs_binder_public.h:197
MbsData::n_solid
int n_solid
Number of solid constraint in the system.
Definition: mbs_data.h:312
mbs_delete_info_user_model
void mbs_delete_info_user_model(MbsInfoUserModel *mbs_info_user_model)
Definition: mbs_loader_public.c:1150
MbsInfos::opti
MbsInfoOpti * opti
DEPRECATED Specific structure dedicated to a previous project using optimization.
Definition: mbs_binder_public.h:470
XML_LOADED
@ XML_LOADED
Definition: mbs_load_struct.h:74
MbsInfoJoint::nature
int nature
Nature of the joint: independent=1, dependent=2, driven=3, locked=4.
Definition: mbs_binder_public.h:137
MbsInfos::point_list
MbsInfoPoint ** point_list
List of all anchors point in the model
Definition: mbs_binder_public.h:448
UpdateExtForces::point_name
char * point_name
Name of the point with the force.
Definition: mbs_saver.h:132
MbsInfoBall::ignore
int * ignore
Definition: mbs_binder_public.h:218
MbsInfoBase
Structure handling the informations defined on the base of the MBS.
Definition: mbs_binder_public.h:122
MbsInfoSensor::Rot
int Rot
1 if the computation of the sensor rotation matrix has been asked, 0 otherwise.
Definition: mbs_binder_public.h:71
MbsData::n_rod
int n_rod
Number of rod constraint in the system.
Definition: mbs_data.h:314
IGNORE_LOADED
@ IGNORE_LOADED
Definition: mbs_load_struct.h:74
MbsInfoPoint
This structure handle everything that a point on a MBS structure can handle (sensor,...
Definition: mbs_binder_public.h:104
UpdateExtForces::body_name
char * body_name
Name of the body with the force, disregarded if on_base is true.
Definition: mbs_saver.h:130
MbsInfos::n_joint
int n_joint
Number of joints in the model
Definition: mbs_binder_public.h:475
MBS_VERBOSE_WARNING
#define MBS_VERBOSE_WARNING
Definition: mbs_define.h:45
mbs_delete_info_sensor
void mbs_delete_info_sensor(MbsInfoSensor *mbs_info_sensor)
Definition: mbs_loader_public.c:540
MbsInfoDData::d_0
double d_0
initial value for optimization
Definition: mbs_binder_public.h:35
mbs_update_free_inline
void mbs_update_free_inline(UpdateInline *ui)
Free the provided inline shape modification structure.
Definition: mbs_saver.c:697
JsonNode::tag
JsonTag tag
Definition: json.h:50
MbsInfoRefPoint::pointname
char * pointname
Name of the reference point on the previous body.
Definition: mbs_binder_public.h:56
mbs_is_dir_or_file
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
MbsData::Nuser_model
int Nuser_model
Number of declared user models in MBsysPad.
Definition: mbs_data.h:374
MbsInfoRod::endpoint1
MbsInfoRefPoint * endpoint1
Definition: mbs_binder_public.h:226
SHAPE_SPHERE
@ SHAPE_SPHERE
Definition: mbs_saver.h:19
mbs_free
void * mbs_free(void *__ptr)
Free the pointor ptr and set it to NULL.
Definition: useful_functions.c:18
mbs_delete_info_opti
void mbs_delete_info_opti(MbsInfoOpti *mbs_info_opti)
Definition: mbs_loader_public.c:1316
MbsInfoJoint::children_body
MbsInfoBody * children_body
Body direct children of the joint.
Definition: mbs_binder_public.h:155
MbsInfoCuts::solid_list
MbsInfoSolid ** solid_list
Definition: mbs_binder_public.h:257
mbs_json_get_double
int mbs_json_get_double(JsonNode *node, double *val_ptr)
Get the node value content a double.
Definition: mbs_json.c:194
MbsInfoBodytree::qrot
int * qrot
Definition: mbs_binder_public.h:207
MbsInfoSolid::endpoint1
MbsInfoRefPoint * endpoint1
Definition: mbs_binder_public.h:242
MbsInfoDData::d_type
int d_type
other = 0; simplified = 1, forced = 2, optimized = 3, resulting = 4, related = 5,
Definition: mbs_binder_public.h:34
MbsInfos::bodytree
MbsInfoBodytree * bodytree
Definition: mbs_binder_public.h:431
mbs_new_info_user_IOs
MbsInfoUserIOs * mbs_new_info_user_IOs(void)
Definition: mbs_loader_public.c:1224
MbsData::nbody
int nbody
Number of bodies in the system.
Definition: mbs_data.h:257
mbs_info_structurer
int mbs_info_structurer(MbsInfos *mbs_infos)
mbs_info_structurer
Definition: mbs_loader_public.c:166
UpdateShape::scale
double * scale
Scale (x, y, z) of the shape, Set to NULL to not update it.
Definition: mbs_saver.h:84
mbs_update_new_user
UserUpdates * mbs_update_new_user()
Allocate and initialize an user update structure.
Definition: mbs_saver.c:596
UpdateShape::position
double * position
Position (x, y, z) of the shape, Set to NULL to not update it.
Definition: mbs_saver.h:82
MbsData::l
double ** l
Array containing the center of mass coordinates (in the body fixed frame, one column per body includi...
Definition: mbs_data.h:251
mbs_info_init_and_binderXML
int mbs_info_init_and_binderXML(MbsInfos *mbs_infos, const char *mbs_xml_name, int mission)
Definition: mbs_xml_binder.c:2879
mbs_update
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:23
MbsLoadOptions::verbose
int verbose
Verbosity level (not yet implemented everywhere): Verbosity level propagated to other compatible modu...
Definition: mbs_load_struct.h:39
ExtForces_3D::color_resultant
int * color_resultant
Color of each arrow in RGB format.
Definition: mbs_saver.h:115
mbs_info_update_inlines_xml
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
UpdateExtForces::force_3d
ExtForces_3D * force_3d
Definition: mbs_saver.h:138
mbs_info_loader
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:66
MbsInfoRod::length
double length
Definition: mbs_binder_public.h:229
free_ivec_1
void free_ivec_1(int *vec)
release memory for a vector of integers, starting with index 1
Definition: mbs_1D_array.c:495
JSON_NULL
@ JSON_NULL
Definition: json.h:31
copy_ivec_0
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:500
MbsInfoUserModels::user_model_list
MbsInfoUserModel ** user_model_list
Definition: mbs_binder_public.h:362
ExtForces_3D::color_x
int * color_x
Definition: mbs_saver.h:112
json_delete
void json_delete(JsonNode *node)
Definition: json.cc:445
mbs_delete_info_links
void mbs_delete_info_links(MbsInfoLinks *mbs_info_links)
Definition: mbs_loader_public.c:1036
MbsInfoCuts::ball_list
MbsInfoBall ** ball_list
Definition: mbs_binder_public.h:255
MbsInfoBall
Definition: mbs_binder_public.h:211
mbs_new_info_opti
MbsInfoOpti * mbs_new_info_opti(void)
Definition: mbs_loader_public.c:1295
MbsInfoBody::joint_list
MbsInfoJoint ** joint_list
Array of pointers to the MDS_joint_strct describing each joint leaving the body.
Definition: mbs_binder_public.h:169
MbsInfoSensor::parent_point
MbsInfoRefPoint * parent_point
parent point of the sensor (NULL if it is a parent joint)
Definition: mbs_binder_public.h:66
mbs_update_free_extforce
void mbs_update_free_extforce(UpdateExtForces *force)
Free the provided external forces modifications structure.
Definition: mbs_saver.c:1109
MbsData::g
double g[3+1]
The 3 gravity components.
Definition: mbs_data.h:255
MbsInfoExtforce::Rot
int Rot
1 if the computation of the sensor rotation matrix has been asked, 0 otherwise.
Definition: mbs_binder_public.h:91
mbs_data_to_info
int mbs_data_to_info(MbsData *mbs_data, MbsLoader *mbs_loader)
Update the MbsInfos with the given MbsData.
Definition: mbs_saver.c:376
mbs_path.h
mbs_update_new_shape
UpdateShape * mbs_update_new_shape()
Initialize and allocate an 3D shape modification structure.
Definition: mbs_saver.c:653
MbsInfoDData::d_ptr
double * d_ptr
Definition: mbs_binder_public.h:44
MbsInfoUserIO::value
double * value
Value set at loading.
Definition: mbs_binder_public.h:382
MbsInfoParameter::description
char * description
Description of the parameter in the user model.
Definition: mbs_binder_public.h:286
MbsInfoBodytree::n_body
int n_body
Definition: mbs_binder_public.h:182
copy_dvec_0
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:981
UM_STRUCTURE
@ UM_STRUCTURE
Definition: mbs_binder_public.h:25
mbs_update_insert_inline
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:767
free_dvec_0
void free_dvec_0(double *vec)
release memory for a vector of doubles, starting at index 0
Definition: mbs_1D_array.c:971
UserUpdates
Definition: mbs_saver.h:169
MbsLoader::loaded_nature
int loaded_nature
Flag to specifying either if the deep mbs file specific structure must be kept in memory (before load...
Definition: mbs_load_struct.h:100
MbsInfoRod::endpoint2
MbsInfoRefPoint * endpoint2
Definition: mbs_binder_public.h:227
MBS_INFO_SUCCESS
#define MBS_INFO_SUCCESS
Definition: mbs_define.h:29
UpdateShape::shape_name
char * shape_name
Name of the shape in the shape list.
Definition: mbs_saver.h:66
MbsInfos::user_models
MbsInfoUserModels * user_models
Definition: mbs_binder_public.h:434
MbsInfoJoint::q0
double q0
Initial position of the joint.
Definition: mbs_binder_public.h:139
UpdateShape::next
struct UpdateShape * next
Pointer to next shape to be updated.
Definition: mbs_saver.h:93
MBS_INFO_READER
#define MBS_INFO_READER
Definition: mbs_define.h:23
mbs_data_to_info
int mbs_data_to_info(MbsData *s, MbsLoader *mbs_loader)
Update the MbsInfos with the given MbsData.
Definition: mbs_saver.c:376
mbs_update_free_link
void mbs_update_free_link(UpdateLinkForces *link)
Free the provided link forces modifications structure.
Definition: mbs_saver.c:745
MbsInfoDData::d_min
double d_min
bounds values for optimization
Definition: mbs_binder_public.h:36
MbsInfoJoint::symb_qdd
int symb_qdd
Flag to generate symbol for acceleration.
Definition: mbs_binder_public.h:151
MbsData::qdd0
double * qdd0
Array with the initial values of the generalized acceleration.
Definition: mbs_data.h:290
JSON_ARRAY
@ JSON_ARRAY
Definition: json.h:35
mbs_info_update_shapes_xml
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
MbsInfos::extforce_list
MbsInfoExtforce ** extforce_list
Pointer to a list of external force sensor
Definition: mbs_binder_public.h:479
MbsInfoBase::base_body_name
char * base_body_name
baseBodyName as defined in the base body in mbs/json file
Definition: mbs_binder_public.h:127
ExtForces_3D::show_z
int show_z
Definition: mbs_saver.h:105
UpdateInline::body_name
char * body_name
Name of the body with the shape, disregarded if on_base is true.
Definition: mbs_saver.h:30
MbsInfoUserModel::name
char * name
Definition: mbs_binder_public.h:352
MbsInfoExtforce::Jac
int Jac
1 if the computation of the sensor Jacobian ( ) has been asked, 0 otherwise.
Definition: mbs_binder_public.h:97
MbsInfoJoint::joint_parent
char * joint_parent
Definition: mbs_binder_public.h:154
mbs_copy_info_joint
int mbs_copy_info_joint(MbsInfoJoint *mbs_info_joint_src, MbsInfoJoint *mbs_info_joint_dest)
Definition: mbs_loader_public.c:1594
MSG_ERR
#define MSG_ERR
Definition: mbs_saver.c:20
MbsInfoBody::name
char * name
Name of the body.
Definition: mbs_binder_public.h:163
UpdateShape::shape_nature
int shape_nature
Indicate if the shape is a box, cylinder, cone or sphere:
Definition: mbs_saver.h:69
MbsInfoParameter::flag_PRJPATH
int flag_PRJPATH
Flag to indicate that the path to the data file start from the project path (stored as "PRJPATH" in m...
Definition: mbs_binder_public.h:342
MBS_INFO_WARNING
#define MBS_INFO_WARNING
Definition: mbs_define.h:30
MbsInfoBodytree::joint_list
MbsInfoJoint ** joint_list
Definition: mbs_binder_public.h:186
UpdateShape::body_name
char * body_name
Name of the body with the shape, disregarded if on_base is true.
Definition: mbs_saver.h:64
MbsInfoSensor::Jdqd
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
MbsInfoRod::d_length
MbsInfoDData * d_length
Definition: mbs_binder_public.h:231
mbs_makedirs
int mbs_makedirs(char *path)
Create (recursively) the specified directory.
Definition: mbs_path.c:586
MbsInfos::mbsname
char * mbsname
Name of the project in the multibody system file.
Definition: mbs_binder_public.h:441
MbsInfos::padversion
char * padversion
Version number of the MBsysPAD that last modified the file.
Definition: mbs_binder_public.h:443
find_joint_in_joint_list
MbsInfoJoint * find_joint_in_joint_list(MbsInfos *mbs_infos, char *jointname)
Definition: mbs_loader_public.c:1467
remove_prjpath
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
MbsInfos::n_extforce
int n_extforce
Number of external force in the model.
Definition: mbs_binder_public.h:456
UpdateShape::size
double * size
Size, SHAPE_BOX only, along x, y, z. Set to NULL to not update it.
Definition: mbs_saver.h:75
MbsInfos::n_point
int n_point
Number of anchor points.
Definition: mbs_binder_public.h:446
UpdateInline
Define modification to be done on a inline.
Definition: mbs_saver.h:26
mbs_json_array
int mbs_json_array(JsonNode *node, double **tab_ptr, int *size, const char *key, int mission, int allow_missing)
Link an array (1D) value and the specific key of a Json node or the current node.
Definition: mbs_json.c:412
MbsInfoParameter::is_symmmetric
int is_symmmetric
asymmetric = 0, symmetric master = 1, symmetric salve = 2.
Definition: mbs_binder_public.h:328
MbsInfoBody::point_parent
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
MbsInfoUserIOs::n_in
int n_in
Number of INPUT user IO in the system.
Definition: mbs_binder_public.h:393
UserUpdates::linkforces
UpdateLinkForces * linkforces
Definition: mbs_saver.h:177
MbsInfos::sensor_point_list
int * sensor_point_list
List of the point index (in MbsInfos::point_list) that has a sensor.
Definition: mbs_binder_public.h:453
ExtForces_3D::diameter
double diameter
Diameter of the arrow, use 0 to not update the diameter.
Definition: mbs_saver.h:118
count_json_array_elements
int count_json_array_elements(JsonNode *node)
Counts the number of element in the Json array.
Definition: mbs_json.c:14
mbs_delete_info_cuts
void mbs_delete_info_cuts(MbsInfoCuts *mbs_info_cuts)
Definition: mbs_loader_public.c:955
mbs_info_reader
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:17
MbsInfoDData::master_d_ptr
struct MbsInfoDData * master_d_ptr
Definition: mbs_binder_public.h:42
mbs_stricmp
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:404
mbs_json.h
MbsInfoUserModels
Definition: mbs_binder_public.h:359
mbs_update_free_inline
void mbs_update_free_inline(UpdateInline *ui)
Free the provided inline shape modification structure.
Definition: mbs_saver.c:697
MbsLoader::custom_mbs_info
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:84
mbs_update_new_extforce_3d
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:970
MbsInfoSensor::Omp
int Omp
1 if the computation of the sensor angular acceleration has been asked, 0 otherwise.
Definition: mbs_binder_public.h:76
MbsData::lrod
double * lrod
Array with the length of each rod.
Definition: mbs_data.h:315
mbs_update_free_shape
void mbs_update_free_shape(UpdateShape *us)
Free the provided 3D shape modification structure.
Definition: mbs_saver.c:720
mbs_update_free_shape
void mbs_update_free_shape(UpdateShape *ui)
Free the provided 3D shape modification structure.
Definition: mbs_saver.c:720
MbsData::n_user_IO
int n_user_IO
Definition: mbs_data.h:377
MbsInfoJoint::symb_qd
int symb_qd
Flag to generate symbol for velocity.
Definition: mbs_binder_public.h:150
mbs_errors_names.h
mbs_update_dup_extforce_3d
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:1042
MbsInfoSensor::Vit
int Vit
1 if the computation of the sensor linear velocity has been asked, 0 otherwise.
Definition: mbs_binder_public.h:72
MbsInfos::all_joint_list
MbsInfoJoint ** all_joint_list
Ordered list of all joints in the model
Definition: mbs_binder_public.h:473
MbsInfoExtforce
This structure contains all information about an external force sensor defined on the MBS structure.
Definition: mbs_binder_public.h:84
UpdateInline::shape_url
char * shape_url
Path to the shape file.
Definition: mbs_saver.h:35
MbsInfoSensor::Jac
int Jac
1 if the computation of the sensor Jacobian ( ) has been asked, 0 otherwise.
Definition: mbs_binder_public.h:77
MbsInfoBody::n_joint
int n_joint
Number of joints leaving the body.
Definition: mbs_binder_public.h:168
mbs_get_info_point
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
json_find_member
JsonNode * json_find_member(JsonNode *object, const char *name)
Definition: json.cc:511