Add custom xarm packages

This commit is contained in:
2023-03-21 13:33:51 +02:00
parent 1763aee9ca
commit e42e0fea90
176 changed files with 13024 additions and 6 deletions

View File

@@ -0,0 +1,29 @@
#!/usr/bin/env python3
# Software License Agreement (BSD License)
#
# Copyright (c) 2021, UFACTORY, Inc.
# All rights reserved.
#
# Author: Vinman <vinman.wen@ufactory.cc> <vinman.cub@gmail.com>
from launch.substitutions import Command, FindExecutable, PathJoinSubstitution
from launch_ros.substitutions import FindPackageShare
def get_xacro_file_content(
xacro_file=PathJoinSubstitution([FindPackageShare('xarm_description'), 'urdf', 'xarm_device.urdf.xacro']),
arguments={}):
command = [
PathJoinSubstitution([FindExecutable(name='xacro')]),
' ',
xacro_file,
' '
]
if arguments and isinstance(arguments, dict):
for key, val in arguments.items():
command.extend([
'{}:='.format(key),
val,
' '
])
return Command(command)