Skip to content

Commit

Permalink
s unified mesh
Browse files Browse the repository at this point in the history
  • Loading branch information
delihus committed May 17, 2024
1 parent c86e9e8 commit ced4185
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 14 deletions.
24 changes: 12 additions & 12 deletions urdf/components.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@

<xacro:if value="${type == 'LDR10'}">
<xacro:include
filename="$(find ros_components_description)/urdf/ouster_os01.urdf.xacro"
filename="$(find ros_components_description)/urdf/ouster.urdf.xacro"
ns="lidar"
/>

<xacro:lidar.ouster_os01
<xacro:lidar.ouster
parent_link="${parent_link}"
xyz="${xyz}"
rpy="${rpy}"
Expand All @@ -89,11 +89,11 @@

<xacro:if value="${type == 'LDR11'}">
<xacro:include
filename="$(find ros_components_description)/urdf/ouster_os01.urdf.xacro"
filename="$(find ros_components_description)/urdf/ouster.urdf.xacro"
ns="lidar"
/>

<xacro:lidar.ouster_os01
<xacro:lidar.ouster
parent_link="${parent_link}"
xyz="${xyz}"
rpy="${rpy}"
Expand All @@ -105,11 +105,11 @@

<xacro:if value="${type == 'LDR12'}">
<xacro:include
filename="$(find ros_components_description)/urdf/ouster_os01.urdf.xacro"
filename="$(find ros_components_description)/urdf/ouster.urdf.xacro"
ns="lidar"
/>

<xacro:lidar.ouster_os01
<xacro:lidar.ouster
parent_link="${parent_link}"
xyz="${xyz}"
rpy="${rpy}"
Expand All @@ -121,11 +121,11 @@

<xacro:if value="${type == 'LDR13'}">
<xacro:include
filename="$(find ros_components_description)/urdf/ouster_os01.urdf.xacro"
filename="$(find ros_components_description)/urdf/ouster.urdf.xacro"
ns="lidar"
/>

<xacro:lidar.ouster_os01
<xacro:lidar.ouster
parent_link="${parent_link}"
xyz="${xyz}"
rpy="${rpy}"
Expand All @@ -137,11 +137,11 @@

<xacro:if value="${type == 'LDR14'}">
<xacro:include
filename="$(find ros_components_description)/urdf/ouster_os01.urdf.xacro"
filename="$(find ros_components_description)/urdf/ouster.urdf.xacro"
ns="lidar"
/>

<xacro:lidar.ouster_os01
<xacro:lidar.ouster
parent_link="${parent_link}"
xyz="${xyz}"
rpy="${rpy}"
Expand All @@ -153,11 +153,11 @@

<xacro:if value="${type == 'LDR15'}">
<xacro:include
filename="$(find ros_components_description)/urdf/ouster_os01.urdf.xacro"
filename="$(find ros_components_description)/urdf/ouster.urdf.xacro"
ns="lidar"
/>

<xacro:lidar.ouster_os01
<xacro:lidar.ouster
parent_link="${parent_link}"
xyz="${xyz}"
rpy="${rpy}"
Expand Down
10 changes: 8 additions & 2 deletions urdf/ouster_os01.urdf.xacro → urdf/ouster.urdf.xacro
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro">
<xacro:macro name="ouster_os01"
<xacro:macro name="ouster"
params="parent_link xyz rpy
model:=os1_32
namespace:=None
Expand All @@ -10,36 +10,42 @@
<xacro:property name="vfov" value="${radians(90.0)}" scope="parent" />
<xacro:property name="lidar_range" value="50" scope="parent"/>
<xacro:property name="layers" value="32" scope="parent"/>
<xacro:property name="mesh" value="ouster_os01" scope="parent"/>
</xacro:if>

<xacro:if value="${model == 'os0_64'}">
<xacro:property name="vfov" value="${radians(90.0)}" scope="parent" />
<xacro:property name="lidar_range" value="50" scope="parent" />
<xacro:property name="layers" value="64" scope="parent" />
<xacro:property name="mesh" value="ouster_os01" scope="parent"/>
</xacro:if>

<xacro:if value="${model == 'os0_128'}">
<xacro:property name="vfov" value="${radians(90.0)}" scope="parent" />
<xacro:property name="lidar_range" value="50" scope="parent" />
<xacro:property name="layers" value="128" scope="parent" />
<xacro:property name="mesh" value="ouster_os01" scope="parent"/>
</xacro:if>

<xacro:if value="${model == 'os1_32'}">
<xacro:property name="vfov" value="${radians(45.0)}" scope="parent" />
<xacro:property name="lidar_range" value="120" scope="parent" />
<xacro:property name="layers" value="32" scope="parent" />
<xacro:property name="mesh" value="ouster_os01" scope="parent"/>
</xacro:if>

<xacro:if value="${model == 'os1_64'}">
<xacro:property name="vfov" value="${radians(45.0)}" scope="parent" />
<xacro:property name="lidar_range" value="120" scope="parent" />
<xacro:property name="layers" value="64" scope="parent" />
<xacro:property name="mesh" value="ouster_os01" scope="parent"/>
</xacro:if>

<xacro:if value="${model == 'os1_128'}">
<xacro:property name="vfov" value="${radians(45.0)}" scope="parent" />
<xacro:property name="lidar_range" value="120" scope="parent" />
<xacro:property name="layers" value="128" scope="parent" />
<xacro:property name="mesh" value="ouster_os01" scope="parent"/>
</xacro:if>

<xacro:if value="${namespace == 'None'}">
Expand Down Expand Up @@ -73,7 +79,7 @@
<visual>
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0" />
<geometry>
<mesh filename="package://ros_components_description/meshes/ouster_os01.dae" />
<mesh filename="package://ros_components_description/meshes/${mesh}.dae" />
</geometry>
</visual>

Expand Down

0 comments on commit ced4185

Please sign in to comment.