Documentation on 3D models
In the SoftwareWiki, which is about to be removed, there were instructions on how to create 3D Models, which particularly referred to Simox.
Where is it to be put? I found the following existing similar, but not identical topics:
- https://git.h2t.iar.kit.edu/sw/simox/simox/-/wikis/RobotModels
- https://git.h2t.iar.kit.edu/sw/simox/simox/-/wikis/FileFormat
@reister (being a code owner of the virtual robots; please tell me if you assume that it is rather someone else's topic) could you please have a look to decide what you deem suitable?
Click to toggle .md content from SoftwareWiki
Updating Robot Model in Simox
-
If there is an update in the CAD model first check to which simox model this belongs
-
Reduce the CAD model to the parts that form a common simox model:
- Examples can be found here \i61fs3b\share\Konstruktion\ARMAR-DE\00000_ARMAR_DE_Gesamtsystem\ArmarXModel
- To create a copy save the current CAD Model with „Sicherung speichern“. To be sure close Creo afterwards, open it again and select new „Arbeitsverzeichnis“.
- If possible create one model corresponding to the simox model with all included part (to extract physics parameters) and another one including only the visually relevant parts
-
To create the visualization model
- If possible create a „Schrumpfverpackgung“ (Kopie speichern, Schrumpfverpackung
- Select „zusammengeführter Volumenkörper“
- For easy model „Qualität Grad 1“ if needed 2
- Deselect „Bohrungen füllen“
- (form y test the selection of Bezugsreferenzen did not seem to work as intended)
- Open created part an check
- Create the correct reference frame
- Open the previous simox model in e.g. mesh lab and check the position and orientation of the reference coordinate system
- In the Schrumpfverpackung model create axis according to the required system (I called them SOLL_X, SOLL_Y, SOLL_Z)
- Theoretically it should somehow be possible to set a new reference system without the model but I did not find out how
- Alternative approach: Create a new Baugruppe
- Align axis with the coordinate system
- Add Schrumpfverpackung model and position by assigning the axis
- Export .obj
- Check that the units are set to (Datei > Vorbereiten > Modelleigenschaften > Einheiten) Meter Kilogram Sekunde (mKs)
- Measure some element oft he model to check if size/units are reasonable
- Select (Kopie speichern, .obj)
- Depending on you model either select the reference frame directly or first select „all“ in the export window and then select the reference frame
- Play around with the settings until the mesh looks good enough
- Copy object file to armarx repos and change name in robot model .xml file
- Check the updated robot model using the RobotViewer
- If possible create a „Schrumpfverpackgung“ (Kopie speichern, Schrumpfverpackung
Different data types
Current our common standard is .wrl This has the following drawbacks:
- deprecated format
- does not support advanced materials
- cannot be exported from newer blender versions
- at least from our experience blender/meshlab get normals slightly wrong when importing
Potential alternatives would be: Export from CAD/Creo: Of these formats only .wrl and .obj can be exported!
- .dae (collada): with current assimp version in simox input vertex colors are wrong (red), might be solved for ubuntu 22
- .ply/.x3d: in theory supported by blender/meshlab and simox, texture lost after exporting from blender, texture coordinates broken after export from meshlab, simox import not tested
- .obj: supported by meshlab/simox, for blender import vertex colors get lost (to prevent this use this addon https://github.com/ynyBonfennil/blender-io-obj-vertex-color/edit/master/io_scene_obj_with_vc/import_obj.py), pcl tool available to convert into point cloud
- .stl: does not support textures/color, in the future we could look into .3mf
--> import time in simox for .obj and .wrl is similar
Import/export obj with colors in Blender (not working for blender 3.0, tested for blender 2.9):
- download https://github.com/ynyBonfennil/blender-io-obj-vertex-color/edit/master/io_scene_obj_with_vc/import_obj.py and extract to /blender-2.90.0-linux64/2.90/scripts/addons
- in blender got to Edit > Preferences > Addons > Install and select /blender-2.90.0-linux64/2.90/scripts/addons/io_scene_obj_with_vc/init.py
- make sure that addon ist activated