text: #!/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 import LaunchDescription
  from launch.actions import IncludeLaunchDescription, DeclareLaunchArgument
  from launch.launch_description_sources import PythonLaunchDescriptionSource
  from launch.substitutions import LaunchConfiguration, ThisLaunchFileDir
  
  def generate_launch_description():
      prefix = LaunchConfiguration('prefix', default='')
      hw_ns = LaunchConfiguration('hw_ns', default='xarm')
      limited = LaunchConfiguration('limited', default=False)
      effort_control = LaunchConfiguration('effort_control', default=False)
      velocity_control = LaunchConfiguration('velocity_control', default=False)
      add_gripper = LaunchConfiguration('add_gripper', default=False)
      add_vacuum_gripper = LaunchConfiguration('add_vacuum_gripper', default=False)
  
      add_other_geometry = LaunchConfiguration('add_other_geometry', default=False)
      geometry_type = LaunchConfiguration('geometry_type', default='box')
      geometry_mass = LaunchConfiguration('geometry_mass', default=0.1)
      geometry_height = LaunchConfiguration('geometry_height', default=0.1)
      geometry_radius = LaunchConfiguration('geometry_radius', default=0.1)
      geometry_length = LaunchConfiguration('geometry_length', default=0.1)
      geometry_width = LaunchConfiguration('geometry_width', default=0.1)
      geometry_mesh_filename = LaunchConfiguration('geometry_mesh_filename', default='')
      geometry_mesh_origin_xyz = LaunchConfiguration('geometry_mesh_origin_xyz', default='"0 0 0"')
      geometry_mesh_origin_rpy = LaunchConfiguration('geometry_mesh_origin_rpy', default='"0 0 0"')
      geometry_mesh_tcp_xyz = LaunchConfiguration('geometry_mesh_tcp_xyz', default='"0 0 0"')
      geometry_mesh_tcp_rpy = LaunchConfiguration('geometry_mesh_tcp_rpy', default='"0 0 0"')
      
      # xarm gazebo launch
      # xarm_gazebo/launch/_xarm_beside_table_gazebo.launch.py
      xarm_gazobo_launch = IncludeLaunchDescription(
          PythonLaunchDescriptionSource([ThisLaunchFileDir(), '/_xarm_beside_table_gazebo.launch.py']),
          launch_arguments={
              'prefix': prefix,
              'hw_ns': hw_ns,
              'limited': limited,
              'effort_control': effort_control,
              'velocity_control': velocity_control,
              'add_gripper': add_gripper,
              'add_vacuum_gripper': add_vacuum_gripper,
              'dof': '5',
              'add_other_geometry': add_other_geometry,
              'geometry_type': geometry_type,
              'geometry_mass': geometry_mass,
              'geometry_height': geometry_height,
              'geometry_radius': geometry_radius,
              'geometry_length': geometry_length,
              'geometry_width': geometry_width,
              'geometry_mesh_filename': geometry_mesh_filename,
              'geometry_mesh_origin_xyz': geometry_mesh_origin_xyz,
              'geometry_mesh_origin_rpy': geometry_mesh_origin_rpy,
              'geometry_mesh_tcp_xyz': geometry_mesh_tcp_xyz,
              'geometry_mesh_tcp_rpy': geometry_mesh_tcp_rpy,
          }.items(),
      )
  
      return LaunchDescription([
          xarm_gazobo_launch
      ])
  