ROS2, URDF and filename
Hello,
I use ROS2 foxy on my windows 10. I try to show my URDF on rviz2 but I have always an error. Here my URDF :
<?xml version="1.0" ?>
<robot name="valbot-description" xmlns:xacro="http://ros.org/wiki/xacro">
<link name="world"/>
<link name="valbot3D">
<visual>
<origin rpy="0.0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="C:\dev\valbot\src\valbot_support\meshes\valbot-00-0000.STL"/>
</geometry>
</visual>
</link>
<joint name="world_to_valbot" type="fixed">
<parent link="world"/>
<child link="valbot3D"/>
<origin xyz="0 0 0" rpy="0 0 0"/>
</joint>
</robot>
But after running a :
ros2 run robot_state_publisher robot_state_publisher urdf\valbot.urdf
and :
rviz2
I have this error message :
[ERROR] [1620676703.495836100] [rviz2]: Error retrieving file [C:\dev\valbot\src\valbot_support\meshes\valbot-00-0000.STL]: Port number ended with '\' [ERROR] [1620676703.496174300] [rviz2]: Ogre::FileNotFoundException::FileNotFoundException: Cannot locate resource C:\dev\valbot\src\valbot_support\meshes\valbot-00-0000.STL in resource group OgreAutodetect. in ResourceGroupManager::openResource at C:\ci\ws\build\rviz_ogre_vendor\ogre-v1.12.1-prefix\src\ogre-v1.12.1\OgreMain\src\OgreResourceGroupManager.cpp (line 705)
The
filename
attribute should probably be a URI, not a plain path.If you really want to use absolute paths (instead of package-relative), you could try changing the
filename
to:Hi,
Thanks for your answer. I tried with
and :
but is still not working. For the package:/ , I have this message :
So just to make sure: does the file actually exist? Is the name exactly as you specify it?
What's the output of:
If it does exist: is it a valid STL file?
Hi
So, finally, I have my STL file on rviz. It works with this in
But I would like to use an URI. The file didn't exist in install\valbot_support\share\valbot_support\meshes .. I don't know why. I would like to know why it doesn't exist. So I created the directory \meshes into install\valbot_support\share\valbot_support. Then I paste my STL file in it. But when I use "package://" into my urdf, it doesn't work.