add new asset to gazebo scene

This commit is contained in:
Ilya Uraev 2025-02-17 18:13:16 +03:00
parent dd7616609d
commit a3397f6686
13 changed files with 179 additions and 1 deletions

View file

@ -12,7 +12,7 @@ find_package(ament_cmake REQUIRED)
# find_package(<dependency> REQUIRED)
install(DIRECTORY launch urdf config world
install(DIRECTORY launch urdf config world assets
DESTINATION share/${PROJECT_NAME})
if(BUILD_TESTING)
@ -26,5 +26,7 @@ if(BUILD_TESTING)
set(ament_cmake_cpplint_FOUND TRUE)
ament_lint_auto_find_test_dependencies()
endif()
ament_environment_hooks("${CMAKE_CURRENT_SOURCE_DIR}/hooks/${PROJECT_NAME}.dsv.in")
ament_environment_hooks("${CMAKE_CURRENT_SOURCE_DIR}/hooks/${PROJECT_NAME}.sh.in")
ament_package()

View file

@ -0,0 +1,101 @@
<?xml version="1.0" encoding="utf-8"?>
<COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<asset>
<contributor>
<author>Blender User</author>
<authoring_tool>Blender 4.1.1 commit date:2024-04-15, commit time:15:11, hash:e1743a0317bc</authoring_tool>
</contributor>
<created>2025-02-12T10:55:51</created>
<modified>2025-02-12T10:55:51</modified>
<unit name="meter" meter="1"/>
<up_axis>Z_UP</up_axis>
</asset>
<library_effects>
<effect id="nasosnaya_ustanovka_svg-effect">
<profile_COMMON>
<technique sid="common">
<lambert>
<emission>
<color sid="emission">0 0 0 1</color>
</emission>
<diffuse>
<color sid="diffuse">0.01 0.01 0.01 1</color>
</diffuse>
<index_of_refraction>
<float sid="ior">1.5</float>
</index_of_refraction>
</lambert>
</technique>
</profile_COMMON>
</effect>
</library_effects>
<library_images/>
<library_materials>
<material id="nasosnaya_ustanovka_svg-material" name="nasosnaya_ustanovka.svg">
<instance_effect url="#nasosnaya_ustanovka_svg-effect"/>
</material>
</library_materials>
<library_geometries>
<geometry id="shildik-mesh" name="shildik">
<mesh>
<source id="shildik-mesh-positions">
<float_array id="shildik-mesh-positions-array" count="54">-0.02999997 -0.01999998 0 -0.02999997 -0.01999998 5e-4 -0.02999997 0.01999998 0 -0.02999997 0.01999998 5e-4 0.02999997 -0.01999998 0 0.02999997 -0.01999998 5e-4 0.02999997 0.01999998 0 0.02999997 0.01999998 5e-4 -0.02999997 0 0 -0.02999997 0 5e-4 0 0.01999998 0 0 0.01999998 5e-4 0.02999997 0 0 0.02999997 0 5e-4 0 -0.01999998 0 0 -0.01999998 5e-4 0 0 5e-4 0 0 0</float_array>
<technique_common>
<accessor source="#shildik-mesh-positions-array" count="18" stride="3">
<param name="X" type="float"/>
<param name="Y" type="float"/>
<param name="Z" type="float"/>
</accessor>
</technique_common>
</source>
<source id="shildik-mesh-normals">
<float_array id="shildik-mesh-normals-array" count="18">-1 0 0 0 1 0 1 0 0 0 -1 0 0 0 -1 0 0 1</float_array>
<technique_common>
<accessor source="#shildik-mesh-normals-array" count="6" stride="3">
<param name="X" type="float"/>
<param name="Y" type="float"/>
<param name="Z" type="float"/>
</accessor>
</technique_common>
</source>
<source id="shildik-mesh-map-0">
<float_array id="shildik-mesh-map-0-array" count="192">0.4997459 0.9128418 0.001953125 0.9003906 0.4997459 0.9003906 0.7485352 0.9455567 0.001953125 0.9331055 0.7485352 0.9331055 0.4997359 0.9167481 0.9975586 0.9291992 0.4997359 0.9291992 0.001953125 0.9821777 0.7485352 0.9946289 0.001953125 0.9946289 0.001953125 0.8964844 0.2495018 0.6816406 0.2495018 0.8964844 0.001953065 0.3339793 0.5 0.001953065 0.5 0.3339793 0.5 0.3339793 0.9980469 0.001953125 0.9980468 0.3339793 0.5 0.6660156 0.9980468 0.3339793 0.9980469 0.6660156 0.001953125 0.6660156 0.5 0.3339793 0.5 0.6660156 0.2495018 0.8964844 0.4970703 0.6816406 0.4970703 0.8964844 0.7485352 0.8964844 0.9960938 0.6816406 0.9960938 0.8964844 0.5009766 0.8964844 0.7485352 0.6816406 0.7485352 0.8964844 0.001953125 0.9494629 0.7485352 0.9619141 0.001953125 0.9619141 0.001953125 0.9167481 0.4997359 0.9291992 0.001953125 0.9291992 0.7485352 0.9782715 0.001953125 0.9658203 0.7485352 0.9658203 0.9975586 0.9128418 0.4997459 0.9003906 0.9975586 0.9003906 0.4997459 0.9128418 0.001953125 0.9128418 0.001953125 0.9003906 0.7485352 0.9455567 0.001953125 0.9455567 0.001953125 0.9331055 0.4997359 0.9167481 0.9975586 0.9167481 0.9975586 0.9291992 0.001953125 0.9821777 0.7485352 0.9821777 0.7485352 0.9946289 0.001953125 0.8964844 0.001953125 0.6816406 0.2495018 0.6816406 0.001953065 0.3339793 0.001953125 0.001953125 0.5 0.001953065 0.5 0.3339793 0.5 0.001953065 0.9980469 0.001953125 0.5 0.6660156 0.5 0.3339793 0.9980468 0.3339793 0.001953125 0.6660156 0.001953065 0.3339793 0.5 0.3339793 0.2495018 0.8964844 0.2495018 0.6816406 0.4970703 0.6816406 0.7485352 0.8964844 0.7485352 0.6816406 0.9960938 0.6816406 0.5009766 0.8964844 0.5009766 0.6816406 0.7485352 0.6816406 0.001953125 0.9494629 0.7485352 0.9494629 0.7485352 0.9619141 0.001953125 0.9167481 0.4997359 0.9167481 0.4997359 0.9291992 0.7485352 0.9782715 0.001953125 0.9782715 0.001953125 0.9658203 0.9975586 0.9128418 0.4997459 0.9128418 0.4997459 0.9003906</float_array>
<technique_common>
<accessor source="#shildik-mesh-map-0-array" count="96" stride="2">
<param name="S" type="float"/>
<param name="T" type="float"/>
</accessor>
</technique_common>
</source>
<vertices id="shildik-mesh-vertices">
<input semantic="POSITION" source="#shildik-mesh-positions"/>
</vertices>
<triangles material="nasosnaya_ustanovka_svg-material" count="32">
<input semantic="VERTEX" source="#shildik-mesh-vertices" offset="0"/>
<input semantic="NORMAL" source="#shildik-mesh-normals" offset="1"/>
<input semantic="TEXCOORD" source="#shildik-mesh-map-0" offset="2" set="0"/>
<p>9 0 0 2 0 1 8 0 2 11 1 3 6 1 4 10 1 5 13 2 6 4 2 7 12 2 8 15 3 9 0 3 10 14 3 11 12 4 12 14 4 13 17 4 14 9 5 15 15 5 16 16 5 17 16 5 18 5 5 19 13 5 20 11 5 21 13 5 22 7 5 23 3 5 24 16 5 25 11 5 26 17 4 27 0 4 28 8 4 29 10 4 30 8 4 31 2 4 32 6 4 33 17 4 34 10 4 35 5 3 36 14 3 37 4 3 38 7 2 39 12 2 40 6 2 41 3 1 42 10 1 43 2 1 44 1 0 45 8 0 46 0 0 47 9 0 48 3 0 49 2 0 50 11 1 51 7 1 52 6 1 53 13 2 54 5 2 55 4 2 56 15 3 57 1 3 58 0 3 59 12 4 60 4 4 61 14 4 62 9 5 63 1 5 64 15 5 65 16 5 66 15 5 67 5 5 68 11 5 69 16 5 70 13 5 71 3 5 72 9 5 73 16 5 74 17 4 75 14 4 76 0 4 77 10 4 78 17 4 79 8 4 80 6 4 81 12 4 82 17 4 83 5 3 84 15 3 85 14 3 86 7 2 87 13 2 88 12 2 89 3 1 90 11 1 91 10 1 92 1 0 93 9 0 94 8 0 95</p>
</triangles>
</mesh>
</geometry>
</library_geometries>
<library_visual_scenes>
<visual_scene id="Scene" name="Scene">
<node id="shildik_sh" name="shildik_sh" type="NODE">
<matrix sid="transform">1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1</matrix>
<instance_geometry url="#shildik-mesh" name="shildik_sh">
<bind_material>
<technique_common>
<instance_material symbol="nasosnaya_ustanovka_svg-material" target="#nasosnaya_ustanovka_svg-material">
<bind_vertex_input semantic="UVMap" input_semantic="TEXCOORD" input_set="0"/>
</instance_material>
</technique_common>
</bind_material>
</instance_geometry>
</node>
</visual_scene>
</library_visual_scenes>
<scene>
<instance_visual_scene url="#Scene"/>
</scene>
</COLLADA>

View file

@ -0,0 +1,16 @@
<?xml version="1.0"?>
<model>
<name>shildik</name>
<version>0.1</version>
<sdf version='1.10'>model.sdf</sdf>
<author>
<name>Bill Finger</name>
<email>ur.narmak@gmail.com</email>
</author>
<description>
Empty
</description>
</model>

48
assets/shildik/model.sdf Normal file
View file

@ -0,0 +1,48 @@
<?xml version="1.0"?>
<sdf version="1.10">
<model name="shildik">
<link name="shildik_link">
<visual name="shildik_visual">
<geometry>
<mesh>
<uri>model://shildik/meshes/shildik_sh.dae</uri>
</mesh>
</geometry>
<material>
<diffuse>1 1 1 1</diffuse>
<ambient>1 1 1 1</ambient>
<specular>0.5 0.5 0.5 1</specular>
<emissive>0 0 0 1</emissive>
<texture>
<diffuse_map>model://shildik/textures/shildik_sh.png</diffuse_map>
</texture>
<pbr>
<metal>
<albedo_map>model://shildik/textures/shildik_sh_d.png</albedo_map>
<normal_map>model://shildik/textures/shildik_sh_n.png</normal_map>
<roughness_map>model://shildik/textures/shildik_sh_r.png</roughness_map>
<metalness_map>model://shildik/textures/shildik_sh_m.png</metalness_map>
<ambient_occlusion_map>model://shildik/textures/shildik_sh_o.png</ambient_occlusion_map>
</metal>
</pbr>
</material>
</visual>
<collision name="shildik_collision">
<geometry>
<box>
<size>0.06 0.04 0.001</size>
</box>
</geometry>
<surface>
<contact>
<ode />
</contact>
<bounce />
<friction>
<ode />
</friction>
</surface>
</collision>
</link>
</model>
</sdf>

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 979 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 349 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 KiB

View file

@ -0,0 +1,3 @@
prepend-non-duplicate;GZ_SIM_RESOURCE_PATH;share/@PROJECT_NAME@/world
prepend-non-duplicate;GZ_SIM_RESOURCE_PATH;share/@PROJECT_NAME@/assets
prepend-non-duplicate;GZ_SIM_SYSTEM_PLUGIN_PATH;lib/@PROJECT_NAME@/

View file

@ -0,0 +1,3 @@
ament_prepend_unique_value GZ_SIM_RESOURCE_PATH "$AMENT_CURRENT_PREFIX/share/@PROJECT_NAME@/world"
ament_prepend_unique_value GZ_SIM_RESOURCE_PATH "$AMENT_CURRENT_PREFIX/share/@PROJECT_NAME@/assets"
ament_prepend_unique_value GZ_SIM_PLUGIN_PATH "$AMENT_CURRENT_PREFIX/lib/@PROJECT_NAME@"

View file

@ -41,6 +41,11 @@
</attenuation>
<direction>-0.5 0.1 -0.9</direction>
</light>
<include>
<pose>-0.3 0.0 0 0 0 0</pose>
<uri>model://shildik</uri>
</include>
<!-- <model name="ground_plane"> -->
<!-- <static>true</static> -->