ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Having problems reading .STL file in 10-myfirst.urdf

asked 2020-01-14 10:59:30 -0600

nico verduin gravatar image

updated 2022-01-22 16:10:15 -0600

Evgeny gravatar image

I am very new to the urdf tutorials. I am trying to load an STL file using 01-myfirst.urdf.

De urdf file looks as follows:

<?xml version="1.0"?>
<robot name="myfirst">
  <link name="base_link">
    <visual>
      <geometry>
        <mesh filename="package://urdf/Part1.stl"/>
      </geometry>
    </visual>
  </link>
</robot>

The file Part1.str is in the urdf folder within the package.

The command I am using in the root of the package:

~/moveit_ws/src/urdf_tutorial$ roslaunch urdf_tutorial display.launch model:=urdf/01-myfirst.urdf

This is the message I am getting is:

[ERROR] [1579020199.142407500]: Could not load resource [package://urdf/Part1.stl]: Unable to open file "package://urdf/Part1.stl".

Part1.stl is an ascii file. On the suggestion on someone else's post I underst I needed to remove the SOLID statement in the file. But to me the system cannot find the Part1.stl file at all.

What am I doing wrong? All help will be appreciated Regards Nico

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-01-14 11:57:43 -0600

David Lu gravatar image

You need to specify the package as well. The filename format is package://PACKAGENAME/PATHTOFILE, so in this case, I'm guessing it would be package://urdf_tutorial/urdf/Part1.stl

edit flag offensive delete link more

Comments

Great!!!!! That was the solution. Have to get used to the notation Thanks Nico

nico verduin gravatar image nico verduin  ( 2020-01-14 12:34:32 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2020-01-14 10:59:30 -0600

Seen: 802 times

Last updated: Jan 14 '20