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!

Hi Everyone ! Ive just read all the messages, and tried it, but still, I can’t manage to display the model :frowning: My current setup for testing only, is just the Pi 4 with the navigator, a camera and 4 escs plugged onto the navigator.

BlueOS does recognize the frame as SimpleROV-4, which is correct, i created the modeloverrides folder in userdata, and the sub folder inside of modeloverrides, then placed my GLB file here. I tired all the possible names, ALL, SimpleROV-4, vectored… Also, the folder modeloverrides, wasn’t there already so i created it. Im using 4.5.3 version of firmware

here are the files i used: BlueOS_3D_Models - Google Drive

Thank your for your help ! :))

Mathis

1 Like

Hi,

I have tried the 2 options :

  • userdata/modeloverrides/sub/simplerov_4.glb (can’t see neither the 3D model nor the frame expected )
  • userdata/modeloverrides/ALL.glb works for me i can clearly see my 3D model and differents parts (motor, flap, ….) but the frame is not the expected one (it shows vectored instead of simplerov-4).

Hi @Mathsi,

Which BlueOS version are you using? I managed to get this working with BlueOS 1.4.2 and 1.5.0-beta.8, although I did find there’s apparently a problem with the model override support in the latest 1.5.0-beta.10 from last week, which I’ve raised internally and will try to get fixed.

It worked for me as any of:

  • /userdata/modeloverrides/sub/SIMPLEROV_4.glb
    • Note that the vehicle frame is capitalised
    • If it’s not working, you should be able to find the name(s) it’s looking for by opening the browser console on a page that’s loading a 3D model
  • /userdata/modeloverrides/ALL.glb
    • Note that the ā€œALLā€ override is not specific to a particular vehicle type, so is not within a vehicle sub-folder
  • /userdata/modeloverrides/boat/UNDEFINED.glb
    • This was with an ArduRover boat firmware loaded, just to confirm it works for the main vehicle types BlueOS is used with

Cool model - thanks for sharing! :slight_smile:

1 Like

Heyy, thank you so much for that, very nice to watch the model within BlueOS !

Mathis

1 Like

Hi @thomas_G, welcome to the forum! :slight_smile:

You need to capitalise the filename.

Note (as above) that there seems to be an issue with model loading in the BlueOS 1.5.0-beta.10 (the latest beta, from last week), so it may not work if you’re using that or the development releases from the master branch.

The displayed 3D model is chosen based on the autopilot’s frame, which is configured through the autopilot parameters (or, somewhat ironically, using the new frame selector in BlueOS 1.5.0-beta.10) - it is not the model that sets the frame.

1 Like

Hi @EliotBR ,

it works, thank you for your quick response

Thomas

2 Likes