Excuses for deleting the thread, I should have locked it instead but it cannot be undone. I'll be more careful next time.
Examples can be used standalone with very few dependencies, but you will have to look at the build file
(CMakeLists.txt or premake) to see where all the required files are located.
Examples are not really written to be copied into some other game engine or demo framework, but we could make it easier:
Of course we could duplicate all files needed for an individual example/tutorial in the same folder.
For example, I moved the files from the objImportDemo in one folder in a separate bitbucket repo:
https://bitbucket.org/erwincoumans/stan ... ImportDemo
Originally the same files are spread over various folders (ignore BasicDemo and HelloWorld, they are unused).
https://bitbucket.org/erwincoumans/stan ... ImportDemo
I don't view merging files from multiple folders into a single folder as 'removing dependencies'.
If we would copy all required files for each example/demo in its own folder, there would be a huge amount of duplication, which is not a good idea I think. An alternative is to move parts of the examples/tutorial that are truly reusable (in other graphics/game engines) into a few libraries, for example an BulletImporter library, that can load meshes (.obj, .dae. .stl, .ply), images (.png, .tga ) and rigid bodies (.urdf, .sdf).
Would that help?
Over the upcoming years, I expect there to be hundreds of examples (tutorials etc), so the Example Browser will be the only reasonably way to let developers explore all features of Bullet. If you have to start each example individually that is very inefficient. Still, it is good for people to have the option to run and investigate an individual example outside of the Example Browser.
benelot wrote:
Things that come to my mind as examples are:
-Single Rigid Body simulation vs. Featherstone simulation
The URDF import demo can setup a world in either Rigid Body + TypedConstraint or btMultiBody.
benelot wrote:
-Single Rigid Body with different solvers to switch (Is that even possible? It would require to setup the world again when changing the options in the GUI)
Yes, you can switch the constraint solver, the ExampleBrowser/Vehicles/ForkLift is an example of this. It may not be enabled at the moment (switching used to work in a previous build).
basroil wrote:
There is a pretty intensive one I would like to submit on motorized joints for robotics that has been requested for a few years now.
There are various examples in the Example Browser that allow motorized robots, loading the robot from a .urdf file, using btMultiBody (or btRigidBody+btTypedConstraint, but those joints would be less rigid with the default PGS LCP constraint solver at 10 iterations, hence most prefer Featherstone btMultiBody). See for example ExampleBrowser/InverseDynamics/Inverse Dynamics URDF example that lets you control a KUKA arm. Also the ExampleBrowser/Importers/ImportURDF/URDF (MultiBody) allows you to see the target velocity (using a velocity motor contraint). We have tested this for robotic arms, robot vehicles and humanoid / biped robots and it works very well.
I merged Mobeen's by hand here, there are no standalone CMakeLists.txt files for those yet.
https://github.com/bulletphysics/bullet3/pull/620
Thanks for the help!