<NME> zed_macro.urdf.xacro
<BEF> <?xml version="1.0"?>

<!--
Copyright (c) 2020, 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 xmlns:xacro="http://wiki.ros.org/xacro">
  <xacro:include filename="$(find zed_wrapper)/urdf/include/materials.urdf.xacro" />
  <xacro:property name="M_PI"     value="3.1415926535897931" />

  <!--
    Parameters:
      - name: the camera's name.  should match the parameter sent to the launch file for this camera
      - model: the tye of camera, one of zed, zedm, zed2, zed2i
      - parent: the parent link of the camera.  must be defined in the URDF file that uses this macro
      - origin: the xyz/rpy offset from the parent link
  -->
  <xacro:macro name="zed_camera" params="name=zed model=zed parent *origin">
    <xacro:if value="${model == 'zed'}">
      <xacro:property name="baseline" value="0.12" />
      <xacro:property name="height" value="0.033" />
    </xacro:if>
    <xacro:if value="${model == 'zedm'}">
      <xacro:property name="baseline" value="0.06" />
      <xacro:property name="height" value="0.0265" />
    </xacro:if>
    <xacro:if value="${model == 'zed2'}">
      <xacro:property name="baseline" value="0.12" />
      <xacro:property name="height" value="0.033" />
    </xacro:if>
    <xacro:if value="${model == 'zed2i'}">
      <xacro:property name="baseline" value="0.12" />
      <xacro:property name="height" value="0.033" />
    </xacro:if>



    <!-- Camera mounting point (the threaded screw hole in the bottom) -->
    <link name="${name}_base_link" />
    <joint name="${name}_base_joint" type="fixed">
      <parent link="${parent}"/>
      <child link="${name}_base_link"/>
      <xacro:insert_block name="origin" />
    </joint>


    <!-- Camera Center -->
    <link name="${name}_camera_center">
      <visual>
        <origin xyz="0 0 0" rpy="0 0 0"/>
        <geometry>
          <mesh filename="package://zed_interfaces/meshes/${model}.stl" />
        </geometry>
        <material name="${model}_mat" />
      </visual>
      <collision>
        <geometry>
          <mesh filename="package://zed_interfaces/meshes/${model}.stl" />
        </geometry>
      </collision>
    </link>
    <joint name="${name}_camera_center_joint" type="fixed">
      <parent link="${name}_base_link"/>
      <child link="${name}_camera_center"/>
      <origin xyz="0 0 ${height/2}" rpy="0 0 0" />
    </joint>


    <!-- Left Camera -->
    <link name="${name}_left_camera_frame" />
    <joint name="${name}_left_camera_joint" type="fixed">
      <parent link="${name}_camera_center"/>
      <child link="${name}_left_camera_frame"/>
      <origin xyz="0 ${baseline/2} 0" rpy="0 0 0" />
    </joint>

    <link name="${name}_left_camera_optical_frame"/>
    <joint name="${name}_left_camera_optical_joint" type="fixed">
      <origin xyz="0 0 0" rpy="-${M_PI/2} 0.0 -${M_PI/2}"/>
      <parent link="${name}_left_camera_frame"/>
      <child link="${name}_left_camera_optical_frame"/>
    </joint>


    <!-- Right Camera -->
    <link name="${name}_right_camera_frame" />
    <joint name="${name}_right_camera_joint" type="fixed">
      <parent link="${name}_camera_center"/>
      <child link="${name}_right_camera_frame"/>
      <origin xyz="0 -${baseline/2} 0" rpy="0 0 0" />
    </joint>

    <link name="${name}_right_camera_optical_frame"/>
    <joint name="${name}_right_camera_optical_joint" type="fixed">
      <origin xyz="0 0 0" rpy="-${M_PI/2} 0.0 -${M_PI/2}"/>
      <parent link="${name}_right_camera_frame"/>
      <child link="${name}_right_camera_optical_frame"/>
    </joint>


    <!-- ZED2 Sensors -->
    <xacro:if value="${model == 'zed2' or model == 'zed2i'}">
      <link name="${name}_mag_link" />
      <joint name="${name}_mag_joint" type="fixed">
        <parent link="${name}_camera_center"/>
        <child link="${name}_mag_link"/>
        <origin xyz="0 0 0" rpy="0 0 0" />
      </joint>

      <link name="${name}_baro_link" />
      <joint name="${name}_baro_joint" type="fixed">
        <parent link="${name}_camera_center"/>
        <child link="${name}_baro_link"/>
        <origin xyz="0 0 0" rpy="0 0 0" />
      </joint>

      <link name="${name}_temp_left_link" />
      <joint name="${name}_temp_left_joint" type="fixed">
        <parent link="${name}_left_camera_frame"/>
        <child link="${name}_temp_left_link"/>
        <origin xyz="0 0 0" rpy="0 0 0" />
      </joint>

      <link name="${name}_temp_right_link" />
      <joint name="${name}_temp_right_joint" type="fixed">
        <parent link="${name}_right_camera_frame"/>
        <child link="${name}_temp_right_link"/>
        <origin xyz="0 0 0" rpy="0 0 0" />
      </joint>
    </xacro:if>
  </xacro:macro>
