Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gazebo ignition multirobots #39

Merged
merged 5 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions urdf/orbbec_astra.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,16 @@
params="parent_link xyz rpy
tf_prefix:=None
camera_name:=camera
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="${tf_prefix == 'None'}">
<xacro:property name="prefix" value="" />
</xacro:if>
Expand Down Expand Up @@ -90,7 +98,7 @@
<always_on>true</always_on>
<update_rate>20.0</update_rate>

<topic>${camera_name}</topic>
<topic>${ns}${camera_name}</topic>
<!-- It is not possible to split the frame of the color and the depth stream.
The frame of color stream should be ${prefix}${camera_name}_color_optical_frame -->
<ignition_frame_id>${prefix}${camera_name}_depth_optical_frame</ignition_frame_id>
Expand All @@ -107,13 +115,11 @@
<far>8.0</far>
</clip>
</camera>
<ros>
<namespace>${ns}</namespace>
</ros>
</sensor>
</gazebo>
<!-- <gazebo>
<plugin filename="libignition-gazebo-sensors-system.so" name="ignition::gazebo::systems::Sensors">
<render_engine>ogre2</render_engine>
</plugin>
</gazebo> -->
</xacro:if>

<xacro:if value="${simulation_engine == 'gazebo-classic'}">
Expand Down
20 changes: 13 additions & 7 deletions urdf/slamtec_rplidar_a2.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,16 @@
topic:=scan
frame_id:=laser
model:=A2M12
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:if value="${simulation_engine == 'gazebo-classic'}">
<xacro:property name="ray_type" value="gpu_ray" />
Expand Down Expand Up @@ -100,9 +108,9 @@

<xacro:if value="${simulation_engine == 'ignition-gazebo'}">
<gazebo reference="${prefix}${frame_id}">
<sensor type="${ray_type}" name="${prefix}rplidar_a2_sensor">
<sensor type="${ray_type}" name="${ns}${prefix}rplidar_a2_sensor">

<topic>${topic}</topic>
<topic>${ns}${topic}</topic>
<frame_id>${prefix}${frame_id}</frame_id>
<ignition_frame_id>${prefix}${frame_id}</ignition_frame_id>

Expand All @@ -129,13 +137,11 @@
</ray>
<always_on>true</always_on>
<visualize>false</visualize>
<ros>
<namespace>${ns}</namespace>
</ros>
</sensor>
</gazebo>
<gazebo>
<plugin filename="libignition-gazebo-sensors-system.so" name="ignition::gazebo::systems::Sensors">
<render_engine>ogre2</render_engine>
</plugin>
</gazebo>
</xacro:if>

<xacro:if value="${simulation_engine == 'gazebo-classic'}">
Expand Down
21 changes: 14 additions & 7 deletions urdf/slamtec_rplidar_a3.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,17 @@
tf_prefix:=None
topic:=scan
frame_id:=laser
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:if value="${simulation_engine == 'gazebo-classic'}">
<xacro:property name="ray_type" value="gpu_ray" />
Expand Down Expand Up @@ -75,9 +84,9 @@

<xacro:if value="${simulation_engine == 'ignition-gazebo'}">
<gazebo reference="${prefix}${frame_id}">
<sensor type="${ray_type}" name="${prefix}rplidar_a3_sensor">
<sensor type="${ray_type}" name="${ns}${prefix}rplidar_a3_sensor">

<topic>${topic}</topic>
<topic>${ns}${topic}</topic>
<frame_id>${prefix}${frame_id}</frame_id>
<ignition_frame_id>${prefix}${frame_id}</ignition_frame_id>

Expand Down Expand Up @@ -105,13 +114,11 @@
</ray>
<always_on>true</always_on>
<visualize>false</visualize>
<ros>
<namespace>${ns}</namespace>
</ros>
</sensor>
</gazebo>
<gazebo>
<plugin filename="libignition-gazebo-sensors-system.so" name="ignition::gazebo::systems::Sensors">
<render_engine>ogre2</render_engine>
</plugin>
</gazebo>
</xacro:if>

