Skip to content

Commit

Permalink
Merge pull request #374 from husarion/ros2-ns-refactor
Browse files Browse the repository at this point in the history
Namespace refactor
  • Loading branch information
pawelirh authored Aug 27, 2024
2 parents 415a28e + 87fdb4c commit c5eb7ca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 18 deletions.
14 changes: 2 additions & 12 deletions panther_description/urdf/gazebo.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,7 @@

<!-- Read property -->
<xacro:property name="battery_config" value="${xacro.load_yaml(config_file)}" />
<xacro:if value="${namespace == ''}">
<xacro:property name="ns" value="" />
</xacro:if>
<xacro:unless value="${namespace == ''}">
<xacro:property name="ns" value="${namespace}/" />
</xacro:unless>
<xacro:property name="ns" value='${namespace + "/" if namespace else ""}' />

<!-- Sim Battery -->
<gazebo>
Expand Down Expand Up @@ -68,12 +63,7 @@
<!-- IMU specification: https://www.phidgets.com/?tier=3&catid=10&pcid=8&prodid=1025#Tab_Specifications -->
<xacro:macro name="imu" params="reference_frame namespace:=''">

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

<gazebo reference="${reference_frame}">
<sensor name="${ns}imu" type="imu">
Expand Down
7 changes: 1 addition & 6 deletions panther_description/urdf/panther_macro.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,7 @@
<xacro:property name="imu_rpy" value="0.000 -0.000 3.142" />
</xacro:if>

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

<xacro:property name="wheel_config" value="${xacro.load_yaml(wheel_config_file)}" />
<xacro:property name="wheel_separation_x" value="0.44" />
Expand Down

0 comments on commit c5eb7ca

Please sign in to comment.