(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Getting Started with the mr_tools package

Description: Using the mr_teleoperator stack to connect to and display data from an Xbox/PS controller Keyboard and Mouse

Keywords: mr_teleoperation, mr_tools, teleoperation, Xbox controller, PS controller, Keyboard, Mouse

Tutorial Level: BEGINNER

Before starting this tutorial, please complete the installation as described in the ROS installation instructions. This tutorial assumes that Ubuntu 12.04 is being used.


Until the package is indexed in the ROS system, you can check out and install the code manually from the source control repository:

cd ../path_to/your_catkin_workspace/src/
git clone https://github.com/cogniteam/mr_teleoperator.git
cd ../path_to/your_catkin_workspace/

and don't forget to source the setup file: (in the root of your catkin workspace)

source devel/setup.bash


  1. Connect the controller (Xbox/PS) to USB port on your computer.
  2. Check to see on which port the controller has connected:

ls /dev/input
  • It should be either js1 or js0 (just reconnect it and you'll see a difference, see picture below).
  • Edit the corresponding parameter on the teleoperator.launch file as needed.


  <param name="dev" value="/dev/input/js0" />


(See mr_tools package for more details on the teleoperator.launch file)

View Data

  1. In the root of your catkin workspace, make sure you have sourced the setup file:

cd ../path_to/your_catkin_workspace/
source devel/setup.bash
  1. Run the mr_tools node (this will also automatically launch rqt):

roslaunch mr_tools teleoperator.launch
  1. Inside the newly opened rqt window, in the menu bar select Plugins->Multi-Robot teleoperator.

  2. Select an input method (joystick, keyboard or mouse) in the first drop-down list, the desired robot in the second drop-down and press "Add".

mr_tools data in rqt1

  1. Use rostopic echo to view the message data:

rostopic echo /pioneer_(number_you_chose)/cmd_vel
  1. Use the controllers' joystick and watch the values change accordingly.

mr_tools in usage with gazebo

Usage Example

For this example section, make sure to give this gazebo tutorial a look, also check out and install this simulator example package:

cd ../path_to/your_catkin_workspace/src/
git clone https://github.com/cogniteam/mrm_sim.git
cd ../path_to/your_catkin_workspace/

roslaunch mr_tools teleoperator.launch

and in a new terminal:

roslaunch mrm_sim mrm.launch

mr_tools data in rqt15

A better teleoperator

With a combination of another rqt plugin - http://wiki.ros.org/rqt_image_view, you can make a much more useful and comfortable teleoperator panel.

mr_tools data in rqt15

Wiki: mr_teleoperator/Tutorials/Getting Started (last edited 2013-12-17 09:54:03 by TommySM)