<xacro:if value="${simulation_engine == 'gazebo-classic'}">
Expand Down
21 changes: 14 additions & 7 deletions urdf/slamtec_rplidar_s1.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,17 @@
tf_prefix:=None
topic:=scan
frame_id:=laser
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:if value="${simulation_engine == 'gazebo-classic'}">
<xacro:property name="ray_type" value="gpu_ray" />
Expand Down Expand Up @@ -83,9 +92,9 @@

<xacro:if value="${simulation_engine == 'ignition-gazebo'}">
<gazebo reference="${prefix}${frame_id}">
<sensor type="${ray_type}" name="${prefix}rplidar_s1_sensor">
<sensor type="${ray_type}" name="${ns}${prefix}rplidar_s1_sensor">

<topic>${topic}</topic>
<topic>${ns}${topic}</topic>
<frame_id>${prefix}${frame_id}</frame_id>
<ignition_frame_id>${prefix}${frame_id}</ignition_frame_id>

Expand All @@ -112,13 +121,11 @@
</ray>
<always_on>1</always_on>
<visualize>false</visualize>
<ros>
<namespace>${ns}</namespace>
</ros>
</sensor>
</gazebo>
<gazebo>
<plugin filename="libignition-gazebo-sensors-system.so" name="ignition::gazebo::systems::Sensors">
<render_engine>ogre2</render_engine>
</plugin>
</gazebo>
</xacro:if>

<xacro:if value="${simulation_engine == 'gazebo-classic'}">
Expand Down
20 changes: 13 additions & 7 deletions urdf/slamtec_rplidar_s2.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:=laser
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:if value="${simulation_engine == 'gazebo-classic'}">
<xacro:property name="ray_type" value="gpu_ray" />
Expand Down Expand Up @@ -75,9 +83,9 @@

<xacro:if value="${simulation_engine == 'ignition-gazebo'}">
<gazebo reference="${prefix}${frame_id}">
<sensor type="${ray_type}" name="${prefix}rplidar_s2_sensor">
<sensor type="${ray_type}" name="${ns}${prefix}rplidar_s2_sensor">

<topic>${topic}</topic>
<topic>${ns}${topic}</topic>
<frame_id>${prefix}${frame_id}</frame_id>
<ignition_frame_id>${prefix}${frame_id}</ignition_frame_id>

Expand All @@ -104,13 +112,11 @@
</ray>
<always_on>1</always_on>
<visualize>false</visualize>
<ros>
<namespace>${ns}</namespace>
</ros>
</sensor>
</gazebo>
<gazebo>
<plugin filename="libignition-gazebo-sensors-system.so" name="ignition::gazebo::systems::Sensors">
<render_engine>ogre2</render_engine>
</plugin>
</gazebo>
</xacro:if>

<xacro:if value="${simulation_engine == 'gazebo-classic'}">
Expand Down
20 changes: 13 additions & 7 deletions urdf/slamtec_rplidar_s3.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:=laser
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:if value="${simulation_engine == 'gazebo-classic'}">
<xacro:property name="ray_type" value="gpu_ray" />
Expand Down Expand Up @@ -75,9 +83,9 @@

<xacro:if value="${simulation_engine == 'ignition-gazebo'}">
<gazebo reference="${prefix}${frame_id}">
<sensor type="${ray_type}" name="${prefix}rplidar_s3_sensor">
<sensor type="${ray_type}" name="${ns}${prefix}rplidar_s3_sensor">

<topic>${topic}</topic>
<topic>${ns}${topic}</topic>
<frame_id>${prefix}${frame_id}</frame_id>
<ignition_frame_id>${prefix}${frame_id}</ignition_frame_id>

Expand Down Expand Up @@ -105,11 +113,9 @@
<always_on>1</always_on>
<visualize>false</visualize>
</sensor>
</gazebo>
<gazebo>
<plugin filename="libignition-gazebo-sensors-system.so" name="ignition::gazebo::systems::Sensors">
<render_engine>ogre2</render_engine>
</plugin>
<ros>
<namespace>${ns}</namespace>
</ros>
</gazebo>
</xacro:if>

Expand Down