I try to include an stl in im urdf file, but not succeeding so far. What I've tried:
roscore
rosparam set /robot_description -t data/models/urdf/cube.urdf
rviz
-> in rviz add RobotModel
With a basic cube geomety it works, I can see the cube. But when I swop it with an stl it stops working (I tried different stls). With this it works:
<?xml version="1.0"?>
<robot name="box">
<material name="black">
<color rgba="0 0 0 1" />
</material>
<link name="base_link">
<visual>
<origin xyz="0 0 0" rpy="0 0 0" />
<geometry>
<box size="0.18 0.18 0.18" />
</geometry>
<material name="black" />
</visual>
<collision>
<origin xyz="0 0 0" rpy="0 0 0" />
<geometry>
<box size="0.18 0.18 0.18" />
</geometry>
</collision>
<inertial>
<origin xyz="0 0 0" rpy="0 0 0" />
<mass value="1.0" />
<inertia
ixx="0.0001" ixy="0.0" ixz="0.0"
iyy="0.0001" iyz="0.0"
izz="0.0001" />
</inertial>
</link>
</robot>
But when I swop
<geometry>
<box size="0.18 0.18 0.18" />
</geometry>
with
<geometry>
<mesh filename="file:///home/me/models/meshes/engine.stl" />
</geometry>
it doesn't. When I remove the file://
or define a wrong path it complains. With this code there is no error, but I don't see anything in rviz.
I use ros noetic.