Remote Control

The following describes how to control the Pegasus Mini by using the ROS teleop_twist_keyboard package. See http://wiki.ros.org/teleop_twist_keyboard for full documentation. Ensure that all steps in the Getting Started with ROS have been completed.

This package takes keyboard inputs and publishes command velocity to the /cmd_vel ROS topic. The pegasus_base node subscribes to these command velocity’s and publishes left and right wheel speed commands to the /wheelspeed topic. Finally the rc_node node subscribes to these wheel speed commands to sends them to the motor controller.

  1. Ensure that the ROS teleop_twist_keyboard package is installed. To do this, run the following command.

sudo apt-get install ros-melodic-teleop-twist-keyboard
  1. Run the Pegasus Base package by running the following command.

roslaunch pegasus_base pegasus_base.launch
  1. Launch the ROS teleop_twist_keyboard package in a separate terminal.

rosrun teleop_twist_keyboard teleop_twist_keyboard.py
  1. Follow the following on-screen commands to control the Pegasus-Mini.

Reading from the keyboard  and Publishing to Twist!
---------------------------
Moving around:
u    i    o
j    k    l
m    ,    .

q/z : increase/decrease max speeds by 10%
w/x : increase/decrease only linear speed by 10%
e/c : increase/decrease only angular speed by 10%
anything else : stop

CTRL-C to quit