Deploy Robot Teleop Using a Keyboard#
Use this software reference to validate robot motor control with a keyboard before deploying autonomous applications.
Prerequisites#
First, complete the Getting Started guide.
Hardware Prerequisites#
You have a robot and a keyboard or an SSH/VNC connection to the robot.
Example for the AAEON UP Xtreme i11 Robotic Development Kit#
Connect to your robot through SSH or VNC, or use direct access. For direct access, connect a monitor and keyboard to the robot’s compute system.
Set up your system by following the steps in the Getting Started guide.
Ensure the
ros2-amr-interfaceDebian package is installed:sudo apt update sudo apt install ros-jazzy-aaeon-ros2-amr-interface
sudo apt update sudo apt install ros-humble-aaeon-ros2-amr-interface
Open a terminal on the robot or establish a new SSH connection to start the control node.
Check the motor controller device name:
sudo dmesg | grep ttyUSB
The output includes the
ch341-uartdevice, which provides the interface to the motor controller board. For example:[1452443.462213] usb 1-9: ch341-uart converter now attached to ttyUSB0 [1452444.061111] ch341-uart ttyUSB0: ch341-uart converter now disconnected from ttyUSB0
Ensure the AAEON node configuration file sets
port_nameto the correct USB device:vi /opt/ros/jazzy/share/ros2_amr_interface/params/aaeon_node_params.yamlvi /opt/ros/humble/share/ros2_amr_interface/params/aaeon_node_params.yamlStart the motor control node:
AAEON_NODE_CONFIG_FILE=/opt/ros/jazzy/share/ros2_amr_interface/params/aaeon_node_params.yaml # Launch the AAEON Robot Motor Board Interface ros2 run ros2_amr_interface amr_interface_node --ros-args \ --params-file $AAEON_NODE_CONFIG_FILE \ --remap /amr/cmd_vel:=/cmd_vel \ --remap /amr/battery:=/sensors/battery_state
AAEON_NODE_CONFIG_FILE=/opt/ros/humble/share/ros2_amr_interface/params/aaeon_node_params.yaml # Launch the AAEON Robot Motor Board Interface ros2 run ros2_amr_interface amr_interface_node --ros-args \ --params-file $AAEON_NODE_CONFIG_FILE \ --remap /amr/cmd_vel:=/cmd_vel \ --remap /amr/battery:=/sensors/battery_state
[Only for Robot Operating System (ROS) Jazzy] Install the required package if it is not already installed:
sudo apt-get install ros-jazzy-teleop-twist-keyboard
On another terminal or new SSH connection, start the teleop keyboard:
ros2 run teleop_twist_keyboard teleop_twist_keyboard
TURTLEBOT3_MODEL=aaeon ros2 run turtlebot3_teleop teleop_keyboard
When the node starts, it displays the available keyboard commands for controlling the robot. The commands depend on the selected robot model.
Troubleshooting#
You can stop the demo at any time by pressing Ctrl+C.
For general robot issues, see the troubleshooting guide.