Skip to content

Commit

Permalink
Fix for stray meshes in WR1 link
Browse files Browse the repository at this point in the history
  • Loading branch information
Katie Hughes committed Oct 30, 2024
1 parent d2859b0 commit be04d7d
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 38 deletions.
8 changes: 8 additions & 0 deletions spot_description/launch/description.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ def generate_launch_description() -> launch.LaunchDescription:
choices=["True", "true", "False", "false"],
description="Flag to enable putting frames at the feet",
),
DeclareLaunchArgument(
name="gripperless",
default_value="False",
choices=["True", "true", "False", "false"],
description="Flag to remove the gripper from the arm model",
),
DeclareLaunchArgument(
"tf_prefix", default_value='""', description="Apply namespace prefix to robot links and joints"
),
Expand All @@ -56,6 +62,8 @@ def generate_launch_description() -> launch.LaunchDescription:
LaunchConfiguration("arm"),
" feet:=",
LaunchConfiguration("feet"),
" gripperless:=",
LaunchConfiguration("gripperless"),
" tf_prefix:=",
LaunchConfiguration("tf_prefix"),
]
Expand Down
83 changes: 45 additions & 38 deletions spot_description/urdf/spot_arm_macro.urdf
Original file line number Diff line number Diff line change
Expand Up @@ -201,44 +201,51 @@
upper="1.83259571459404613236" />
</joint>

<link name="${tf_prefix}arm_link_wr1">
<visual>
<origin xyz="0 0 0" rpy="0 0 0" />
<geometry>
<mesh filename="package://spot_description/meshes/arm/visual/arm_link_wr1.obj" />
</geometry>
<material name="arm_link_wr1">
<color rgba="0.2 0.2 0.2 1" />
</material>
</visual>
<collision>
<geometry>
<mesh filename="package://spot_description/meshes/arm/collision/arm_link_wr1.obj" />
</geometry>
</collision>
<collision>
<geometry>
<mesh filename="package://spot_description/meshes/arm/collision/front_jaw.obj" />
</geometry>
</collision>
<collision>
<geometry>
<mesh filename="package://spot_description/meshes/arm/collision/middle_jaw.obj" />
</geometry>
</collision>
<collision>
<geometry>
<mesh filename="package://spot_description/meshes/arm/collision/jaw_tooth.obj" />
</geometry>
</collision>
<inertial>
<origin rpy="0.006393076449033863 0.2928526604761865 -0.022814984050994802"
xyz="0.12516802549362183 0.00010137435310753062 -0.013997982256114483" />
<mass value="0.785" />
<inertia ixx="0.00076741362048185" ixy="0.0" ixz="0.0" iyy="0.0017628124054271809" iyz="0.0"
izz="0.0016818105865345951" />
</inertial>
</link>
<xacro:if value="${gripperless}">
<!-- This link needs to still be defined as to not break WR1 joint but can't include the meshes below, as these
includes parts of the gripper. -->
<link name="${tf_prefix}arm_link_wr1" />
</xacro:if>
<xacro:unless value="${gripperless}">
<link name="${tf_prefix}arm_link_wr1">
<visual>
<origin xyz="0 0 0" rpy="0 0 0" />
<geometry>
<mesh filename="package://spot_description/meshes/arm/visual/arm_link_wr1.obj" />
</geometry>
<material name="arm_link_wr1">
<color rgba="0.2 0.2 0.2 1" />
</material>
</visual>
<collision>
<geometry>
<mesh filename="package://spot_description/meshes/arm/collision/arm_link_wr1.obj" />
</geometry>
</collision>
<collision>
<geometry>
<mesh filename="package://spot_description/meshes/arm/collision/front_jaw.obj" />
</geometry>
</collision>
<collision>
<geometry>
<mesh filename="package://spot_description/meshes/arm/collision/middle_jaw.obj" />
</geometry>
</collision>
<collision>
<geometry>
<mesh filename="package://spot_description/meshes/arm/collision/jaw_tooth.obj" />
</geometry>
</collision>
<inertial>
<origin rpy="0.006393076449033863 0.2928526604761865 -0.022814984050994802"
xyz="0.12516802549362183 0.00010137435310753062 -0.013997982256114483" />
<mass value="0.785" />
<inertia ixx="0.00076741362048185" ixy="0.0" ixz="0.0" iyy="0.0017628124054271809" iyz="0.0"
izz="0.0016818105865345951" />
</inertial>
</link>
</xacro:unless>
<joint name="${tf_prefix}arm_wr1" type="revolute">
<origin xyz="0.0 0.0 0.0" rpy="0 0 0" />
<axis xyz="1 0 0" />
Expand Down

0 comments on commit be04d7d

Please sign in to comment.