ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

OK, I appear to have figured this out. Here's my launch file:

<launch>
  <group ns="ns1">
    <include file="$(find falkor_quadrotor_teleop)/launch/ps3_gamepad.launch">
      <arg name="joy_dev" value="/dev/input/js1" />
    </include>
  </group>
  <group ns="ns2">
    <include file="$(find falkor_quadrotor_teleop)/launch/ps3_gamepad.launch">
      <arg name="joy_dev" value="/dev/input/js2" />
    </include>
  </group>
</launch>

And here's my ps3_gamepad.launch file

<?xml version="1.0"?>

<launch>
  <arg name="joy_dev" />

  <node name="joy_node" pkg="joy" type="joy_node" output="screen">
    <param name="dev" value="$(arg joy_dev)" />
  </node>
  <!-- Note that axis IDs are those from the joystick message plus one, to be able to invert axes by specifiying either positive or negative axis numbers.-->
  <!-- Axis 2 from joy message thus has to be set as '3' or '-3'(inverted mode) below-->
  <node name="quadrotor_teleop" pkg="hector_quadrotor_teleop" type="quadrotor_teleop">
    <param name="x_axis" value="2"/>
    <param name="y_axis" value="1"/>
    <param name="z_axis" value="4"/>
    <param name="yaw_axis" value="3"/>
    <param name="x_velocity_max" value="5"/>
    <param name="y_velocity_max" value="5"/>
    <param name="z_velocity_max" value="5"/>
  </node>