</robot>

<MSG> Improve URDF link positions

<DFF> @@ -33,18 +33,30 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     <xacro:if value="${model == 'zed'}">
       <xacro:property name="baseline" value="0.12" />
       <xacro:property name="height" value="0.033" />
+      <xacro:property name="bottom_slope" value="0.05" />
+      <xacro:property name="screw_offset_x" value="0.0" />
+      <xacro:property name="optical_offset_x" value="-0.01" />
     </xacro:if>
     <xacro:if value="${model == 'zedm'}">
       <xacro:property name="baseline" value="0.06" />
       <xacro:property name="height" value="0.0265" />
+      <xacro:property name="bottom_slope" value="0.0" /> 
+      <xacro:property name="screw_offset_x" value="0.0" />
+      <xacro:property name="optical_offset_x" value="0.0" />
     </xacro:if>
     <xacro:if value="${model == 'zed2'}">
       <xacro:property name="baseline" value="0.12" />
       <xacro:property name="height" value="0.033" />
+      <xacro:property name="bottom_slope" value="0.05" />
+      <xacro:property name="screw_offset_x" value="0.0" />
+      <xacro:property name="optical_offset_x" value="-0.01" />
     </xacro:if>
     <xacro:if value="${model == 'zed2i'}">
       <xacro:property name="baseline" value="0.12" />
       <xacro:property name="height" value="0.033" />
+      <xacro:property name="bottom_slope" value="0.0" />
+      <xacro:property name="screw_offset_x" value="-0.01" />
+      <xacro:property name="optical_offset_x" value="-0.01" />
     </xacro:if>
 
 
@@ -61,7 +73,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     <!-- Camera Center -->
     <link name="${name}_camera_center">
       <visual>
-        <origin xyz="0 0 0" rpy="0 0 0"/>
+        <origin xyz="${screw_offset_x} 0 0" rpy="0 0 0"/>
         <geometry>
           <mesh filename="package://zed_interfaces/meshes/${model}.stl" />
         </geometry>
@@ -76,7 +88,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     <joint name="${name}_camera_center_joint" type="fixed">
       <parent link="${name}_base_link"/>
       <child link="${name}_camera_center"/>
-      <origin xyz="0 0 ${height/2}" rpy="0 0 0" />
+      <origin xyz="0 0 ${height/2}" rpy="0 ${bottom_slope} 0" />
     </joint>
 
 
@@ -90,7 +102,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
     <link name="${name}_left_camera_optical_frame"/>
     <joint name="${name}_left_camera_optical_joint" type="fixed">
-      <origin xyz="0 0 0" rpy="-${M_PI/2} 0.0 -${M_PI/2}"/>
+      <origin xyz="${optical_offset_x} 0 0" rpy="-${M_PI/2} 0.0 -${M_PI/2}"/>
       <parent link="${name}_left_camera_frame"/>
       <child link="${name}_left_camera_optical_frame"/>
     </joint>
@@ -106,7 +118,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
     <link name="${name}_right_camera_optical_frame"/>
     <joint name="${name}_right_camera_optical_joint" type="fixed">
-      <origin xyz="0 0 0" rpy="-${M_PI/2} 0.0 -${M_PI/2}"/>
+      <origin xyz="${optical_offset_x} 0 0" rpy="-${M_PI/2} 0.0 -${M_PI/2}"/>
       <parent link="${name}_right_camera_frame"/>
       <child link="${name}_right_camera_optical_frame"/>
     </joint>

