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

Revision history [back]

click to hide/show revision 1
initial version

In response to your comment here, running multiple robots off of multiple joysticks is a different issue entirely, but luckily something you can do without source changes. (Note that the group namespace is the same as apply the same namespace to each node in the group, or remapping each topic and parameter to "ns/<topic>". If you have a launchfile that works for one joy instance, you can also <include> that file in each group instead.

  <group ns="js0">
      <node name="joy" pkg="joy" type="joy_node" output="screen">
        <param name="dev" value="/dev/input/js0"/>
      </node>

      <node name="$(anon teleop_twist_joy)" pkg="teleop_twist_joy" type="teleop_node">
        <rosparam command="load" file="$(find locus_joy)/config/joy.yaml"/>
      </node>
  </group>

  <group ns="js1">
      <node name="joy" pkg="joy" type="joy_node" output="screen">
        <param name="dev" value="/dev/input/js1"/>
      </node>

      <node name="$(anon teleop_twist_joy)" pkg="teleop_twist_joy" type="teleop_node">
        <rosparam command="load" file="$(find locus_joy)/config/joy.yaml"/>
      </node>
  </group>

If you wanted to run multiple robots off of a single joystick, you could stickto one joy node, but launch multiple teleop_twist_joy nodes with complimentary configurations and different cmd_vel remaps.