Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about files in examples #45

Closed
ManuelZ opened this issue Nov 23, 2021 · 2 comments
Closed

Question about files in examples #45

ManuelZ opened this issue Nov 23, 2021 · 2 comments

Comments

@ManuelZ
Copy link

ManuelZ commented Nov 23, 2021

Hi, I just discovered your software, it's amazing.

I would like to know what's the purpose of the files under mbsim/examples/xml and under the rest of mbsim/examples.

I have been able to open some of the XML ones (e.g. .mbsx) and I think that they define geometry and parameters for a simulation, but I don't understand what are all the others for (e.g. examples\mechanics\basics\slider_crank\*).

Thanks,
Manuel

@foerg
Copy link
Contributor

foerg commented Nov 24, 2021

Thank you for your positive feedback.

MBSim provides different user interfaces for modelling and simulation:

  • the C++ interface is the most basic interface. The models (e.g. under examples/mechanics) are build by C++ code. To define the mass of a body (e.g. 10 kg), the code would be body->setMass(10); Before simulation the code defining the model must be compiled.
  • the xmlflat interface allows for modelling with the markup language xml. No compilation is required to run the model. Flat means that the model can not have any parameters, just numerical values are allowed. The XML-code would look like <mass>10</mass>
  • the xml interface is the most high level interface. It provides an preprocessor (octave or python) that allows you to parametrize your model, e.g. <mass>m</mass> where "m" is a parameter.
  • the GUI is the most convenient interface. With it you can build up your model graphically and save it to an xml file. The mass of the body can then be defined by a property dialog. The GUI should be able to load and run all examples under "examples/xml" and "examples/xmlflat".

I hope this helps a little bit,
Martin

@ManuelZ
Copy link
Author

ManuelZ commented Feb 10, 2022

Thank you Martin, this clarifies a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants