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

Make URDF compatible with Gazebo Simulation and accessing robot description from a remote robot (machine). #41

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
26 changes: 20 additions & 6 deletions description/urdf/nanoscan3/nanoscan3_macro.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,25 @@
max_angle
min_range
max_range
gaussian_noise:=0.006
max_beams:=540
gaussian_noise:=0.006
max_beams:=540
simulation:=false
*origin
">

<xacro:if value="${simulation}">
<xacro:property
name="file_prefix"
value="file://$(find sick_safetyscanners2)"
/>
</xacro:if>
<xacro:unless value="${simulation}">
<xacro:property
name="file_prefix"
value="package://sick_safetyscanners2"
/>
</xacro:unless>

<xacro:if value="${mounting_kit}">
<!-- MOUNT -->
<joint name="${name}_mount_joint" type="fixed">
Expand All @@ -42,15 +56,15 @@
<xacro:default_inertial/>
<visual>
<geometry>
<mesh filename="file://$(find sick_safetyscanners2)/description/meshes/MountingKit_2a.dae"/>
<mesh filename="${file_prefix}/description/meshes/MountingKit_2a.dae"/>
</geometry>
<material name="black">
<color rgba="0.0 0.0 0.0 1.0"/>
</material>
</visual>
<collision>
<geometry>
<mesh filename="file://$(find sick_safetyscanners2)/description/meshes/MountingKit_2a_collision.stl"/>
<mesh filename="${file_prefix}/description/meshes/MountingKit_2a_collision.stl"/>
</geometry>
</collision>
</link>
Expand Down Expand Up @@ -89,7 +103,7 @@
<visual>
<origin xyz="${-base_x} ${-(sensor_y + base_y)} ${-sensor_z}" rpy="0 0 0" />
<geometry>
<mesh filename="file://$(find sick_safetyscanners2)/description/meshes/NANS3.dae"/>
<mesh filename="${file_prefix}/description/meshes/NANS3.dae"/>
</geometry>
<material name="black">
<color rgba="0.0 0.0 0.0 1.0"/>
Expand All @@ -98,7 +112,7 @@
<collision>
<origin xyz="${-base_x} ${-(sensor_y + base_y)} ${-sensor_z}" rpy="0 0 0" />
<geometry>
<mesh filename="file://$(find sick_safetyscanners2)/description/meshes/NANS3_collision.stl"/>
<mesh filename="${file_prefix}/description/meshes/NANS3_collision.stl"/>
</geometry>
</collision>
</link>
Expand Down