Skip to content

Commit

Permalink
ArUcoマーカ付きの立方体を追加
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuwamai committed Nov 28, 2024
1 parent da141de commit feb9241
Show file tree
Hide file tree
Showing 5 changed files with 170 additions and 0 deletions.
1 change: 1 addition & 0 deletions crane_plus_gazebo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ install(DIRECTORY
launch
worlds
gui
models
DESTINATION share/${PROJECT_NAME}/
)

Expand Down
115 changes: 115 additions & 0 deletions crane_plus_gazebo/models/aruco_cube_0/meshes/aruco_cube_0.dae
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
<?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.3.0 commit date:2024-11-19, commit time:08:52, hash:2b18cad88b13</authoring_tool>
</contributor>
<created>2024-11-27T02:32:31</created>
<modified>2024-11-27T02:32:31</modified>
<unit name="meter" meter="1"/>
<up_axis>Z_UP</up_axis>
</asset>
<library_effects>
<effect id="Material_001-effect">
<profile_COMMON>
<newparam sid="aruco_cube_0_png-surface">
<surface type="2D">
<init_from>aruco_cube_0_png</init_from>
</surface>
</newparam>
<newparam sid="aruco_cube_0_png-sampler">
<sampler2D>
<source>aruco_cube_0_png-surface</source>
</sampler2D>
</newparam>
<technique sid="common">
<lambert>
<emission>
<color sid="emission">0 0 0 1</color>
</emission>
<diffuse>
<texture texture="aruco_cube_0_png-sampler" texcoord="UVMap"/>
</diffuse>
<index_of_refraction>
<float sid="ior">1.5</float>
</index_of_refraction>
</lambert>
</technique>
</profile_COMMON>
</effect>
</library_effects>
<library_images>
<image id="aruco_cube_0_png" name="aruco_cube_0_png">
<init_from>aruco_cube_0.png</init_from>
</image>
</library_images>
<library_materials>
<material id="Material_001-material" name="Material.001">
<instance_effect url="#Material_001-effect"/>
</material>
</library_materials>
<library_geometries>
<geometry id="Cube_001-mesh" name="Cube.001">
<mesh>
<source id="Cube_001-mesh-positions">
<float_array id="Cube_001-mesh-positions-array" count="48">-0.5 -0.5 -0.5 -0.5 -0.5 0.5 -0.5 0.5 -0.5 -0.5 0.5 0.5 0.5 -0.5 -0.5 0.5 -0.5 0.5 0.5 0.5 -0.5 0.5 0.5 0.5 -0.5 -0.5 -0.5 -0.5 -0.5 0.5 -0.5 0.5 -0.5 -0.5 0.5 0.5 0.5 -0.5 -0.5 0.5 -0.5 0.5 0.5 0.5 -0.5 0.5 0.5 0.5</float_array>
<technique_common>
<accessor source="#Cube_001-mesh-positions-array" count="16" stride="3">
<param name="X" type="float"/>
<param name="Y" type="float"/>
<param name="Z" type="float"/>
</accessor>
</technique_common>
</source>
<source id="Cube_001-mesh-normals">
<float_array id="Cube_001-mesh-normals-array" count="78">-1 0 0 0 1 0 1 0 0 0 -1 0 0 0 -1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 -1 0 0 0 1 0 1 0 0 0 -1 0 0 0 -1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1</float_array>
<technique_common>
<accessor source="#Cube_001-mesh-normals-array" count="26" stride="3">
<param name="X" type="float"/>
<param name="Y" type="float"/>
<param name="Z" type="float"/>
</accessor>
</technique_common>
</source>
<source id="Cube_001-mesh-map-0">
<float_array id="Cube_001-mesh-map-0-array" count="156">0.625 0 0.375 0.25 0.375 0 0.625 0.25 0.375 0.5 0.375 0.25 0.625 0.5 0.375 0.75 0.375 0.5 0.625 0.75 0.375 1 0.375 0.75 0.375 0.5 0.125 0.75 0.125 0.5 0.875 0.5 0.625 0.75 0.625 0.5 0.375 0 0.375 0.25 0.375 0.25 0.375 0.75 0.625 0.75 0.625 0.75 0.375 0.5 0.375 0.75 0.375 0.75 0.375 0.25 0.625 0.25 0.625 0.25 0.625 0 0.375 0 0.375 0 0.375 0.75 0.375 1 0.375 1 0.375 0.5 0.625 0.5 0.625 0.5 0.625 0 0.625 0.25 0.375 0.25 0.625 0.25 0.625 0.5 0.375 0.5 0.625 0.5 0.625 0.75 0.375 0.75 0.625 0.75 0.625 1 0.375 1 0.375 0.5 0.375 0.75 0.125 0.75 0.875 0.5 0.875 0.75 0.625 0.75 0.375 0 0.375 0 0.375 0.25 0.375 0.75 0.375 0.75 0.625 0.75 0.375 0.5 0.375 0.5 0.375 0.75 0.375 0.25 0.375 0.25 0.625 0.25 0.625 0 0.625 0 0.375 0 0.375 0.75 0.375 0.75 0.375 1 0.375 0.5 0.375 0.5 0.625 0.5</float_array>
<technique_common>
<accessor source="#Cube_001-mesh-map-0-array" count="78" stride="2">
<param name="S" type="float"/>
<param name="T" type="float"/>
</accessor>
</technique_common>
</source>
<vertices id="Cube_001-mesh-vertices">
<input semantic="POSITION" source="#Cube_001-mesh-positions"/>
</vertices>
<triangles material="Material_001-material" count="26">
<input semantic="VERTEX" source="#Cube_001-mesh-vertices" offset="0"/>
<input semantic="NORMAL" source="#Cube_001-mesh-normals" offset="1"/>
<input semantic="TEXCOORD" source="#Cube_001-mesh-map-0" offset="2" set="0"/>
<p>1 0 0 2 0 1 0 0 2 3 1 3 6 1 4 2 1 5 7 2 6 4 2 7 6 2 8 5 3 9 0 3 10 4 3 11 6 4 12 0 4 13 2 4 14 3 5 15 5 5 16 7 5 17 0 6 18 10 6 19 2 6 20 4 7 21 13 7 22 5 7 23 6 8 24 12 8 25 4 8 26 2 9 27 11 9 28 3 9 29 1 10 30 8 10 31 0 10 32 4 11 33 8 11 34 0 11 35 6 12 36 15 12 37 7 12 38 1 13 39 3 13 40 2 13 41 3 14 42 7 14 43 6 14 44 7 15 45 5 15 46 4 15 47 5 16 48 1 16 49 0 16 50 6 17 51 4 17 52 0 17 53 3 18 54 1 18 55 5 18 56 0 19 57 8 19 58 10 19 59 4 20 60 12 20 61 13 20 62 6 21 63 14 21 64 12 21 65 2 22 66 10 22 67 11 22 68 1 23 69 9 23 70 8 23 71 4 24 72 12 24 73 8 24 74 6 25 75 14 25 76 15 25 77</p>
</triangles>
</mesh>
</geometry>
</library_geometries>
<library_visual_scenes>
<visual_scene id="Scene" name="Scene">
<node id="Cube" name="Cube" type="NODE">
<matrix sid="transform">0.05000001 0 0 0 0 0.05000001 0 0 0 0 0.05000001 0 0 0 0 1</matrix>
<instance_geometry url="#Cube_001-mesh" name="Cube">
<bind_material>
<technique_common>
<instance_material symbol="Material_001-material" target="#Material_001-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>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions crane_plus_gazebo/models/aruco_cube_0/model.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0"?>

<model>
<name>aruco_cube_0</name>
<version>1.0</version>
<sdf version="1.9">model.sdf</sdf>

<author>
<name>Atsushi Kuwagata</name>
<email>[email protected]</email>
</author>

<description>
5 cm cube with ArUco marker
</description>
</model>
38 changes: 38 additions & 0 deletions crane_plus_gazebo/models/aruco_cube_0/model.sdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0" ?>
<sdf version="1.9">
<model name="aruco_cube_0">
<link name="link">
<pose>0 0 0 0 0 0</pose>
<visual name="visual">
<geometry>
<mesh>
<uri>model://aruco_cube_0/meshes/aruco_cube_0.dae</uri>
</mesh>
</geometry>
</visual>
<collision name="collision">
<geometry>
<box>
<size>0.05 0.05 0.05</size>
</box>
</geometry>
<surface>
<friction>
<ode>
<mu>0.9</mu>
<mu2>0.9</mu2>
</ode>
</friction>
</surface>
</collision>
<inertial>
<inertia>
<ixx>0.00002</ixx>
<iyy>0.00002</iyy>
<izz>0.00002</izz>
</inertia>
<mass>0.05</mass>
</inertial>
</link>
</model>
</sdf>

0 comments on commit feb9241

Please sign in to comment.