<launch>
  <arg name="joy_vel_in"  default="input_joy/cmd_vel"/>
  <arg name="joy_vel_out" default="joy_vel"/>

  <arg name="cmd_vel_out" default="twist_mux/cmd_vel"/>

  <arg name="config_locks"  default="$(find twist_mux)/config/twist_mux_locks.yaml"/>
  <arg name="config_topics" default="$(find cps_rmp220_support)/config/twist_mux_topics.yaml"/>

  <arg name="config_joy" default="$(find cps_rmp220_support)/config/joystick.yaml"/>

  <node pkg="twist_mux" type="twist_mux" name="twist_mux" output="screen">
    <remap from="cmd_vel_out" to="$(arg cmd_vel_out)"/>

    <rosparam file="$(arg config_locks)"  command="load"/>
    <rosparam file="$(arg config_topics)" command="load"/>
  </node>

  <node pkg="twist_mux" type="twist_marker" name="twist_marker">
    <remap from="twist"  to="$(arg cmd_vel_out)"/>
    <remap from="marker" to="twist_marker"/>
  </node>

  <node pkg="twist_mux" type="joystick_relay.py" name="joystick_relay" output="screen">
    <remap from="joy_vel_in"  to="$(arg joy_vel_in)"/>
    <remap from="joy_vel_out" to="$(arg joy_vel_out)"/>

    <rosparam file="$(arg config_joy)" command="load"/>
  </node>
</launch>
