Skip to content
Open
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
17 changes: 15 additions & 2 deletions launch/display_openarm.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,13 @@
from launch_ros.actions import Node


def robot_state_publisher_spawner(context: LaunchContext, arm_type, ee_type, bimanual):
def robot_state_publisher_spawner(context: LaunchContext, arm_type, ee_type, bimanual, mesh_ext):
arm_type_str = context.perform_substitution(arm_type)
ee_type_str = context.perform_substitution(ee_type)
bimanual_str = context.perform_substitution(bimanual)
mesh_ext_str = context.perform_substitution(mesh_ext)
print("[DEBUG] Spawning robot with params:", arm_type_str, ee_type_str, bimanual_str, mesh_ext_str)


xacro_path = os.path.join(
get_package_share_directory("openarm_description"),
Expand All @@ -40,6 +43,7 @@ def robot_state_publisher_spawner(context: LaunchContext, arm_type, ee_type, bim
"arm_type": arm_type_str,
"ee_type": ee_type_str,
"bimanual": bimanual_str,
"mesh_ext": mesh_ext_str
}
).toprettyxml(indent=" ")

Expand Down Expand Up @@ -92,13 +96,21 @@ def generate_launch_description():
description="Whether to use bimanual configuration"
)

mesh_ext_arg = DeclareLaunchArgument(
"mesh_ext",
default_value="dae",
description="Extension for mesh files (dae, stl, or obj)"
)


arm_type = LaunchConfiguration("arm_type")
ee_type = LaunchConfiguration("ee_type")
bimanual = LaunchConfiguration("bimanual")
mesh_ext = LaunchConfiguration("mesh_ext")

robot_state_publisher_loader = OpaqueFunction(
function=robot_state_publisher_spawner,
args=[arm_type, ee_type, bimanual]
args=[arm_type, ee_type, bimanual, mesh_ext]
)

rviz_loader = OpaqueFunction(
Expand All @@ -110,6 +122,7 @@ def generate_launch_description():
arm_type_arg,
ee_type_arg,
bimanual_arg,
mesh_ext_arg,
robot_state_publisher_loader,
Node(
package="joint_state_publisher_gui",
Expand Down
9 changes: 9 additions & 0 deletions meshes/arm/v10/visual/link0.mtl
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# File produced by Open Asset Import Library (http://www.assimp.sf.net)
# (assimp v5.3.0)

newmtl DefaultMaterial
Kd 1 1 1
Ka 0.0500000007 0.0500000007 0.0500000007
Ks 1 1 1
illum 1

Loading