Skip to content

Commit

Permalink
Fixed <ros> tag in s3 | added namespace to velodyne puck
Browse files Browse the repository at this point in the history
Signed-off-by: Jakub Delicat <[email protected]>
  • Loading branch information
delihus committed Jan 15, 2024
1 parent c42e933 commit 8bccb40
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
6 changes: 3 additions & 3 deletions urdf/slamtec_rplidar_s3.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@
</ray>
<always_on>1</always_on>
<visualize>false</visualize>
<ros>
<namespace>${ns}</namespace>
</ros>
</sensor>
<ros>
<namespace>${ns}</namespace>
</ros>
</gazebo>
</xacro:if>

Expand Down
20 changes: 13 additions & 7 deletions urdf/velodyne_puck.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,16 @@
tf_prefix:=None
topic:=scan
frame_id:=velodyne
namespace:=None
simulation_engine:=gazebo-classic">

<xacro:if value="${namespace == 'None'}">
<xacro:property name="ns" value="" />
</xacro:if>
<xacro:unless value="${namespace == 'None'}">
<xacro:property name="ns" value="${namespace}/" />
</xacro:unless>

<xacro:if value="${use_gpu}">
<xacro:property name="ray_type" value="gpu_ray" />
<xacro:property name="plugin_file_name" value="libgazebo_ros_velodyne_gpu_laser.so" />
Expand Down Expand Up @@ -64,7 +72,7 @@
<link name="${prefix}${frame_id}" />

<gazebo reference="${prefix}${frame_id}">
<sensor type="${ray_type}" name="${prefix}velodyne_puck_sensor">
<sensor type="${ray_type}" name="${ns}${prefix}velodyne_puck_sensor">
<visualize>false</visualize>
<update_rate>10.0</update_rate>

Expand Down Expand Up @@ -96,14 +104,10 @@
</ray>

<xacro:if value="${simulation_engine == 'ignition-gazebo'}">
<topic>${topic}</topic>
<topic>${ns}${topic}</topic>
<frame_id>${prefix}${frame_id}</frame_id>
<ignition_frame_id>${prefix}${frame_id}</ignition_frame_id>
<always_on>true</always_on>
<plugin filename="libignition-gazebo-sensors-system.so"
name="ignition::gazebo::systems::Sensors">
<render_engine>ogre2</render_engine>
</plugin>
</xacro:if>

<xacro:if value="${simulation_engine == 'gazebo-classic'}">
Expand All @@ -117,7 +121,9 @@
<frame_name>${prefix}${frame_id}</frame_name>
</plugin>
</xacro:if>

<ros>
<namespace>${ns}</namespace>
</ros>
</sensor>
</gazebo>
</xacro:macro>
Expand Down

0 comments on commit 8bccb40

Please sign in to comment.