Hallo Juergen,

> 1. How compares it to e.g. Bullet or ODE?

Well, ODE (don't know too much about Bullet) would be characterized as a "physics realism engine". ODE is designed to run in real-time, and to do so, it cuts many corners and implement a number of techniques to stabilize the simulation even at every low update rate (0.01 seconds or something like that), and it does so at the expense of precision in the results (by numerical damping, stiffness control, etc.). Basically, it is good for very quick and very rough simulations, and is mostly used either for computer games or for testing high-level controllers for robots, in both cases, precision beyond the "looks realistic" criteria is not needed. My library is high-fidelity, meaning that simulations of motion of a system cannot, in general, be run in real-time because it doesn't have these stabilization techniques and instead tries to produce accurate results (variable-step integrator) regardless of the time it takes to get them. In other words, the application domains are completely different. If you want a multi-body dynamics library that rivals professional motion analysis software like MSC.ADAMS or several of the CAD-software add-ons, then ODE or Bullet are not appropriate at all, you need something along the lines of my library. Of course, if you need to do a computer game with some realistic dynamics or you need a real-time simulator for a robot environment, then ODE is the way to go. In that sense, my library and physics engines like ODE don't compare (it is like comparing OpenCascade and Ogre3D, they don't do the same thing at all).

> 2. I have some what bad experience with Master/PhD OSS projects. Starts out very promising > and die as soon as the PhD is done 
> and the people starts to work.... 

Well, I can't promise anything. I'm not gonna graduate from my PhD in at least 2 years still. And most of the multi-body dynamics code that I have is from my Masters degree (and some was taken from previous work during undergrad years). I can't guarantee "long term support", but I don't intend to disappear from the face of the Earth any time soon either.

> 3. Also I have to say I've come to hate generic programming with templates! Unbelivable two
> page error massages from the compiler 
> as a relult of a small API type error. This stuff makes all "interfaces" useless... So hope you 
> didn't do it like e.g. OpenMesh...

Well, I disagree very much with your assessment of generic programming, but I don't want to start a lengthy debate on the subject. The part of the library that deals with multi-body dynamics is almost entirely written in pure object-oriented programming, with very little templates, beyond basic "type parametrization" (e.g. vect<double,3> for a 3D vector). So, you don't have to worry too much about that. Of course, much of the rest of my library (which includes many other things like optimization, state-estimation, motion-planning, interpolation, probabilistic algorithms, etc.) are written largely in generic programming and template meta-programming, but these parts I don't intend to include in any way into a FreeCAD module. So, my intent for this module is purely object-oriented, and there are also obvious technical reasons why OOP is preferred for a end-user oriented application (i.e. run-time flexibility).


cheers,
Mikael.

On Sun, Apr 22, 2012 at 7:26 AM, Juergen Riegel <FreeCAD@juergen-riegel.net> wrote:
Hi Mikael,
very interesting indeed!

You right, the projects would indeed fit very well! With the Assembly module the object model and visualization would be there.

I would have some questions:
1. How compares it to e.g. Bullet or ODE?

2. I have some what bad experience with Master/PhD OSS projects. Starts out very promising and die as soon as the PhD is done
and the people starts to work....

3. Also I have to say I've come to hate generic programming with templates! Unbelivable two page error massages from the compiler
as a relult of a small API type error. This stuff makes all "interfaces" useless... So hope you didn't do it like e.g. OpenMesh...


All the best
Juergen



Am 18.04.2012 17:37, schrieb Mikael Persson:
Hi FreeCAD dev team!

I like your project! Finally a very promising open-source CAD software project!

And development-wise I think you have made all the right choices so far: Qt, Coin3D, OpenCascade, cmake, etc.

I've been developing and using a multi-body dynamics library (well, that's just a part of it) in C++. However, I have no visualization software for this library and I have been looking for a good platform on which to create that visualization. I eventually narrowed it down to Qt and some open-inventor-like library. So, it seems natural to create my visualization software as a workbench / module / plugin for your FreeCAD project.

First, a little information about me. I'm a PhD candidate at McGill University in Mechanical Engineering. I've also been a programmer for many years (since mid-high-school), mostly in C++. I did many hobby projects in the past, mostly started out doing simple 3D computer games and related tools (height-map editors, particle system editors, 3D model importers, etc.), when I got to college, my projects moved a bit more professional and I started to write more high-fidelity multi-body dynamics simulators as well as a number of related math utilities (lin-alg, num. integrators, optimizers, etc.). Now, my work mostly involves motion-planning (probabilistic algorithms) and state-estimation (non-linear Kalman filtering). But during my Masters, I developed a lot of code for doing both multi-body dynamics simulations and model-reference (or model-based) control for a humanoid robot. So, that code has been pretty thoroughly tested and validated.

This code is now fairly feature-rich and it is mostly object-oriented (as opposed to much of the rest of my library that mostly uses generic programming and template meta-programming techniques). I rarely add much to it these days because it has reached a fairly mature and stable point and all the features that I need for simulation, model-based control, and motion-planning are already in place, but it lacks any kind of visualization (which wasn't much of a problem before, but it is starting to feel like something I should add to it). You can find my overall library under my github public repository here:


But, the part of the library that does multi-body dynamics is found under this folder:


The only real external dependency of my library are some of the Boost libraries (Thread, MPL, Concept-Check, and a few basic things). The other external dependencies are for test programs that aren't core elements of the library by any means. I also have my own RTTI system and serialization library (xml or binary). But overall, the library is light-weight and most other parts of it are header-only (but not the multi-body dynamics part, because it's a simple OOP architecture).

I think it would be mutually beneficial to have a module of FreeCAD that uses my multi-body dynamics library, not to mention that I also see that you have an "Assembly" module under development which could also benefit from the type of setup that I have to assemble multi-body systems (based on a KTE framework, where KTE stands for Kinetostatic Transmission Elements, which is an abstraction for any kind of joint or link or any other dynamic or kinematic element). Overall, the potential for an editor for my MBD library would get close to the kind of functionality that MSC.ADAMS provides (its basic functionalities, of course).

What do you think?

The only little problem for me is that I have almost no experience with Python, but I hear it is a breeze to learn (especially after 12-13 years of doing C++!).

I would be planning to start digging into this project in about a month or so (I'm a bit busy at the moment), and I would love to collaborate if anybody is interested in getting involved in this new module for FreeCAD.

Cheers, looking forward to hearing from you guys,

Mikael.


--
Sven Mikael Persson, M.Sc.(Tech.)
PhD Candidate and Vanier CGS Scholar,

Department of Mechanical Engineering,
McGill University,
McConnell Eng. Bldg., Room 429
3480 University Street
Montreal, Quebec
H3A 2A7 Canada

Work: +1-514-398-8202 ext. 429
Cell: +1-514-476-2773



------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev


_______________________________________________
Free-cad-development mailing list
Free-cad-development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/free-cad-development




--
Sven Mikael Persson, M.Sc.(Tech.)
PhD Candidate and Vanier CGS Scholar,

Department of Mechanical Engineering,
McGill University,
McConnell Eng. Bldg., Room 429
3480 University Street
Montreal, Quebec
H3A 2A7 Canada

Work: +1-514-398-8202 ext. 429
Cell: +1-514-476-2773