{'commit': 'diff --git a/zed_wrapper/urdf/zed_macro.urdf.xacro b/zed_wrapper/urdf/zed_macro.urdf.xacro\nindex ab41a52..81e4d18 100644\n--- a/zed_wrapper/urdf/zed_macro.urdf.xacro\n+++ b/zed_wrapper/urdf/zed_macro.urdf.xacro\n@@ -33,18 +33,30 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n     <xacro:if value="${model == \'zed\'}">\n       <xacro:property name="baseline" value="0.12" />\n       <xacro:property name="height" value="0.033" />\n+      <xacro:property name="bottom_slope" value="0.05" />\n+      <xacro:property name="screw_offset_x" value="0.0" />\n+      <xacro:property name="optical_offset_x" value="-0.01" />\n     </xacro:if>\n     <xacro:if value="${model == \'zedm\'}">\n       <xacro:property name="baseline" value="0.06" />\n       <xacro:property name="height" value="0.0265" />\n+      <xacro:property name="bottom_slope" value="0.0" /> \n+      <xacro:property name="screw_offset_x" value="0.0" />\n+      <xacro:property name="optical_offset_x" value="0.0" />\n     </xacro:if>\n     <xacro:if value="${model == \'zed2\'}">\n       <xacro:property name="baseline" value="0.12" />\n       <xacro:property name="height" value="0.033" />\n+      <xacro:property name="bottom_slope" value="0.05" />\n+      <xacro:property name="screw_offset_x" value="0.0" />\n+      <xacro:property name="optical_offset_x" value="-0.01" />\n     </xacro:if>\n     <xacro:if value="${model == \'zed2i\'}">\n       <xacro:property name="baseline" value="0.12" />\n       <xacro:property name="height" value="0.033" />\n+      <xacro:property name="bottom_slope" value="0.0" />\n+      <xacro:property name="screw_offset_x" value="-0.01" />\n+      <xacro:property name="optical_offset_x" value="-0.01" />\n     </xacro:if>\n \n \n@@ -61,7 +73,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n     <!-- Camera Center -->\n     <link name="${name}_camera_center">\n       <visual>\n-        <origin xyz="0 0 0" rpy="0 0 0"/>\n+        <origin xyz="${screw_offset_x} 0 0" rpy="0 0 0"/>\n         <geometry>\n           <mesh filename="package://zed_interfaces/meshes/${model}.stl" />\n         </geometry>\n@@ -76,7 +88,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n     <joint name="${name}_camera_center_joint" type="fixed">\n       <parent link="${name}_base_link"/>\n       <child link="${name}_camera_center"/>\n-      <origin xyz="0 0 ${height/2}" rpy="0 0 0" />\n+      <origin xyz="0 0 ${height/2}" rpy="0 ${bottom_slope} 0" />\n     </joint>\n \n \n@@ -90,7 +102,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n \n     <link name="${name}_left_camera_optical_frame"/>\n     <joint name="${name}_left_camera_optical_joint" type="fixed">\n-      <origin xyz="0 0 0" rpy="-${M_PI/2} 0.0 -${M_PI/2}"/>\n+      <origin xyz="${optical_offset_x} 0 0" rpy="-${M_PI/2} 0.0 -${M_PI/2}"/>\n       <parent link="${name}_left_camera_frame"/>\n       <child link="${name}_left_camera_optical_frame"/>\n     </joint>\n@@ -106,7 +118,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n \n     <link name="${name}_right_camera_optical_frame"/>\n     <joint name="${name}_right_camera_optical_joint" type="fixed">\n-      <origin xyz="0 0 0" rpy="-${M_PI/2} 0.0 -${M_PI/2}"/>\n+      <origin xyz="${optical_offset_x} 0 0" rpy="-${M_PI/2} 0.0 -${M_PI/2}"/>\n       <parent link="${name}_right_camera_frame"/>\n       <child link="${name}_right_camera_optical_frame"/>\n     </joint>\n', 'commit_subject': 'Improve URDF link positions', 'repo_name': 'stereolabs/zed-ros-wrapper', 'committer': {'name': 'Walter Lucetti', 'email': 'ce670d957d173e51a624437d428fc18bb2aaac48@stereolabs.com', 'time_sec': '1637759737', 'tz_offset': '60', 'date': {'seconds': '1637759737'}}, 'commit_tree': 'cdf35d0f2e6b5aa0070dcf09d4942e87e98089ca', 'commit_message': 'Improve URDF link positions\n', 'language_name': 'C++', 'license': 'mit', 'hunks': '@@ -33,18 +33,30 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n     <xacro:if value="${model == \'zed\'}">\n       <xacro:property name="baseline" value="0.12" />\n       <xacro:property name="height" value="0.033" />\n+      <xacro:property name="bottom_slope" value="0.05" />\n+      <xacro:property name="screw_offset_x" value="0.0" />\n+      <xacro:property name="optical_offset_x" value="-0.01" />\n     </xacro:if>\n     <xacro:if value="${model == \'zedm\'}">\n       <xacro:property name="baseline" value="0.06" />\n       <xacro:property name="height" value="0.0265" />\n+      <xacro:property name="bottom_slope" value="0.0" /> \n+      <xacro:property name="screw_offset_x" value="0.0" />\n+      <xacro:property name="optical_offset_x" value="0.0" />\n     </xacro:if>\n     <xacro:if value="${model == \'zed2\'}">\n       <xacro:property name="baseline" value="0.12" />\n       <xacro:property name="height" value="0.033" />\n+      <xacro:property name="bottom_slope" value="0.05" />\n+      <xacro:property name="screw_offset_x" value="0.0" />\n+      <xacro:property name="optical_offset_x" value="-0.01" />\n     </xacro:if>\n     <xacro:if value="${model == \'zed2i\'}">\n       <xacro:property name="baseline" value="0.12" />\n       <xacro:property name="height" value="0.033" />\n+      <xacro:property name="bottom_slope" value="0.0" />\n+      <xacro:property name="screw_offset_x" value="-0.01" />\n+      <xacro:property name="optical_offset_x" value="-0.01" />\n     </xacro:if>\n \n \n@@ -61,7 +73,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n     <!-- Camera Center -->\n     <link name="${name}_camera_center">\n       <visual>\n-        <origin xyz="0 0 0" rpy="0 0 0"/>\n+        <origin xyz="${screw_offset_x} 0 0" rpy="0 0 0"/>\n         <geometry>\n           <mesh filename="package://zed_interfaces/meshes/${model}.stl" />\n         </geometry>\n@@ -76,7 +88,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n     <joint name="${name}_camera_center_joint" type="fixed">\n       <parent link="${name}_base_link"/>\n       <child link="${name}_camera_center"/>\n-      <origin xyz="0 0 ${height/2}" rpy="0 0 0" />\n+      <origin xyz="0 0 ${height/2}" rpy="0 ${bottom_slope} 0" />\n     </joint>\n \n \n@@ -90,7 +102,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n \n     <link name="${name}_left_camera_optical_frame"/>\n     <joint name="${name}_left_camera_optical_joint" type="fixed">\n-      <origin xyz="0 0 0" rpy="-${M_PI/2} 0.0 -${M_PI/2}"/>\n+      <origin xyz="${optical_offset_x} 0 0" rpy="-${M_PI/2} 0.0 -${M_PI/2}"/>\n       <parent link="${name}_left_camera_frame"/>\n       <child link="${name}_left_camera_optical_frame"/>\n     </joint>\n@@ -106,7 +118,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n \n     <link name="${name}_right_camera_optical_frame"/>\n     <joint name="${name}_right_camera_optical_joint" type="fixed">\n-      <origin xyz="0 0 0" rpy="-${M_PI/2} 0.0 -${M_PI/2}"/>\n+      <origin xyz="${optical_offset_x} 0 0" rpy="-${M_PI/2} 0.0 -${M_PI/2}"/>\n       <parent link="${name}_right_camera_frame"/>\n       <child link="${name}_right_camera_optical_frame"/>\n     </joint>\n', 'addition_count': 16, 'deletion_count': 4, 'src_file': 'a/zed_wrapper/urdf/zed_macro.urdf.xacro', 'tgt_file': 'b/zed_wrapper/urdf/zed_macro.urdf.xacro', 'file_extension': '.xacro', 'before_file': '<?xml version="1.0"?>\n\n<!--\nCopyright (c) 2020, STEREOLABS.\n\nAll rights reserved.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\nOWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\nSPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\nLIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\nDATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n-->\n\n<robot xmlns:xacro="http://wiki.ros.org/xacro">\n  <xacro:include filename="$(find zed_wrapper)/urdf/include/materials.urdf.xacro" />\n  <xacro:property name="M_PI"     value="3.1415926535897931" />\n\n  <!--\n    Parameters:\n      - name: the camera\'s name.  should match the parameter sent to the launch file for this camera\n      - model: the tye of camera, one of zed, zedm, zed2, zed2i\n      - parent: the parent link of the camera.  must be defined in the URDF file that uses this macro\n      - origin: the xyz/rpy offset from the parent link\n  -->\n  <xacro:macro name="zed_camera" params="name=zed model=zed parent *origin">\n    <xacro:if value="${model == \'zed\'}">\n      <xacro:property name="baseline" value="0.12" />\n      <xacro:property name="height" value="0.033" />\n    </xacro:if>\n    <xacro:if value="${model == \'zedm\'}">\n      <xacro:property name="baseline" value="0.06" />\n      <xacro:property name="height" value="0.0265" />\n    </xacro:if>\n    <xacro:if value="${model == \'zed2\'}">\n      <xacro:property name="baseline" value="0.12" />\n      <xacro:property name="height" value="0.033" />\n    </xacro:if>\n    <xacro:if value="${model == \'zed2i\'}">\n      <xacro:property name="baseline" value="0.12" />\n      <xacro:property name="height" value="0.033" />\n    </xacro:if>\n\n\n\n    <!-- Camera mounting point (the threaded screw hole in the bottom) -->\n    <link name="${name}_base_link" />\n    <joint name="${name}_base_joint" type="fixed">\n      <parent link="${parent}"/>\n      <child link="${name}_base_link"/>\n      <xacro:insert_block name="origin" />\n    </joint>\n\n\n    <!-- Camera Center -->\n    <link name="${name}_camera_center">\n      <visual>\n        <origin xyz="0 0 0" rpy="0 0 0"/>\n        <geometry>\n          <mesh filename="package://zed_interfaces/meshes/${model}.stl" />\n        </geometry>\n        <material name="${model}_mat" />\n      </visual>\n      <collision>\n        <geometry>\n          <mesh filename="package://zed_interfaces/meshes/${model}.stl" />\n        </geometry>\n      </collision>\n    </link>\n    <joint name="${name}_camera_center_joint" type="fixed">\n      <parent link="${name}_base_link"/>\n      <child link="${name}_camera_center"/>\n      <origin xyz="0 0 ${height/2}" rpy="0 0 0" />\n    </joint>\n\n\n    <!-- Left Camera -->\n    <link name="${name}_left_camera_frame" />\n    <joint name="${name}_left_camera_joint" type="fixed">\n      <parent link="${name}_camera_center"/>\n      <child link="${name}_left_camera_frame"/>\n      <origin xyz="0 ${baseline/2} 0" rpy="0 0 0" />\n    </joint>\n\n    <link name="${name}_left_camera_optical_frame"/>\n    <joint name="${name}_left_camera_optical_joint" type="fixed">\n      <origin xyz="0 0 0" rpy="-${M_PI/2} 0.0 -${M_PI/2}"/>\n      <parent link="${name}_left_camera_frame"/>\n      <child link="${name}_left_camera_optical_frame"/>\n    </joint>\n\n\n    <!-- Right Camera -->\n    <link name="${name}_right_camera_frame" />\n    <joint name="${name}_right_camera_joint" type="fixed">\n      <parent link="${name}_camera_center"/>\n      <child link="${name}_right_camera_frame"/>\n      <origin xyz="0 -${baseline/2} 0" rpy="0 0 0" />\n    </joint>\n\n    <link name="${name}_right_camera_optical_frame"/>\n    <joint name="${name}_right_camera_optical_joint" type="fixed">\n      <origin xyz="0 0 0" rpy="-${M_PI/2} 0.0 -${M_PI/2}"/>\n      <parent link="${name}_right_camera_frame"/>\n      <child link="${name}_right_camera_optical_frame"/>\n    </joint>\n\n\n    <!-- ZED2 Sensors -->\n    <xacro:if value="${model == \'zed2\' or model == \'zed2i\'}">\n      <link name="${name}_mag_link" />\n      <joint name="${name}_mag_joint" type="fixed">\n        <parent link="${name}_camera_center"/>\n        <child link="${name}_mag_link"/>\n        <origin xyz="0 0 0" rpy="0 0 0" />\n      </joint>\n\n      <link name="${name}_baro_link" />\n      <joint name="${name}_baro_joint" type="fixed">\n        <parent link="${name}_camera_center"/>\n        <child link="${name}_baro_link"/>\n        <origin xyz="0 0 0" rpy="0 0 0" />\n      </joint>\n\n      <link name="${name}_temp_left_link" />\n      <joint name="${name}_temp_left_joint" type="fixed">\n        <parent link="${name}_left_camera_frame"/>\n        <child link="${name}_temp_left_link"/>\n        <origin xyz="0 0 0" rpy="0 0 0" />\n      </joint>\n\n      <link name="${name}_temp_right_link" />\n      <joint name="${name}_temp_right_joint" type="fixed">\n        <parent link="${name}_right_camera_frame"/>\n        <child link="${name}_temp_right_link"/>\n        <origin xyz="0 0 0" rpy="0 0 0" />\n      </joint>\n    </xacro:if>\n  </xacro:macro>\n</robot>\n', 'message': 'Improve URDF link positions\n', 'author_name': 'Walter Lucetti', 'lang': 'urdf'}