supported file format for rviz2 besides .dae?
Hello,
I am able to successfully render a model .dae file in rviz2 with my urdf as such:
<robot name="diff_bot">
<link name="base_link">
<visual>
<origin xyz="0.0 0.0 0.0"/>
<geometry>
<mesh filename="package://model_pkg/models/urdfmodel-BodyBase.dae"/>
</geometry>
</visual>
</link>
</robot>
using the following launch file:
from launch import LaunchDescription
from launch_ros.actions import Node
import ament_index_python
package_name = 'model_pkg'
share_directory = ament_index_python.packages.get_package_share_directory(package_name)
urdf = share_directory + '/urdf/test.urdf.xml'
def generate_launch_description():
with open(urdf, 'r') as infp:
robot_desc = infp.read()
return LaunchDescription([
Node(
package='model_pkg',
executable='model',
output='screen',
parameters=[],
),
Node(
package='rviz2',
executable='rviz2',
output='screen',
arguments=['-d', share_directory + '/rviz/rviz_config_test.rviz'],
),
Node(
package= 'robot_state_publisher' ,
executable= 'robot_state_publisher' ,
name= 'robot_state_publisher' ,
output= 'screen' ,
parameters=[{'use_sim_time': True, 'robot_description': robot_desc}],
),
])
EDIT: Here are the rqt graphs successful and unsuccessful loads. Neither of them look different:
SUCCESSFUL: .dae file:
UNSUCCESSFUL: .stl C:\fakepath\unsuccessful_load.png
I know rviz is loading both of these file formats though because RVIZ throws the following format when I try with .bms format:
[rviz2-2] [ERROR] [1670616645.049797087] [rviz2]: Could not load resource [package://model_pkg/models/urdfmodel.bms]: No suitable reader found for the file format of file "package://model_pkg/models/urdfmodel.bms".
I would normally export to .dae, but my CAD's export to .dae is currently broken. I've tried .stl and .obj, but those don't seem to work. Are there other file formats supported in rviz2's robot_model? Or is there a different package I could use to render models besides RobotModel? https://wiki.ros.org/rviz/DisplayType...