Commit 2de53aef authored by Sergi Hernandez's avatar Sergi Hernandez
Browse files

Added a size parameter to the QR codes.

Added a materials xacro file for the RVIZ.
parent 6f3bbc23
......@@ -32,19 +32,19 @@
<child link="${name}_link"/>
</joint>
<xacro:qrcode name="${name}_north" parent="${name}" code="${north_code}">
<xacro:qrcode name="${name}_north" parent="${name}" code="${north_code}" size="0.084">
<origin xyz="0.0 0.375 0.126" rpy="1.5707 0 0" />
</xacro:qrcode>
<xacro:qrcode name="${name}_south" parent="${name}" code="${south_code}">
<xacro:qrcode name="${name}_south" parent="${name}" code="${south_code}" size="0.084">
<origin xyz="0.0 0.375 -0.126" rpy="-1.5707 0 0" />
</xacro:qrcode>
<xacro:qrcode name="${name}_west" parent="${name}" code="${west_code}">
<xacro:qrcode name="${name}_west" parent="${name}" code="${west_code}" size="0.084">
<origin xyz="0.126 0.375 0" rpy="3.14159 0 1.5707" />
</xacro:qrcode>
<xacro:qrcode name="${name}_east" parent="${name}" code="${east_code}">
<xacro:qrcode name="${name}_east" parent="${name}" code="${east_code}" size="0.084">
<origin xyz="-0.126 0.375 0.0" rpy="3.14159 0 -1.5707" />
</xacro:qrcode>
......
......@@ -32,7 +32,7 @@
<child link="${name}_link"/>
</joint>
<xacro:qrcode name="${name}_code" parent="${name}" code="${code}">
<xacro:qrcode name="${name}_code" parent="${name}" code="${code}" size="0.084">
<origin xyz="0.0 0.375 0.126" rpy="1.5707 0 0" />
</xacro:qrcode>
......
......@@ -13,61 +13,61 @@
<xacro:obstacle name="obstacle5" parent="obstacle_base" grid_x="4" grid_y="4" north_code="N5" south_code="S5" east_code="E5" west_code="W5"/>
<xacro:obstacle name="obstacle6" parent="obstacle_base" grid_x="5" grid_y="5" north_code="N6" south_code="S6" east_code="E6" west_code="W6"/>
<xacro:qrcode name="contour_west_25" parent="obstacle_base" code="W25">
<xacro:qrcode name="contour_west_25" parent="obstacle_base" code="W25" size="0.084">
<origin xyz="0.016 0.265 0.375" rpy="0 0 -1.5707" />
</xacro:qrcode>
<xacro:qrcode name="contour_west_75" parent="obstacle_base" code="W75">
<xacro:qrcode name="contour_west_75" parent="obstacle_base" code="W75" size="0.084">
<origin xyz="0.016 0.765 0.375" rpy="0 0 -1.5707" />
</xacro:qrcode>
<xacro:qrcode name="contour_west_125" parent="obstacle_base" code="W125">
<xacro:qrcode name="contour_west_125" parent="obstacle_base" code="W125" size="0.084">
<origin xyz="0.016 1.265 0.375" rpy="0 0 -1.5707" />
</xacro:qrcode>
<xacro:qrcode name="contour_west_175" parent="obstacle_base" code="W175">
<xacro:qrcode name="contour_west_175" parent="obstacle_base" code="W175" size="0.084">
<origin xyz="0.016 1.765 0.375" rpy="0 0 -1.5707" />
</xacro:qrcode>
<xacro:qrcode name="contour_west_225" parent="obstacle_base" code="W225">
<xacro:qrcode name="contour_west_225" parent="obstacle_base" code="W225" size="0.084">
<origin xyz="0.016 2.265 0.375" rpy="0 0 -1.5707" />
</xacro:qrcode>
<xacro:qrcode name="contour_east_25" parent="obstacle_base" code="W25">
<xacro:qrcode name="contour_east_25" parent="obstacle_base" code="W25" size="0.084">
<origin xyz="1.999 0.265 0.375" rpy="0 0 1.5707" />
</xacro:qrcode>
<xacro:qrcode name="contour_east_75" parent="obstacle_base" code="W75">
<xacro:qrcode name="contour_east_75" parent="obstacle_base" code="W75" size="0.084">
<origin xyz="1.999 0.765 0.375" rpy="0 0 1.5707" />
</xacro:qrcode>
<xacro:qrcode name="contour_east_125" parent="obstacle_base" code="W125">
<xacro:qrcode name="contour_east_125" parent="obstacle_base" code="W125" size="0.084">
<origin xyz="1.999 1.265 0.375" rpy="0 0 1.5707" />
</xacro:qrcode>
<xacro:qrcode name="contour_east_175" parent="obstacle_base" code="W175">
<xacro:qrcode name="contour_east_175" parent="obstacle_base" code="W175" size="0.084">
<origin xyz="1.999 1.765 0.375" rpy="0 0 1.5707" />
</xacro:qrcode>
<xacro:qrcode name="contour_east_225" parent="obstacle_base" code="W225">
<xacro:qrcode name="contour_east_225" parent="obstacle_base" code="W225" size="0.084">
<origin xyz="1.999 2.265 0.375" rpy="0 0 1.5707" />
</xacro:qrcode>
<xacro:qrcode name="contour_north_25" parent="obstacle_base" code="N25">
<xacro:qrcode name="contour_north_25" parent="obstacle_base" code="N25" size="0.084">
<origin xyz="0.265 2.514 0.375" rpy="0 0 3.14159" />
</xacro:qrcode>
<xacro:qrcode name="contour_north_75" parent="obstacle_base" code="N75">
<xacro:qrcode name="contour_north_75" parent="obstacle_base" code="N75" size="0.084">
<origin xyz="0.765 2.514 0.375" rpy="0 0 3.14159" />
</xacro:qrcode>
<xacro:qrcode name="contour_north_125" parent="obstacle_base" code="N125">
<xacro:qrcode name="contour_north_125" parent="obstacle_base" code="N125" size="0.084">
<origin xyz="1.265 2.514 0.375" rpy="0 0 3.14159" />
</xacro:qrcode>
<xacro:qrcode name="contour_north_175" parent="obstacle_base" code="N175">
<xacro:qrcode name="contour_north_175" parent="obstacle_base" code="N175" size="0.084">
<origin xyz="1.765 2.514 0.375" rpy="0 0 3.14159" />
</xacro:qrcode>
<xacro:qrcode name="contour_south_25" parent="obstacle_base" code="S25">
<xacro:qrcode name="contour_south_25" parent="obstacle_base" code="S25" size="0.084">
<origin xyz="0.265 0.016 0.375" rpy="0 0 0" />
</xacro:qrcode>
<xacro:qrcode name="contour_south_75" parent="obstacle_base" code="S75">
<xacro:qrcode name="contour_south_75" parent="obstacle_base" code="S75" size="0.084">
<origin xyz="0.765 0.016 0.375" rpy="0 0 0" />
</xacro:qrcode>
<xacro:qrcode name="contour_south_125" parent="obstacle_base" code="S125">
<xacro:qrcode name="contour_south_125" parent="obstacle_base" code="S125" size="0.084">
<origin xyz="1.265 0.016 0.375" rpy="0 0 0" />
</xacro:qrcode>
<xacro:qrcode name="contour_south_175" parent="obstacle_base" code="S175">
<xacro:qrcode name="contour_south_175" parent="obstacle_base" code="S175" size="0.084">
<origin xyz="1.765 0.016 0.375" rpy="0 0 0" />
</xacro:qrcode>
</robot>
......@@ -7,61 +7,61 @@
<xacro:obstacle_base name="obstacle_base"/>
<xacro:qrcode name="contour_west_25" parent="obstacle_base" code="W25">
<xacro:qrcode name="contour_west_25" parent="obstacle_base" code="W25" size="0.2">
<origin xyz="0.016 0.265 0.375" rpy="0 -1.5707 0" />
</xacro:qrcode>
<xacro:qrcode name="contour_west_75" parent="obstacle_base" code="W75">
<xacro:qrcode name="contour_west_75" parent="obstacle_base" code="W75" size="0.2">
<origin xyz="0.016 0.765 0.375" rpy="0 -1.5707 0" />
</xacro:qrcode>
<xacro:qrcode name="contour_west_125" parent="obstacle_base" code="W125">
<xacro:qrcode name="contour_west_125" parent="obstacle_base" code="W125" size="0.2">
<origin xyz="0.016 1.265 0.375" rpy="0 -1.5707 0" />
</xacro:qrcode>
<xacro:qrcode name="contour_west_175" parent="obstacle_base" code="W175">
<xacro:qrcode name="contour_west_175" parent="obstacle_base" code="W175" size="0.2">
<origin xyz="0.016 1.765 0.375" rpy="0 -1.5707 0" />
</xacro:qrcode>
<xacro:qrcode name="contour_west_225" parent="obstacle_base" code="W225">
<xacro:qrcode name="contour_west_225" parent="obstacle_base" code="W225" size="0.2">
<origin xyz="0.016 2.265 0.375" rpy="0 -1.5707 0" />
</xacro:qrcode>
<xacro:qrcode name="contour_east_25" parent="obstacle_base" code="E25">
<xacro:qrcode name="contour_east_25" parent="obstacle_base" code="E25" size="0.2">
<origin xyz="1.999 0.265 0.375" rpy="3.14159 -1.5707 0" />
</xacro:qrcode>
<xacro:qrcode name="contour_east_75" parent="obstacle_base" code="E75">
<xacro:qrcode name="contour_east_75" parent="obstacle_base" code="E75" size="0.2">
<origin xyz="1.999 0.765 0.375" rpy="3.14159 -1.5707 0" />
</xacro:qrcode>
<xacro:qrcode name="contour_east_125" parent="obstacle_base" code="E125">
<xacro:qrcode name="contour_east_125" parent="obstacle_base" code="E125" size="0.2">
<origin xyz="1.999 1.265 0.375" rpy="3.14159 -1.5707 0" />
</xacro:qrcode>
<xacro:qrcode name="contour_east_175" parent="obstacle_base" code="E175">
<xacro:qrcode name="contour_east_175" parent="obstacle_base" code="E175" size="0.2">
<origin xyz="1.999 1.765 0.375" rpy="3.14159 -1.5707 0" />
</xacro:qrcode>
<xacro:qrcode name="contour_east_225" parent="obstacle_base" code="E225">
<xacro:qrcode name="contour_east_225" parent="obstacle_base" code="E225" size="0.2">
<origin xyz="1.999 2.265 0.375" rpy="3.14159 -1.5707 0" />
</xacro:qrcode>
<xacro:qrcode name="contour_north_25" parent="obstacle_base" code="N25">
<xacro:qrcode name="contour_north_25" parent="obstacle_base" code="N25" size="0.2">
<origin xyz="0.265 2.514 0.375" rpy="-1.5707 -1.5707 0" />
</xacro:qrcode>
<xacro:qrcode name="contour_north_75" parent="obstacle_base" code="N75">
<xacro:qrcode name="contour_north_75" parent="obstacle_base" code="N75" size="0.2">
<origin xyz="0.765 2.514 0.375" rpy="-1.5707 -1.5707 0" />
</xacro:qrcode>
<xacro:qrcode name="contour_north_125" parent="obstacle_base" code="N125">
<xacro:qrcode name="contour_north_125" parent="obstacle_base" code="N125" size="0.2">
<origin xyz="1.265 2.514 0.375" rpy="-1.5707 -1.5707 0" />
</xacro:qrcode>
<xacro:qrcode name="contour_north_175" parent="obstacle_base" code="N175">
<xacro:qrcode name="contour_north_175" parent="obstacle_base" code="N175" size="0.2">
<origin xyz="1.765 2.514 0.375" rpy="-1.5707 -1.5707 0" />
</xacro:qrcode>
<xacro:qrcode name="contour_south_25" parent="obstacle_base" code="S25">
<xacro:qrcode name="contour_south_25" parent="obstacle_base" code="S25" size="0.2">
<origin xyz="0.265 0.016 0.375" rpy="1.5707 -1.5707 0" />
</xacro:qrcode>
<xacro:qrcode name="contour_south_75" parent="obstacle_base" code="S75">
<xacro:qrcode name="contour_south_75" parent="obstacle_base" code="S75" size="0.2">
<origin xyz="0.765 0.016 0.375" rpy="1.5707 -1.5707 0" />
</xacro:qrcode>
<xacro:qrcode name="contour_south_125" parent="obstacle_base" code="S125">
<xacro:qrcode name="contour_south_125" parent="obstacle_base" code="S125" size="0.2">
<origin xyz="1.265 0.016 0.375" rpy="1.5707 -1.5707 0" />
</xacro:qrcode>
<xacro:qrcode name="contour_south_175" parent="obstacle_base" code="S175">
<xacro:qrcode name="contour_south_175" parent="obstacle_base" code="S175" size="0.2">
<origin xyz="1.765 0.016 0.375" rpy="1.5707 -1.5707 0" />
</xacro:qrcode>
</robot>
<?xml version="1.0"?>
<root>
<material name="black">
<color rgba="0.0 0.0 0.0 1.0"/>
</material>
<material name="blue">
<color rgba="0.0 0.0 0.8 1.0"/>
</material>
<material name="green">
<color rgba="0.0 0.8 0.0 1.0"/>
</material>
<material name="grey">
<color rgba="0.2 0.2 0.2 1.0"/>
</material>
<material name="white">
<color rgba="1.0 1.0 1.0 1.0"/>
</material>
</root>
......@@ -2,7 +2,7 @@
<root xmlns:xacro="http://ros.org/wiki/xacro">
<xacro:macro name="qrcode" params="name parent code *origin">
<xacro:macro name="qrcode" params="name parent code size *origin">
<!-- obstacle -->
<link name="${code}">
<inertial>
......@@ -13,13 +13,13 @@
<visual>
<origin xyz="0 0 0" rpy="-1.5707 0 1.5707"/>
<geometry>
<mesh filename="package://bioloid_description/urdf/qrcodes/${code}.dae" scale="0.725 0.725 0.725"/>
<mesh filename="package://bioloid_description/urdf/qrcodes/${code}.dae" scale="${size*8.63} ${size*8.63} ${size*8.63}"/>
</geometry>
</visual>
<collision>
<origin xyz="0 0 0" rpy="-1.5707 0 1.5707"/>
<geometry>
<mesh filename="package://bioloid_description/urdf/qrcodes/${code}.dae" scale="0.725 0.725 0.725"/>
<mesh filename="package://bioloid_description/urdf/qrcodes/${code}.dae" scale="${size*8.63} ${size*8.63} ${size*8.63}"/>
</geometry>
</collision>
</link>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment