<?xml version="1.0"?>
<launch>
  <arg name="namespace" default="fanuc_1"/>
  
  <group ns="$(arg namespace)">

    <arg name="robot_type" default="CRX-10iA"/>
    <arg name="license" default="$(env FANUC_LICENSE)"/>
    <arg name="create_license" default="false"/>
    <arg name="fast_joints_hz" default="false"/>  
    <arg name="output" default="screen"/>
    <rosparam ns="interface" command="load" file="$(find fanuc_msg_translator)/config/params_fanuc_1.yaml"/>
  
    <node pkg="fanuc_ros_driver" name="interface" type="fanuc_interface_node" output="$(arg output)">
      <param name="robot_type" value="$(arg robot_type)" type="str"/>
      <param name="license_path" value="$(arg license)" type="str"/>
      <param name="create_license" value="$(arg create_license)" type="bool"/>
      <param name="fast_joints_hz" value="$(arg fast_joints_hz)" type="bool"/>
    </node>
 


  
    <node pkg="fanuc_msg_translator" type="fanuc_trajectory_converter_node.py" name="trajectory_converter" output="screen" />

  
    <node pkg="fanuc_msg_translator" type="fanuc_payload_converter_node.py" name="payload_converter"  output="screen" />

     
    <node pkg="fanuc_msg_translator" type="fanuc_robot_status_converter_node.py" name="robot_status_converter" output="screen"/>



    <!-- The name of the parameter under which the URDF is loaded -->
    <arg name="robot_description" default="robot_description"/>



    <!-- Load universal robot description format (URDF) -->
    <param if="true" name="$(arg robot_description)" command="xacro --inorder  '$(find crx_description)/robots/crx10ia.xacro'"/>

    <!-- The semantic description that corresponds to the URDF -->
    <param name="$(arg robot_description)_semantic" textfile="$(find crx10ia_moveit_config)/config/crx10ia.srdf" />

    <!-- Load updated joint limits (override information from URDF) -->
    <group ns="$(arg robot_description)_planning">
      <rosparam command="load" file="$(find crx10ia_moveit_config)/config/joint_limits.yaml"/>
    </group>

    <!-- Load default settings for kinematics; these settings are overridden by settings in a node's namespace -->
    <group ns="$(arg robot_description)_kinematics">
      <rosparam command="load" file="$(find crx10ia_moveit_config)/config/kinematics.yaml"/>
    </group>

    <param name="tf_prefix" value="$(arg namespace)" />

    <node pkg="robot_state_publisher" type="robot_state_publisher" name="rob_st_pub" />

    <node pkg="tf" type="static_transform_publisher" name="stf_pub" args="0 -1 0 0 0 0 /map /$(arg namespace)/base_link 10" />
  
  

  </group>
</launch>
