Skip to content

Instantly share code, notes, and snippets.

@RDaneelOlivav
Created December 11, 2017 15:15
Show Gist options
  • Save RDaneelOlivav/990addc733fbeb8549c3979d5bca41b2 to your computer and use it in GitHub Desktop.
Save RDaneelOlivav/990addc733fbeb8549c3979d5bca41b2 to your computer and use it in GitHub Desktop.
<robot name="ar_2020">
<!-- * * * Link Definitions * * * -->
<link name="simple_box_base_link">
<inertial>
<origin xyz="0 0 0" rpy="0 0 0"/>
<mass value="1.0" />
<inertia ixx="0.0741666666667" ixy="0.0" ixz="0.0" iyy="0.0585416666667" iyz="0.0" izz="0.0260416666667"/>
</inertial>
<collision>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<box size="0.2 0.2 0.2"/>
</geometry>
</collision>
<visual>
<origin rpy="0.0 0 0" xyz="0 0 0"/>
<geometry>
<!--<box size="0.8 0.8 0.2"/>-->
<mesh filename="package://mybot_description/meshes/ar_2020_v2.dae"/>
</geometry>
</visual>
</link>
<gazebo reference="simple_box_base_link">
<kp>100000.0</kp>
<kd>100000.0</kd>
<mu1>0.1</mu1>
<mu2>0.1</mu2>
<fdir1>1 0 0</fdir1>
</gazebo>
</robot>
<?xml version="1.0" encoding="utf-8"?>
<COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.1">
<asset>
<contributor>
<author>Blender User</author>
<authoring_tool>Blender 2.79.0</authoring_tool>
</contributor>
<created>2017-12-06T21:09:04</created>
<modified>2017-12-06T21:09:04</modified>
<unit name="meter" meter="1"/>
<up_axis>Z_UP</up_axis>
</asset>
<library_images>
<image id="MarkerData_2020_png" name="MarkerData_2020_png">
<init_from>MarkerData_2020.png</init_from>
</image>
</library_images>
<library_effects>
<effect id="MarkerData_2020_png-effect">
<profile_COMMON>
<newparam sid="MarkerData_2020_png-surface">
<surface type="2D">
<init_from>MarkerData_2020_png</init_from>
</surface>
</newparam>
<newparam sid="MarkerData_2020_png-sampler">
<sampler2D>
<source>MarkerData_2020_png-surface</source>
</sampler2D>
</newparam>
<technique sid="common">
<phong>
<diffuse>
<texture texture="MarkerData_2020_png-sampler" texcoord="MarkerData_2020_png"/>
</diffuse>
<specular>
<color sid="specular">0 0 0 1</color>
</specular>
</phong>
</technique>
</profile_COMMON>
</effect>
</library_effects>
<library_materials>
<material id="MarkerData_2020_png-material" name="MarkerData_2020_png">
<instance_effect url="#MarkerData_2020_png-effect"/>
</material>
</library_materials>
<library_geometries>
<geometry id="Cube-mesh" name="Cube">
<mesh>
<source id="Cube-mesh-positions">
<float_array id="Cube-mesh-positions-array" count="24">0.5 0.5 -0.5 0.5 -0.5 -0.5 -0.5000001 -0.4999999 -0.5 -0.4999998 0.5000002 -0.5 0.5000002 0.4999997 0.5 0.4999997 -0.5000003 0.5 -0.5000002 -0.4999998 0.5 -0.5 0.5 0.5</float_array>
<technique_common>
<accessor source="#Cube-mesh-positions-array" count="8" stride="3">
<param name="X" type="float"/>
<param name="Y" type="float"/>
<param name="Z" type="float"/>
</accessor>
</technique_common>
</source>
<source id="Cube-mesh-normals">
<float_array id="Cube-mesh-normals-array" count="36">0 0 -1 0 0 1 1 0 -2.38419e-7 0 -1 -4.76837e-7 -1 2.38419e-7 -1.49012e-7 2.68221e-7 1 2.38419e-7 0 0 -1 0 0 1 1 -5.96046e-7 3.27825e-7 -4.76837e-7 -1 0 -1 2.38419e-7 -1.19209e-7 2.08616e-7 1 0</float_array>
<technique_common>
<accessor source="#Cube-mesh-normals-array" count="12" stride="3">
<param name="X" type="float"/>
<param name="Y" type="float"/>
<param name="Z" type="float"/>
</accessor>
</technique_common>
</source>
<source id="Cube-mesh-map-0">
<float_array id="Cube-mesh-map-0-array" count="72">0 0 1 1 0 1 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 1 0 0 0 0 1 1 0 1 1 0 0 1 0 0 0 0 1 0 1 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 0 0 1 0 1 1 1 0 1 1 0 1</float_array>
<technique_common>
<accessor source="#Cube-mesh-map-0-array" count="36" stride="2">
<param name="S" type="float"/>
<param name="T" type="float"/>
</accessor>
</technique_common>
</source>
<vertices id="Cube-mesh-vertices">
<input semantic="POSITION" source="#Cube-mesh-positions"/>
</vertices>
<triangles material="MarkerData_2020_png-material" count="12">
<input semantic="VERTEX" source="#Cube-mesh-vertices" offset="0"/>
<input semantic="NORMAL" source="#Cube-mesh-normals" offset="1"/>
<input semantic="TEXCOORD" source="#Cube-mesh-map-0" offset="2" set="0"/>
<p>0 0 0 2 0 1 3 0 2 7 1 3 5 1 4 4 1 5 4 2 6 1 2 7 0 2 8 5 3 9 2 3 10 1 3 11 2 4 12 7 4 13 3 4 14 0 5 15 7 5 16 4 5 17 0 6 18 1 6 19 2 6 20 7 7 21 6 7 22 5 7 23 4 8 24 5 8 25 1 8 26 5 9 27 6 9 28 2 9 29 2 10 30 6 10 31 7 10 32 0 11 33 3 11 34 7 11 35</p>
</triangles>
</mesh>
</geometry>
</library_geometries>
<library_controllers/>
<library_visual_scenes>
<visual_scene id="Scene" name="Scene">
<node id="Cube" name="Cube" type="NODE">
<matrix sid="transform">0.09000003 0 0 0 0 0.09000003 0 0 0 0 0.01065584 0 0 0 0 1</matrix>
<instance_geometry url="#Cube-mesh" name="Cube">
<bind_material>
<technique_common>
<instance_material symbol="MarkerData_2020_png-material" target="#MarkerData_2020_png-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>
<?xml version="1.0" encoding="UTF-8"?>
<launch>
<arg name="x" default="0.0" />
<arg name="y" default="0.5" />
<arg name="z" default="0.5" />
<arg name="roll" default="1.57"/>
<arg name="pitch" default="0"/>
<arg name="yaw" default="0" />
<arg name="urdf_robot_file" default="$(find mybot_description)/urdf/ar_2020.urdf" />
<arg name="robot_name" default="ar_2020" />
<include file="$(find spawn_robot_tools_pkg)/launch/spawn_robot_urdf.launch">
<arg name="x" value="$(arg x)" />
<arg name="y" value="$(arg y)" />
<arg name="z" value="$(arg z)" />
<arg name="roll" value="$(arg roll)"/>
<arg name="pitch" value="$(arg pitch)"/>
<arg name="yaw" value="$(arg yaw)" />
<arg name="urdf_robot_file" value="$(arg urdf_robot_file)" />
<arg name="robot_name" value="$(arg robot_name)" />
</include>
</launch>
<?xml version="1.0" encoding="UTF-8"?>
<launch>
<arg name="x" default="0.0" />
<arg name="y" default="0.0" />
<arg name="z" default="0.0" />
<arg name="roll" default="0"/>
<arg name="pitch" default="0"/>
<arg name="yaw" default="0.0" />
<arg name="urdf_robot_file" default="" />
<arg name="robot_name" default="" />
<!-- This Version was created due to some errors seen in the V1 that crashed GAzebo or went too slow in spawn -->
<!-- Load the URDF into the ROS Parameter Server -->
<param name="robot_description" command="cat $(arg urdf_robot_file)" />
<!-- Run a python script to the send a service call to gazebo_ros to spawn a URDF robot -->
<node name="$(arg robot_name)_urdf_spawner" pkg="gazebo_ros" type="spawn_model" respawn="false" output="screen"
args="-urdf -x $(arg x) -y $(arg y) -z $(arg z) -R $(arg roll) -P $(arg pitch) -Y $(arg yaw) -model $(arg robot_name) -param robot_description"/>
</launch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment