|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.|
TeleoperationDescription: Robot teleoperation from a joystick or a keyboard
Tutorial Level: INTERMEDIATE
Next Tutorial: Remote monitoring and control
To run the joystick teleop simply add to the robot launch file joystick:=true.
$ roslaunch robotican_armadillo armadillo.launch gazebo:=true joystick:=true
This command will run the armadillo simulation, and also run the joystick teleop.
By default, the joystick device is /dev/input/js0 but you can select different devices using the joystick_dev argument. For example:
$ roslaunch robotican_armadillo armadillo.launch gazebo:=true joystick:=true joystick_dev:=/dev/input/js1
The joystick can also be used for controlling different actuators of the robot, for example, the joystick can control the Armadillo robot pan-tilt system. The configuration file is located under the config folder of each robot. For example, the configuration file for the Armadillo robot is robotican/robotican_armadillo/config/joystick_teleop.yaml. And the following buttons assignment is:
and the configuration file, joystick_teleop.yaml will have the following parameters:
drive_joy_teleop_linear_axis: 3 drive_joy_teleop_angular_axis: 2 drive_joy_teleop_deadman_button: 7 drive_joy_teleop_linear_max_vel: 0.8 drive_joy_teleop_angular_max_vel: 2.5
To use the keyboard for teleoperation, use the rqt_robot_steering tool.