Commit 6f3bbc23 authored by Sergi Hernandez's avatar Sergi Hernandez
Browse files

Added materials to the RVIZ model.

Changed the reference frames of the obstacles environment and QR codes to make them coincide with the real ones.
parent 3dbdf6a7
......@@ -16,7 +16,7 @@
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<mesh filename="package://bioloid_description/meshes/ceabot/obstacle.stl"/>
</geometry>
</geometry>
</visual>
<collision>
<origin xyz="0 0 0" rpy="0 0 0"/>
......
......@@ -14,6 +14,7 @@
<geometry>
<mesh filename="package://bioloid_description/meshes/ceabot/obstacle_base.stl"/>
</geometry>
<material name="green"/>
</visual>
<collision>
<origin xyz="0 0 0" rpy="0 0 0"/>
......@@ -34,6 +35,7 @@
<geometry>
<mesh filename="package://bioloid_description/meshes/ceabot/obstacle_fence.stl"/>
</geometry>
<material name="white"/>
</visual>
<collision>
<origin xyz="0 0 0" rpy="0 0 0"/>
......
......@@ -3,6 +3,7 @@
<xacro:include filename="$(find bioloid_description)/urdf/ceabot/obstacle_base.xacro" />
<xacro:include filename="$(find bioloid_description)/urdf/ceabot/obstacle.xacro" />
<xacro:include filename="$(find bioloid_description)/urdf/qrcodes/qrcode.xacro" />
<xacro:include filename="$(find bioloid_description)/urdf/materials.xacro" />
<xacro:obstacle_base name="obstacle_base"/>
<xacro:obstacle name="obstacle1" parent="obstacle_base" grid_x="0" grid_y="0" north_code="N1" south_code="S1" east_code="E1" west_code="W1"/>
......
......@@ -3,64 +3,65 @@
<xacro:include filename="$(find bioloid_description)/urdf/ceabot/obstacle_base.xacro" />
<xacro:include filename="$(find bioloid_description)/urdf/ceabot/obstacle.xacro" />
<xacro:include filename="$(find bioloid_description)/urdf/qrcodes/qrcode.xacro" />
<xacro:include filename="$(find bioloid_description)/urdf/materials.xacro" />
<xacro:obstacle_base name="obstacle_base"/>
<xacro:qrcode name="contour_west_25" parent="obstacle_base" code="W25">
<origin xyz="0.016 0.265 0.375" rpy="0 0 -1.5707" />
<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">
<origin xyz="0.016 0.765 0.375" rpy="0 0 -1.5707" />
<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">
<origin xyz="0.016 1.265 0.375" rpy="0 0 -1.5707" />
<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">
<origin xyz="0.016 1.765 0.375" rpy="0 0 -1.5707" />
<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">
<origin xyz="0.016 2.265 0.375" rpy="0 0 -1.5707" />
<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="W25">
<origin xyz="1.999 0.265 0.375" rpy="0 0 1.5707" />
<xacro:qrcode name="contour_east_25" parent="obstacle_base" code="E25">
<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="W75">
<origin xyz="1.999 0.765 0.375" rpy="0 0 1.5707" />
<xacro:qrcode name="contour_east_75" parent="obstacle_base" code="E75">
<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="W125">
<origin xyz="1.999 1.265 0.375" rpy="0 0 1.5707" />
<xacro:qrcode name="contour_east_125" parent="obstacle_base" code="E125">
<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="W175">
<origin xyz="1.999 1.765 0.375" rpy="0 0 1.5707" />
<xacro:qrcode name="contour_east_175" parent="obstacle_base" code="E175">
<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="W225">
<origin xyz="1.999 2.265 0.375" rpy="0 0 1.5707" />
<xacro:qrcode name="contour_east_225" parent="obstacle_base" code="E225">
<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">
<origin xyz="0.265 2.514 0.375" rpy="0 0 3.14159" />
<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">
<origin xyz="0.765 2.514 0.375" rpy="0 0 3.14159" />
<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">
<origin xyz="1.265 2.514 0.375" rpy="0 0 3.14159" />
<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">
<origin xyz="1.765 2.514 0.375" rpy="0 0 3.14159" />
<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">
<origin xyz="0.265 0.016 0.375" rpy="0 0 0" />
<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">
<origin xyz="0.765 0.016 0.375" rpy="0 0 0" />
<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">
<origin xyz="1.265 0.016 0.375" rpy="0 0 0" />
<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">
<origin xyz="1.765 0.016 0.375" rpy="0 0 0" />
<origin xyz="1.765 0.016 0.375" rpy="1.5707 -1.5707 0" />
</xacro:qrcode>
</robot>
......@@ -4,22 +4,22 @@
<xacro:macro name="qrcode" params="name parent code *origin">
<!-- obstacle -->
<link name="${name}_${code}_link">
<link name="${code}">
<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>
<visual>
<origin xyz="0 0 0" rpy="0 0 0"/>
<origin xyz="0 0 0" rpy="-1.5707 0 1.5707"/>
<geometry>
<mesh filename="package://bioloid_description/urdf/qrcodes/${code}.dae"/>
<mesh filename="package://bioloid_description/urdf/qrcodes/${code}.dae" scale="0.725 0.725 0.725"/>
</geometry>
</visual>
<collision>
<origin xyz="0 0 0" rpy="0 0 0"/>
<origin xyz="0 0 0" rpy="-1.5707 0 1.5707"/>
<geometry>
<mesh filename="package://bioloid_description/urdf/qrcodes/${code}.dae"/>
<mesh filename="package://bioloid_description/urdf/qrcodes/${code}.dae" scale="0.725 0.725 0.725"/>
</geometry>
</collision>
</link>
......@@ -27,10 +27,10 @@
<joint name="${name}_${code}_joint" type="fixed">
<xacro:insert_block name="origin" />
<parent link="${parent}_link"/>
<child link="${name}_${code}_link"/>
<child link="${code}"/>
</joint>
<gazebo reference="${name}_{code}_link">
<gazebo reference="${code}">
</gazebo>
</xacro:macro>
</root>
......
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