Joystick Info

Setup

  1. Run:
    git pull
    sudo apt-get install joystick
    
  2. Add to end of /opt/ros/electric/ros/rosdep.yaml.
    joystick:
      ubuntu: joystick
      debian: joystick
    
    • If you get errors. Sudo it.
  3. Follow http://www.ros.org/wiki/joy/Tutorials/ConfiguringALinuxJoystick

Running with joystick control

roscore
roslaunch mikrokopter mikrokopter.launch
rosrun joy joy_node
rosrun mikrokopter joystick_control

Axes in Linux:

Range:
[-32767, 32767]

Mappings:
Positive 0 axis - Right
Negative 0 axis - Left
Positive 1 axis - Towards you (Back)
Negative 1 axis - Away from you (Forward)
Positive 2 axis - Clockwise Rotation
Negative 2 axis - CounterClockWise Rotation
Positve 3 axis - Throttle all the way down
(3 axis 0 is center)
Negative 3 axis - Throttle all the way up
Axis 4 - -32767 = left, 32767 = right
Axis 5 - -32767 = up, 32767 = down

Buttons

Range: 0-11
Values: on or off

Buttons are labeled.

Axes in Joystick(ROS)

Range [-1, 1]

Mappings:

0 - left = positive, right = negative
1 - forward = positive backward = negative
2 - CW = negative, CCW = positive
3 - Throttle down = negative, Throttle up = positive
4 - left = 1, right = -1
5 - up = 1, down = -1

Buttons in Joystick(ROS)

Range: 0-11
Values: 1 or 0

Buttons are labeled.