Mesh not loading (STL)

asked 2018-03-20 11:10:07 -0500

Prof. xavier gravatar image

updated 2018-03-20 11:11:28 -0500

gvdhoorn gravatar image

I am trying to make a robot definition with stl mesh files. When I tried to load a STL file as mesh IN Rviz the terminal showed the following error :

 [ERROR] [1521562296.640053756]: Error retrieving file [file:///home/xavier/catkin_ws/src/urdf_pkg/meshes/base-1.STL]: Couldn't open file /home/xavier/catkin_ws/src/urdf_pkg/meshes/base-1.STL
[ERROR] [1521562296.642119566]: Could not load model 'package://urdf_pkg/meshes/base-1.STL' for link 'base_link': OGRE EXCEPTION(6:FileNotFoundException): Cannot locate resource package://urdf_pkg/meshes/base-1.STL in resource group Autodetect or any other group. in ResourceGroupManager::openResource at /build/ogre-1.9-mqY1wq/ogre-1.9-1.9.0+dfsg1/OgreMain/src/OgreResourceGroupManager.cpp (line 756)
[ERROR] [1521562296.643222961]: Could not load model 'package://urdf_pkg/meshes/base-1.STL' for link 'base_link': OGRE EXCEPTION(6:FileNotFoundException): Cannot locate resource package://urdf_pkg/meshes/base-1.STL in resource group Autodetect or any other group. in ResourceGroupManager::openResource at /build/ogre-1.9-mqY1wq/ogre-1.9-1.9.0+dfsg1/OgreMain/src/OgreResourceGroupManager.cpp (line 756)

I coppied it as it is, I am also adding the launch codes and urdf codes

URDF :

<?xml version="1.0"?>
 <robot name="base">


  <link name="base_link">
    <visual>
      <geometry>
       <mesh filename="package://urdf_pkg/meshes/base-1.STL"/>
      </geometry>
      <origin rpy="0 0 0" xyz="0 0 0"/>      
    </visual>
  </link>

</robot>

LAUNCH CODE :

<launch>
  <arg name="model" />

   <param name="robot_description" textfile="$(find urdf_pkg)/urdf/base.urdf" />
  <param name="use_gui" value="true"/>

   <node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" />

   <node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher" />

   <node name="rviz" pkg="rviz" type="rviz" args="-d $(find urdf_pkg)/urdf.rviz" required="true" />
</launch>

please help me solve the issue, thanks.

edit retag flag offensive close merge delete

Comments

always use the Preformatted Code button (the one with 101010 on it) when copy-pasting errors. Otherwise they get filtered out of the text and won't show up.

gvdhoorn gravatar imagegvdhoorn ( 2018-03-20 11:11:59 -0500 )edit

Where is base-1.STL on your machine?

David Lu gravatar imageDavid Lu ( 2018-03-20 11:14:02 -0500 )edit

gvdhoorn I did not understand what you explained, my bad, please try to explain it some other way.

Prof. xavier gravatar imageProf. xavier ( 2018-03-20 11:21:54 -0500 )edit

David lu base-1.stl is in urdf_pkg/meshes

Prof. xavier gravatar imageProf. xavier ( 2018-03-20 11:22:39 -0500 )edit

base-1.stl

Linux is case-sensitive. If you change the extension in your urdf to .stl (instead of .STL), do the errors go away?

gvdhoorn gravatar imagegvdhoorn ( 2018-03-20 14:02:42 -0500 )edit

Did you resolve this issue @Prof. xavier?

gvdhoorn gravatar imagegvdhoorn ( 2018-03-24 05:23:15 -0500 )edit

@gvdhoorn it takes only .STL extension i use that so many times in my urdf files

lagankapoor gravatar imagelagankapoor ( 2018-04-16 03:10:04 -0500 )edit
1

I'm not entirely sure I understand what you're trying to say.

gvdhoorn gravatar imagegvdhoorn ( 2018-04-16 04:03:33 -0500 )edit