这部分的内容是如何将模型进行外观的优化显示。官网教程:http://gazebosim.org/tutorials?cat=guided_i&tut=guided_i2
两个工具:freecad和blender,需要提前下载
对于Model Appearance:官网的介绍:Models with textures and 3D meshes can improve your visual experience, and more importantly improve the realism of an environment. Simulated cameras that feed information to vision processing algorithms will benefit from models that appear realistic as well.
《一》通过官网的教程,我们得到两个模型文件:velodyne_base.dae and velodyne_top.dae.
(1)为了能够使我们的模型能直接在gazebo上调用,我们将模型放在~/.gazebo/models这个路径下。在该路径下创建一个文件夹velodyne_hdl32存放我们的模型文件包括.config 和 .sdf 文件
官网给的模板(文件名为model.config):
<?xml version="1.0"?>
<model>
<name>Velodyne HDL-32</name>
<version>1.0</version>
<sdf version="1.5">model.sdf</sdf>
<author>
<name>Optional: YOUR NAME</name>
<email>Optional: YOUR EMAIL</email>
</author>
<description>
A model of a Velodyne HDL-32 LiDAR sensor.
</description>
</model>
一开始我们的sdf文件的内容如下:
<?xml version="1.0" ?>
<sdf version="1.5">
<model name="velodyne_hdl-32">
<!-- Give the base link a unique name -->
<link name="base">
<!-- Offset the base by half the lenght of the cylinder -->
<pose>0 0 0.029335 0 0 0</pose>
<inertial>
<mass>1.2</mass>
<inertia>
<ixx>0.001087473</ixx>
<iyy>0.001087473</iyy>
<izz>0.001092437</izz>
<ixy>0</ixy>
<ixz>0</ixz>
<iyz>0</iyz>
</inertia>
</inertial>
<collision name="base_collision">
<geometry>
<cylinder>
<!-- Radius and length provide by Velodyne -->
<radius>.04267</radius>
<length>.05867</length>
</cylinder>
</geometry>
</collision>
<!-- The visual is mostly a copy of the collision -->
<visual name="base_visual">
<geometry>
<cylinder>
<radius>.04267</radius>