Mesh not loading (STL)
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.
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.Where is base-1.STL on your machine?
gvdhoorn I did not understand what you explained, my bad, please try to explain it some other way.
David lu base-1.stl is in urdf_pkg/meshes
Linux is case-sensitive. If you change the extension in your urdf to
.stl
(instead of.STL
), do the errors go away?Did you resolve this issue @Prof. xavier?
@gvdhoorn it takes only
.STL
extension i use that so many times in my urdf filesI'm not entirely sure I understand what you're trying to say.