BlueOS interface Custom ROV 3d model

Hello, simple question here.
I am using BlueOS interface with my ROV prototype.
I would like to replace the BlueRov2 3d model, which appears in the system setup page, where it is showing the options to configure the ROV.
With all respect for Bluerobotics
I would like to replace the replace the 3dModel with the actual prototype. I believe it is a fair question, since it seems BlueOS is opensource.
Thanks. It is just a cosmetic issue

2 Likes

Hi!

This is already supported, check this pr and file linked in it:

2 Likes

Hi @kostantin,

As @williangalvani mentioned, the functionality is available. Iā€™ve been meaning to document the relevant process for a while now, but havenā€™t yet got around to it - sorry!

As a general overview, we typically:

  1. Export the model as an STL file
    • triangle meshes are bad for designing, but nice for rendering
  2. Import it into Blender
  3. Remove small parts (including cutting off the threads of screws)
    • This helps improve performance, with minimal effect on what can be seen
  4. Merge/group pieces that are part of a single component
    • Select them and press CTRL+J
    • Weā€™ll typically rename the groups with meaningful component names as we go
  5. Add materials, to ā€œpaintā€ the parts in different colours
    • CTRL+L can help to select connected faces
    • Transparent materials can be made by setting low alpha values, and setting the blend mode to ā€œAlpha Blendā€
  6. For parts that should sometimes be highlighted in the Vehicle Setup page, start the names of their materials with their servo function enum name
    • Not case sensitive
    • E.g. thruster 1 should only use materials with names that start with motor1
  7. Merge the parts, set the shading to smooth, and adjust the auto-smoothing of normals to a value that looks right for your components
  8. Reduce the model triangles by adding a decimate modifier
    • We typically drag the Ratio slider down until the model looks bad, then bring it back up until it looks acceptable
  9. Export as a glTF (.glb) file, so it can be read by the BlueOS model viewer
    • Mesh / Apply Modifiers and Compression should both be enabled in the export configuration
  10. Save it into the relevant folder in the BlueOS File Browser
    • userdata/modeloverrides/<vehicle-type>/<vehicle-frame>.glb
    • e.g. for a BlueROV2 Heavy, <vehicle-type> would be sub, and <vehicle-frame> would be VECTORED_6DOF
  11. If you want, itā€™s possible to add annotations (like we have for the motors, in the default model) via the glTF Model Editor
    • ā€œAdd Hotspotā€ to create a new annotation
    • Copy the resulting ā€œdata surfaceā€ attribute into a json file like the following:
      {
          "annotations": {
              "Motor1": {
                  "surface": "3 1 2510 2509 2511 0.356 0.124 0.521",
                  "text": "Motor 1"
              },
              "Motor2": {
                  "surface": "2 1 2642 2643 2674 0.638 0.230 0.133",
                  "text": "Motor 2"
              },
          }
      }
      
      • annotation names should match the SERVOn_FUNCTION parameter value names
      • Save the file in the same place as and with the same base name as the model file, e.g. VECTORED_6DOF.json
2 Likes

Thanks Elliot for your detailed answer. I am going to follow your instructions verbatim, and check the forum thanks to you link.
my best wishes.
Costa,
from Eagle Ray Robotics

1 Like

Hey @EliotBR ,

Iā€™m currently trying to load in a glb-file myself, but I canā€™t seem to find the modeloverrides folder in the usersdata folder within BlueOS. Iā€™m using a custom frame configuration, but I tried to add a modeloverrides folder myself manually and drop a ALL.glb file in there. Apparently, this didnā€™t work out for me.

Does there need to be a modeloverrides folder allready? Or do you always have to add that one yourself?

Thanks in advance!