<?xml version="1.0"?>

<launch>
  <arg name="joy_config"           default="elecom_joy"/>
  <arg name="joy_dev"              default="/dev/input/js0"/>
  <arg name="cmd_vel"              default="/cmd_vel"/>
  
  
  <!-- Node for joystick operation -->
  <node pkg="joy" type="joy_node" name="joy_node">
    <param name="dev"             value="$(arg joy_dev)"/>
    <param name="deadzone"        value="0.3"/>
    <param name="autorepeat_rate" value="20"/>
  </node>
  

  <!-- Node for joystick operation of a differential two-wheeled robot -->
  <node pkg="teleop_twist_joy" name="teleop_twist_joy" type="teleop_node">
    <rosparam command="load" file="$(find tsukuba2022)/config/$(arg joy_config).yaml"/>
    <remap from="cmd_vel"    to="$(arg cmd_vel)"/>
  </node>
  
</launch>

