<?xml version="1.0"?>
<!--
Copyright (c) 2017, STEREOLABS.

All rights reserved.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->
<robot name="zed_camera">

    <link name="zed_left_camera">
        <visual>
            <origin xyz="0 0 0" rpy="0 1.57 0"/>
            <geometry>
                <cylinder radius="0.007" length=".031"/>
            </geometry>
            <material name="dark_grey">
                <color rgba="0.1 0.1 0.1 1"/>
            </material>
        </visual>
    </link>
    <link name="zed_center">
        <visual>
            <origin xyz="0 0 0" rpy="0 0 0"/>
            <geometry>
                <mesh filename="package://zed_wrapper/urdf/ZED.stl" />
            </geometry>
            <material name="light_grey">
                <color rgba="0.8 0.8 0.8 0.8"/>
            </material>
        </visual>
    </link>
    <link name="zed_right_camera">
        <visual>
            <origin xyz="0 0 0" rpy="0 1.57 0"/>
            <geometry>
                <cylinder radius="0.007" length=".031"/>
            </geometry>
            <material name="dark_grey">
                <color rgba="0.1 0.1 0.1 1"/>
            </material>
        </visual>
    </link>
    <link name="zed_depth_camera" />

    <joint name="zed_left_camera_joint" type="fixed">
        <parent link="zed_center"/>
        <child link="zed_left_camera"/>
        <origin xyz="0 0.06 0" rpy="0 0 0" />
    </joint>
    <joint name="zed_depth_camera_joint" type="fixed">
        <parent link="zed_left_camera"/>
        <child link="zed_depth_camera"/>
        <origin xyz="0 0 0" rpy="-1.5707963267948966 0 -1.5707963267948966" />
    </joint>

    <joint name="zed_right_camera_joint" type="fixed">
        <parent link="zed_center"/>
        <child link="zed_right_camera"/>
        <origin xyz="0 -0.06 0" rpy="0 0 0" />
    </joint>

</robot>
