Skip to content

SMURF parser handles relative mesh path wrong #103

@AlCap23

Description

@AlCap23

The template folder structure for SMURF looks something like

./
 /smurf
  robot.smurf
 /urdf
  robot.urdf
 /meshes
  /stl
   mesh.stl

With matching relative paths for meshes from the urdf file

<visual name="Visual_Mesh">
 <origin xyz="0 0.0 0.0" rpy="0 0 0"/>
  <geometry>
   <mesh filename="../meshes/stl/mesh.stl" scale="1.0 1.0 1.0"/>
   </geometry>
</visual>

And for the smurf file

files:
- ../urdf/robot.urdf

Changing the structure like the following

./
 /smurf
  robot.smurf
 /model
  /urdf
   robot.urdf
  /meshes
   /stl
    mesh.stl

with the corresponding smurf file

files:
- ../model/urdf/robot.urdf

results in an error for loading the model

Everything gets parsed...
mapIndex: 1
smurfing robot: robot...
terminate called after throwing an instance of 'std::runtime_error'
  what():  cannot read node from file

I think we exit with an error! Signal: 6
Aborted (core dumped)

Due to missing meshes. The urdf file on its own is loading fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions