<?xml version="1.0" ?>

<robot
	xmlns:xacro="http://www.ros.org/wiki/xacro">
    <!-- include the laser xacro -->

    <xacro:macro name ="r_platform" params="prefix">
    	<link name ="${prefix}base_link">
    		<visual>
    			<origin rpy="0 0 0" xyz="0 0 0" />
    			<geometry>
    				<mesh filename ="package://r_platform/CAD/robot-1.stl" />
    			</geometry>
    			<material name ="black">
        		<color rgba="0.5 0.5 0.5 1.0"/>
        		</material>

    		</visual>

    	</link>

    	 <link name ="${prefix}back_link">
    		<visual>
    			<origin rpy="${pi/2} 0 0" xyz="-0.0125 0 0.17808" />
    			<geometry>
    				<mesh filename ="package://r_platform/CAD/CenaNova-1.stl" />
    			</geometry>
    			<material name ="blue">
        			<color rgba="0 0.5 0.5 1.0"/>
        		</material>
    		</visual>
    	</link>

    	<link name ="${prefix}front_link">
    		<visual>
    			<origin rpy="${pi/2} 0 0" xyz="-0.0125 0.9105 0.17808" />
    			<geometry>
    				<mesh filename ="package://r_platform/CAD/CenaNovaLaser-1.stl" />
    			</geometry>
    			<material name ="blue">
        			<color rgba="0.83 0.83 0.83 1.0"/>
        		</material>
    		</visual>

    	</link>

    	<link name ="${prefix}curve_link">
    		<visual>
    			<origin rpy="0 0 0" xyz="-0.0125 0.003 0.26808" />
    			<geometry>
    				<mesh filename ="package://r_platform/CAD/Curva-1.stl" />
    			</geometry>
    			<material name ="blue">
        			<color rgba="0.83 0.83 0.83 1.0"/>
        		</material>
    		</visual>

    	</link>

    	<link name ="${prefix}placa_cima_link">
    		<visual>
    			<origin rpy="0 0 0" xyz="0.035 0.0025 0.71408" />
    			<geometry>
    				<mesh filename ="package://r_platform/CAD/Placa-Cima-1.stl" />
    			</geometry>
    			<material name ="blue">
        			<color rgba="0.83 0.83 0.83 1.0"/>
        		</material>
    		</visual>

    	</link>


    	<link name ="${prefix}placa_B1_link">
    		<visual>
    			<origin rpy="0 0 0" xyz="0.135 0.0175 0.43808" />
    			<geometry>
    				<mesh filename ="package://r_platform/CAD/PLACA-B-1.stl" />
    			</geometry>
    			<material name ="LightGrey">
        			<color rgba="0.83 0.83 0.83 1.0"/>
        		</material>
    		</visual>

    	</link>


    	<joint name="${prefix}base_link-${prefix}back_link" type="fixed">
            <origin xyz="0 0 0" rpy="0 0 0" />
            <parent link="${prefix}base_link" />
            <child link="${prefix}back_link" />
		</joint>


		<joint name="${prefix}base_link-${prefix}front_link" type="fixed">
            <origin xyz="0 0 0" rpy="0 0 0" />
            <parent link="${prefix}base_link" />
            <child link="${prefix}front_link" />
		</joint>

		<joint name="${prefix}base_link-${prefix}curve_link" type="fixed">
            <origin xyz="0 0 0" rpy="0 0 0" />
            <parent link="${prefix}base_link" />
            <child link="${prefix}curve_link" />
		</joint>

		<joint name="${prefix}base_link-${prefix}placa_cima_link" type="fixed">
            <origin xyz="0 0 0" rpy="0 0 0" />
            <parent link="${prefix}base_link" />
            <child link="${prefix}placa_cima_link" />
		</joint>

		<joint name="${prefix}base_link-${prefix}placa_B!_link" type="fixed">
            <origin xyz="0 0 0" rpy="0 0 0" />
            <parent link="${prefix}base_link" />
            <child link="${prefix}placa_B1_link" />
		</joint>


    </xacro:macro>
</robot>