diff --git a/urdf/loc_sign.xacro b/urdf/loc_sign.xacro new file mode 100644 index 0000000000000000000000000000000000000000..88e60b760591b5ca38770b398b430e668cbd595c --- /dev/null +++ b/urdf/loc_sign.xacro @@ -0,0 +1,11 @@ +<?xml version="1.0"?> +<robot name="$(arg name)" xmlns:xacro="http://www.ros.org/wiki/xacro"> + + <xacro:include filename="$(find iri_sign_description)/urdf/signs/localization_sign_macro.xacro" /> + + <xacro:localization_sign name="$(arg name)" + tag_dae="$(arg tag)" + top_panel_dae="$(arg type)"> + </xacro:localization_sign> + +</robot> diff --git a/urdf/signs/dae/png/qr_loc1.png b/urdf/signs/dae/png/qr_loc1.png new file mode 100644 index 0000000000000000000000000000000000000000..f258b5118581026ff1ad4f016d2a178e1fb12152 Binary files /dev/null and b/urdf/signs/dae/png/qr_loc1.png differ diff --git a/urdf/signs/dae/png/qr_loc88.png b/urdf/signs/dae/png/qr_loc88.png new file mode 100644 index 0000000000000000000000000000000000000000..9e4a268aac6478de2c40ff9983ddc3a472a6ca17 Binary files /dev/null and b/urdf/signs/dae/png/qr_loc88.png differ diff --git a/urdf/signs/dae/png/world.png b/urdf/signs/dae/png/world.png new file mode 100644 index 0000000000000000000000000000000000000000..673b6a3a73784a3ce1aa1b7773b5e81a321b8da2 Binary files /dev/null and b/urdf/signs/dae/png/world.png differ diff --git a/urdf/signs/dae/qr_loc1.dae b/urdf/signs/dae/qr_loc1.dae new file mode 100644 index 0000000000000000000000000000000000000000..4f992c9ac178b7b4cb81c6bc0ed38ca3fe2255c8 --- /dev/null +++ b/urdf/signs/dae/qr_loc1.dae @@ -0,0 +1,170 @@ +<?xml version="1.0" encoding="utf-8"?> +<COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.1"> + <asset> + <contributor> + <author></author> + <authoring_tool>FBX COLLADA exporter</authoring_tool> + <comments></comments> + </contributor> + <created>2014-10-05T08:59:28Z</created> + <keywords></keywords> + <modified>2014-10-05T08:59:28Z</modified> + <revision></revision> + <subject></subject> + <title></title> + <unit meter="1.0" name="meter"></unit> + <up_axis>Y_UP</up_axis></asset> + <library_images> + <image id="Map #1-image" name="Map #1"> + <init_from>png/qr_loc1.png</init_from> + </image> + </library_images> + <library_materials> + <material id="Material #36" name="Material #36"> + <instance_effect url="#Material #36-fx"/> + </material> + </library_materials> + <library_effects> + <effect id="Material #36-fx" name="Material #36"> + <profile_COMMON> + <technique sid="standard"> + <phong> + <emission> + <color sid="emission">0 0 0 1</color> + </emission> + <ambient> + <color sid="ambient">1 1 1 1</color> + </ambient> + <diffuse> + <texture texture="Map #1-image" texcoord="CHANNEL0"> + <extra> + <technique profile="MAYA"> + <wrapU sid="wrapU0">TRUE</wrapU> + <wrapV sid="wrapV0">TRUE</wrapV> + <blend_mode>ADD</blend_mode> + </technique> + </extra> + </texture> + </diffuse> + <specular> + <color sid="specular">0 0 0 1</color> + </specular> + <shininess> + <float sid="shininess">2</float> + </shininess> + <reflective> + <color sid="reflective">0 0 0 1</color> + </reflective> + <reflectivity> + <float sid="reflectivity">1</float> + </reflectivity> + <transparent opaque="RGB_ZERO"> + <color sid="transparent">1 1 1 1</color> + </transparent> + <transparency> + <float sid="transparency">0</float> + </transparency> + </phong> + </technique> + </profile_COMMON> + </effect> + </library_effects> + <library_geometries> + <geometry id="image-lib" name="image"> + <mesh> + <source id="image-POSITION"> + <float_array id="image-POSITION-array" count="12"> + -0.5 -0.5 0 + 0.5 -0.5 0 + -0.5 0.5 0 + 0.5 0.5 0 + </float_array> + <technique_common> + <accessor source="#image-POSITION-array" count="4" stride="3"> + <param name="X" type="float"/> + <param name="Y" type="float"/> + <param name="Z" type="float"/> + </accessor> + </technique_common> + </source> + <source id="image-Normal0"> + <float_array id="image-Normal0-array" count="18"> + 0 0 1 + 0 0 1 + 0 0 1 + 0 0 1 + 0 0 1 + 0 0 1 + </float_array> + <technique_common> + <accessor source="#image-Normal0-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="image-UV0"> + <float_array id="image-UV0-array" count="8"> + 0 0 + 1 0 + 0 1 + 1 1 + </float_array> + <!-- + 0.000499 0.000500 + 0.999500 0.000499 + 0.000500 0.999501 + 0.999501 0.999500 + --> + <technique_common> + <accessor source="#image-UV0-array" count="4" stride="2"> + <param name="S" type="float"/> + <param name="T" type="float"/> + </accessor> + </technique_common> + </source> + <vertices id="image-VERTEX"> + <input semantic="POSITION" source="#image-POSITION"/> + </vertices> + <triangles count="2" material="Material #36"> + <input semantic="VERTEX" offset="0" source="#image-VERTEX"/> + <input semantic="NORMAL" offset="1" source="#image-Normal0"/> + <input semantic="TEXCOORD" offset="2" set="0" source="#image-UV0"/> + <p> 0 0 0 1 1 1 3 2 3 3 3 3 2 4 2 0 5 0</p> + </triangles> + </mesh> + </geometry> + </library_geometries> + <library_visual_scenes> + <visual_scene id="" name=""> + <node name="image" id="image" sid="image"> + <matrix sid="matrix">1 0 0 0 0 0 1 0 0 -1 0 0 0 0 0 1</matrix> + <instance_geometry url="#image-lib"> + <bind_material> + <technique_common> + <instance_material symbol="Material #36" target="#Material #36"/> + </technique_common> + </bind_material> + </instance_geometry> + <extra> + <technique profile="FCOLLADA"> + <visibility>1</visibility> + </technique> + </extra> + </node> + <extra> + <technique profile="MAX3D"> + <frame_rate>30</frame_rate> + </technique> + <technique profile="FCOLLADA"> + <start_time>0</start_time> + <end_time>3.333333</end_time> + </technique> + </extra> + </visual_scene> + </library_visual_scenes> + <scene> + <instance_visual_scene url="#"></instance_visual_scene> + </scene> +</COLLADA> diff --git a/urdf/signs/dae/qr_loc88.dae b/urdf/signs/dae/qr_loc88.dae new file mode 100644 index 0000000000000000000000000000000000000000..89a0a284a76b77dafbe442ec99d199763a03c476 --- /dev/null +++ b/urdf/signs/dae/qr_loc88.dae @@ -0,0 +1,170 @@ +<?xml version="1.0" encoding="utf-8"?> +<COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.1"> + <asset> + <contributor> + <author></author> + <authoring_tool>FBX COLLADA exporter</authoring_tool> + <comments></comments> + </contributor> + <created>2014-10-05T08:59:28Z</created> + <keywords></keywords> + <modified>2014-10-05T08:59:28Z</modified> + <revision></revision> + <subject></subject> + <title></title> + <unit meter="1.0" name="meter"></unit> + <up_axis>Y_UP</up_axis></asset> + <library_images> + <image id="Map #1-image" name="Map #1"> + <init_from>png/qr_loc88.png</init_from> + </image> + </library_images> + <library_materials> + <material id="Material #36" name="Material #36"> + <instance_effect url="#Material #36-fx"/> + </material> + </library_materials> + <library_effects> + <effect id="Material #36-fx" name="Material #36"> + <profile_COMMON> + <technique sid="standard"> + <phong> + <emission> + <color sid="emission">0 0 0 1</color> + </emission> + <ambient> + <color sid="ambient">1 1 1 1</color> + </ambient> + <diffuse> + <texture texture="Map #1-image" texcoord="CHANNEL0"> + <extra> + <technique profile="MAYA"> + <wrapU sid="wrapU0">TRUE</wrapU> + <wrapV sid="wrapV0">TRUE</wrapV> + <blend_mode>ADD</blend_mode> + </technique> + </extra> + </texture> + </diffuse> + <specular> + <color sid="specular">0 0 0 1</color> + </specular> + <shininess> + <float sid="shininess">2</float> + </shininess> + <reflective> + <color sid="reflective">0 0 0 1</color> + </reflective> + <reflectivity> + <float sid="reflectivity">1</float> + </reflectivity> + <transparent opaque="RGB_ZERO"> + <color sid="transparent">1 1 1 1</color> + </transparent> + <transparency> + <float sid="transparency">0</float> + </transparency> + </phong> + </technique> + </profile_COMMON> + </effect> + </library_effects> + <library_geometries> + <geometry id="image-lib" name="image"> + <mesh> + <source id="image-POSITION"> + <float_array id="image-POSITION-array" count="12"> + -0.5 -0.5 0 + 0.5 -0.5 0 + -0.5 0.5 0 + 0.5 0.5 0 + </float_array> + <technique_common> + <accessor source="#image-POSITION-array" count="4" stride="3"> + <param name="X" type="float"/> + <param name="Y" type="float"/> + <param name="Z" type="float"/> + </accessor> + </technique_common> + </source> + <source id="image-Normal0"> + <float_array id="image-Normal0-array" count="18"> + 0 0 1 + 0 0 1 + 0 0 1 + 0 0 1 + 0 0 1 + 0 0 1 + </float_array> + <technique_common> + <accessor source="#image-Normal0-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="image-UV0"> + <float_array id="image-UV0-array" count="8"> + 0 0 + 1 0 + 0 1 + 1 1 + </float_array> + <!-- + 0.000499 0.000500 + 0.999500 0.000499 + 0.000500 0.999501 + 0.999501 0.999500 + --> + <technique_common> + <accessor source="#image-UV0-array" count="4" stride="2"> + <param name="S" type="float"/> + <param name="T" type="float"/> + </accessor> + </technique_common> + </source> + <vertices id="image-VERTEX"> + <input semantic="POSITION" source="#image-POSITION"/> + </vertices> + <triangles count="2" material="Material #36"> + <input semantic="VERTEX" offset="0" source="#image-VERTEX"/> + <input semantic="NORMAL" offset="1" source="#image-Normal0"/> + <input semantic="TEXCOORD" offset="2" set="0" source="#image-UV0"/> + <p> 0 0 0 1 1 1 3 2 3 3 3 3 2 4 2 0 5 0</p> + </triangles> + </mesh> + </geometry> + </library_geometries> + <library_visual_scenes> + <visual_scene id="" name=""> + <node name="image" id="image" sid="image"> + <matrix sid="matrix">1 0 0 0 0 0 1 0 0 -1 0 0 0 0 0 1</matrix> + <instance_geometry url="#image-lib"> + <bind_material> + <technique_common> + <instance_material symbol="Material #36" target="#Material #36"/> + </technique_common> + </bind_material> + </instance_geometry> + <extra> + <technique profile="FCOLLADA"> + <visibility>1</visibility> + </technique> + </extra> + </node> + <extra> + <technique profile="MAX3D"> + <frame_rate>30</frame_rate> + </technique> + <technique profile="FCOLLADA"> + <start_time>0</start_time> + <end_time>3.333333</end_time> + </technique> + </extra> + </visual_scene> + </library_visual_scenes> + <scene> + <instance_visual_scene url="#"></instance_visual_scene> + </scene> +</COLLADA> diff --git a/urdf/signs/dae/world.dae b/urdf/signs/dae/world.dae new file mode 100644 index 0000000000000000000000000000000000000000..b587aca17c4c9b3348dea56611b5f1d9eceef9e8 --- /dev/null +++ b/urdf/signs/dae/world.dae @@ -0,0 +1,170 @@ +<?xml version="1.0" encoding="utf-8"?> +<COLLADA xmlns="http://www.collada.org/2005/11/COLLADASchema" version="1.4.1"> + <asset> + <contributor> + <author></author> + <authoring_tool>FBX COLLADA exporter</authoring_tool> + <comments></comments> + </contributor> + <created>2014-10-05T08:59:28Z</created> + <keywords></keywords> + <modified>2014-10-05T08:59:28Z</modified> + <revision></revision> + <subject></subject> + <title></title> + <unit meter="1.0" name="meter"></unit> + <up_axis>Y_UP</up_axis></asset> + <library_images> + <image id="Map #1-image" name="Map #1"> + <init_from>png/world.png</init_from> + </image> + </library_images> + <library_materials> + <material id="Material #36" name="Material #36"> + <instance_effect url="#Material #36-fx"/> + </material> + </library_materials> + <library_effects> + <effect id="Material #36-fx" name="Material #36"> + <profile_COMMON> + <technique sid="standard"> + <phong> + <emission> + <color sid="emission">0 0 0 1</color> + </emission> + <ambient> + <color sid="ambient">1 1 1 1</color> + </ambient> + <diffuse> + <texture texture="Map #1-image" texcoord="CHANNEL0"> + <extra> + <technique profile="MAYA"> + <wrapU sid="wrapU0">TRUE</wrapU> + <wrapV sid="wrapV0">TRUE</wrapV> + <blend_mode>ADD</blend_mode> + </technique> + </extra> + </texture> + </diffuse> + <specular> + <color sid="specular">0 0 0 1</color> + </specular> + <shininess> + <float sid="shininess">2</float> + </shininess> + <reflective> + <color sid="reflective">0 0 0 1</color> + </reflective> + <reflectivity> + <float sid="reflectivity">1</float> + </reflectivity> + <transparent opaque="RGB_ZERO"> + <color sid="transparent">1 1 1 1</color> + </transparent> + <transparency> + <float sid="transparency">0</float> + </transparency> + </phong> + </technique> + </profile_COMMON> + </effect> + </library_effects> + <library_geometries> + <geometry id="image-lib" name="image"> + <mesh> + <source id="image-POSITION"> + <float_array id="image-POSITION-array" count="12"> + -0.5 -0.5 0 + 0.5 -0.5 0 + -0.5 0.5 0 + 0.5 0.5 0 + </float_array> + <technique_common> + <accessor source="#image-POSITION-array" count="4" stride="3"> + <param name="X" type="float"/> + <param name="Y" type="float"/> + <param name="Z" type="float"/> + </accessor> + </technique_common> + </source> + <source id="image-Normal0"> + <float_array id="image-Normal0-array" count="18"> + 0 0 1 + 0 0 1 + 0 0 1 + 0 0 1 + 0 0 1 + 0 0 1 + </float_array> + <technique_common> + <accessor source="#image-Normal0-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="image-UV0"> + <float_array id="image-UV0-array" count="8"> + 0 0 + 1 0 + 0 1 + 1 1 + </float_array> + <!-- + 0.000499 0.000500 + 0.999500 0.000499 + 0.000500 0.999501 + 0.999501 0.999500 + --> + <technique_common> + <accessor source="#image-UV0-array" count="4" stride="2"> + <param name="S" type="float"/> + <param name="T" type="float"/> + </accessor> + </technique_common> + </source> + <vertices id="image-VERTEX"> + <input semantic="POSITION" source="#image-POSITION"/> + </vertices> + <triangles count="2" material="Material #36"> + <input semantic="VERTEX" offset="0" source="#image-VERTEX"/> + <input semantic="NORMAL" offset="1" source="#image-Normal0"/> + <input semantic="TEXCOORD" offset="2" set="0" source="#image-UV0"/> + <p> 0 0 0 1 1 1 3 2 3 3 3 3 2 4 2 0 5 0</p> + </triangles> + </mesh> + </geometry> + </library_geometries> + <library_visual_scenes> + <visual_scene id="" name=""> + <node name="image" id="image" sid="image"> + <matrix sid="matrix">1 0 0 0 0 0 1 0 0 -1 0 0 0 0 0 1</matrix> + <instance_geometry url="#image-lib"> + <bind_material> + <technique_common> + <instance_material symbol="Material #36" target="#Material #36"/> + </technique_common> + </bind_material> + </instance_geometry> + <extra> + <technique profile="FCOLLADA"> + <visibility>1</visibility> + </technique> + </extra> + </node> + <extra> + <technique profile="MAX3D"> + <frame_rate>30</frame_rate> + </technique> + <technique profile="FCOLLADA"> + <start_time>0</start_time> + <end_time>3.333333</end_time> + </technique> + </extra> + </visual_scene> + </library_visual_scenes> + <scene> + <instance_visual_scene url="#"></instance_visual_scene> + </scene> +</COLLADA> diff --git a/urdf/signs/localization_sign_macro.xacro b/urdf/signs/localization_sign_macro.xacro new file mode 100644 index 0000000000000000000000000000000000000000..082a586c3624f747465da363da7077caeff94c51 --- /dev/null +++ b/urdf/signs/localization_sign_macro.xacro @@ -0,0 +1,131 @@ +<?xml version="1.0"?> + +<root xmlns:xacro="http://www.ros.org/wiki/xacro"> + + <xacro:include filename="$(find iri_sign_description)/urdf/materials.xacro" /> + + <xacro:property name="PI" value="3.1415926535897931" /> + <xacro:property name="box_width" value="0.12" /> + <xacro:property name="box_depth" value="0.01" /> + <xacro:property name="box_height" value="0.175" /> + <xacro:property name="box_material" value="white" /> + <xacro:property name="box_gazebo_material" value="Gazebo/White" /> + <xacro:property name="tag_size" value="0.08" /> + <xacro:property name="tag_z_offset" value="0.025" /> + <xacro:property name="delta" value="0.0001" /> + <xacro:property name="top_panel_width" value="0.05" /> + <xacro:property name="top_panel_height" value="0.05" /> + <xacro:property name="top_panel_z_offset" value="0.12" /> + + <xacro:macro name="localization_sign" + params="name:=loc_sign + tag_dae:=qr_loc1 + top_panel_dae:=world + box_gazebo_material:=Gazebo/White"> + + <link name="${name}_base_link"> + <visual> + <origin xyz="-${box_depth/2.0} 0 ${box_height/2.0}" rpy="0 0 0"/> + <geometry> + <box size="${box_depth} ${box_width} ${box_height}"/> + </geometry> + <material name="${box_material}"/> + </visual> + <collision> + <origin xyz="-${box_depth/2.0} 0 ${box_height/2.0}" rpy="0 0 0"/> + <geometry> + <box size="${box_depth} ${box_width} ${box_height}"/> + </geometry> + </collision> + </link> + + <gazebo reference="${name}_base_link"> + <material>${box_gazebo_material}</material> + </gazebo> + + <link name="${name}_tag_link"> + <inertial> + <mass value="0.001"/> + <origin xyz="0.0 0.0 0.0" rpy="0 0 0"/> + <inertia ixx="0.00001" ixy="0.0" ixz="0.0" iyy="0.00001" iyz="0.0" izz="0.00001" /> + </inertial> + </link> + + <joint name="joint_${name}_base_link_to_${name}_tag_link" type="fixed"> + <origin xyz="${delta} 0 ${tag_size/2.0+tag_z_offset}" rpy="0 0 0" /> + <parent link="${name}_base_link"/> + <child link="${name}_tag_link" /> + </joint> + + <gazebo reference="${name}_tag_link"> + <material>${box_gazebo_material}</material> + </gazebo> + + <link name="${name}_tag_image"> + <visual> + <origin xyz="0 0 0" rpy="0 0 0"/> + <geometry> + <mesh filename="package://iri_sign_description/urdf/signs/dae/${tag_dae}.dae" scale="${tag_size} 1.0 ${tag_size}"/> + </geometry> + </visual> + </link> + + <joint name="joint_${name}_tag_link_to_${name}_tag_image" type="fixed"> + <origin xyz="0 0 0" rpy="0 ${PI} -${PI/2}" /> + <parent link="${name}_tag_link"/> + <child link="${name}_tag_image" /> + </joint> + + <gazebo reference="${name}_tag_image"> + </gazebo> + + <link name="${name}_top_panel_link"> + </link> + + <joint name="joint_${name}_base_link_to_${name}_top_panel_link" type="fixed"> + <origin xyz="${delta} 0 ${top_panel_height/2.0+top_panel_z_offset}" rpy="0 0 0"/> + <parent link="${name}_base_link"/> + <child link="${name}_top_panel_link"/> + </joint> + + <gazebo reference="${name}_top_panel_link"> + </gazebo> + + <link name="${name}_top_panel_image"> + <visual> + <origin xyz="0 0 0" rpy="0 0 0"/> + <geometry> + <mesh filename="package://iri_sign_description/urdf/signs/dae/${top_panel_dae}.dae" scale="${top_panel_width} 1.0 ${top_panel_height}"/> + <!--<box size="${top_panel_width} ${delta} ${top_panel_height}"/>--> + </geometry> + <material name="${box_material}"/> + </visual> + </link> + + <gazebo reference="${name}_top_panel_image"> + </gazebo> + + <joint name="joint_${name}_top_panel_link_to_${name}_top_panel_image" type="fixed"> + <origin xyz="0 0 0" rpy="0 ${PI} -${PI/2}" /> + <parent link="${name}_top_panel_link"/> + <child link="${name}_top_panel_image" /> + </joint> + + <gazebo> + <static>true</static> + </gazebo> + + <!-- + <gazebo> + <plugin name="${name}_ground_truth" filename="libgazebo_ros_p3d.so"> + <frameName>map</frameName> + <bodyName>${name}_base_link</bodyName> + <topicName>${name}_odom_ground_truth</topicName> + <updateRate>5.0</updateRate> + </plugin> + </gazebo> + --> + + </xacro:macro> + +</root>