Skip to content

Commit

Permalink
Use package:// instead of file://
Browse files Browse the repository at this point in the history
  • Loading branch information
rafal-gorecki committed Nov 23, 2023
1 parent f11a8f9 commit 3f9cfcc
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
1 change: 1 addition & 0 deletions rosbot_description/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ install(DIRECTORY
DESTINATION share/${PROJECT_NAME}
)

ament_environment_hooks("${CMAKE_CURRENT_SOURCE_DIR}/env-hooks/${PROJECT_NAME}.sh.in")
ament_package()
3 changes: 3 additions & 0 deletions rosbot_description/env-hooks/rosbot_description.sh.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ament_prepend_unique_value GAZEBO_MODEL_PATH "@CMAKE_INSTALL_PREFIX@/share"
ament_prepend_unique_value GZ_SIM_RESOURCE_PATH "@CMAKE_INSTALL_PREFIX@/share"
ament_prepend_unique_value IGN_GAZEBO_RESOURCE_PATH "@CMAKE_INSTALL_PREFIX@/share"
4 changes: 2 additions & 2 deletions rosbot_description/urdf/body.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<link name="body_link">
<visual>
<geometry>
<mesh filename="file://$(find rosbot_description)/meshes/body.stl" scale="0.001 0.001 0.001" />
<mesh filename="package://rosbot_description/meshes/body.stl" scale="0.001 0.001 0.001" />
</geometry>
<origin xyz="0.0 0.0 -0.0173" rpy="${pi/2} 0.0 ${pi/2}" />
<material name="White">
Expand Down Expand Up @@ -51,7 +51,7 @@
<link name="cover_link">
<visual>
<geometry>
<mesh filename="file://$(find rosbot_description)/meshes/cover.stl" scale="0.001 0.001 0.001" />
<mesh filename="package://rosbot_description/meshes/cover.stl" scale="0.001 0.001 0.001" />
</geometry>
<origin xyz="0.0 0.0 -0.002" rpy="${pi/2} 0.0 ${pi/2}" />
<material name="Red">
Expand Down
8 changes: 4 additions & 4 deletions rosbot_description/urdf/wheel.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -32,28 +32,28 @@
<xacro:if value="${prefix == 'fl'}">
<xacro:property name="x" value="${wheel_separation_x/2.0}" />
<xacro:property name="y" value="${wheel_separation_y/2.0}" />
<xacro:property name="mesh" value="file://$(find rosbot_description)/meshes/${wheel_file}_b.dae" />
<xacro:property name="mesh" value="package://rosbot_description/meshes/${wheel_file}_b.dae" />
<xacro:property name="visual_rotation" value="${pi}" />
<xacro:property name="fdir" value="1.0 -1.0 0.0" />
</xacro:if>
<xacro:if value="${prefix == 'fr'}">
<xacro:property name="x" value="${wheel_separation_x/2.0}" />
<xacro:property name="y" value="${-wheel_separation_y/2.0}" />
<xacro:property name="mesh" value="file://$(find rosbot_description)/meshes/${wheel_file}_a.dae" />
<xacro:property name="mesh" value="package://rosbot_description/meshes/${wheel_file}_a.dae" />
<xacro:property name="visual_rotation" value="${pi}" />
<xacro:property name="fdir" value="1.0 1.0 0.0" />
</xacro:if>
<xacro:if value="${prefix == 'rl'}">
<xacro:property name="x" value="${-wheel_separation_x/2}" />
<xacro:property name="y" value="${wheel_separation_y/2}" />
<xacro:property name="mesh" value="file://$(find rosbot_description)/meshes/${wheel_file}_a.dae" />
<xacro:property name="mesh" value="package://rosbot_description/meshes/${wheel_file}_a.dae" />
<xacro:property name="visual_rotation" value="${0.0}" />
<xacro:property name="fdir" value="1.0 1.0 0.0" />
</xacro:if>
<xacro:if value="${prefix == 'rr'}">
<xacro:property name="x" value="${-wheel_separation_x/2}" />
<xacro:property name="y" value="${-wheel_separation_y/2}" />
<xacro:property name="mesh" value="file://$(find rosbot_description)/meshes/${wheel_file}_b.dae" />
<xacro:property name="mesh" value="package://rosbot_description/meshes/${wheel_file}_b.dae" />
<xacro:property name="visual_rotation" value="${0.0}" />
<xacro:property name="fdir" value="1.0 -1.0 0.0" />
</xacro:if>
Expand Down

0 comments on commit 3f9cfcc

Please sign in to comment.