How to set LiDAR rotation when using an "included" file?
I am trying to include 2 LiDAR units in a .xacro
file by including the file here twice. Here's the code I use:
<?xml version="1.0"?>
<robot xmlns:controller="http://playerstage.sourceforge.net/gazebo/xmlschema/#controller"
xmlns:interface="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface"
xmlns:sensor="http://playerstage.sourceforge.net/gazebo/xmlschema/#sensor"
xmlns:xacro="http://www.ros.org/wiki/xacro"
name="sensors">
<!-- Front LiDAR -->
<xacro:include filename="$(find jackal_description)/urdf/accessories/sick_lms1xx_mount.urdf.xacro" />
<xacro:sick_lms1xx_mount prefix="$(optenv JACKAL_LASER_MOUNT front)"
parent_link="$(optenv JACKAL_LASER_MOUNT front)_mount"
topic="$(optenv JACKAL_LASER_TOPIC /front_lidar_scan)"/>
<!-- Rear LiDAR -->
<xacro:include filename="$(find jackal_description)/urdf/accessories/sick_lms1xx_mount.urdf.xacro" />
<xacro:sick_lms1xx_mount prefix="$(optenv JACKAL_LASER_MOUNT rear)"
parent_link="$(optenv JACKAL_LASER_MOUNT rear)_mount"
topic="$(optenv JACKAL_LASER_TOPIC /rear_lidar_scan)"/>
</robot>
This works but I need one LiDAR unit to be oriented in the opposite direction. In the included file this segment below, it suggests I could set JACKAL_LASER_RPY
but I can't work out how to do this from my file above. Could anyone show me how? I've been searching how I might be able to set rpy
within the include
tags but it seem that this isn't possible.
<joint name="${prefix}_laser_mount_joint" type="fixed">
<origin xyz="$(optenv JACKAL_LASER_OFFSET 0 0 0)"
rpy="$(optenv JACKAL_LASER_RPY 0 0 0)" />
<parent link="${parent_link}" />
<child link="${prefix}_laser_mount" />
</joint>