[resolved] Issues importing STLs from OpenSCAD/MeshLab

Discussion in 'Modeling' started by jamesp, Jan 10, 2019.

  1. Hi all,

    I seem to be having trouble importing .stl files from things I make in OpenSCAD.
    Attached are two test files for a simple rectangular prism: oscad_test.stl is directly exported from OpenSCAD, while oscad_meshlab_test.stl is the same file re-exported via MeshLab.

    When I include
    <mesh file="objects/oscad_test.stl"/>
    in my .xml, MuJoCo crashes. Replacing it with
    <mesh file="objects/oscad_meshlab_test.stl"/>
    appears promising, however attempting to spawn an instance with
    <geom name="bolt" pos="2 2 1" type="mesh" mesh="oscad_meshlab_test" rgba="0 0 0 1" material="BasketMat"/>
    then results in the warning
    WARNING: Nan, Inf or huge value in QACC at DOF 6. The simulation is unstable. Time = 0.0400.
    followed by the program hanging indefinitely.

    I have MuJoCo Pro 2.00 on Ubuntu 16.04, however I am working with the C API.
    It is especially frustrating since .stl files from other sources e.g. https://github.com/cxy1997/Robotiq-UR5 work fine, with no issues in controlling the robot nor rendering the scene.

    Any help would be appreciated.
    Thanks!

    Edit: Added a small .xml scene with the prism, seems to work fine in ./simulate .
     

    Attached Files:

    Last edited: Jan 10, 2019
  2. Please disregard this post. It seems a unit is interpreted in something larger than the millimeters I had assumed, so complex shapes I was trying to import were causing problems.