Skip to content

Keyboard Control

With airbot_py package installed and the driver server running, you can control the robot arm using keyboard inputs. This is particularly useful for testing and demonstration purposes.

Run with the following command:

arm_kbd_ctrl
# Or,
python3 -m airbot_examples.task_kbd_ctrl

This manual explains the key mappings for controlling the robot arm using the keyboard. Each key corresponds to a specific action or mode for controlling the robot.

1. Key Mappings

1.1 General Controls

Key Action
Enter Toggle between SLOW and DEFAULT speed profiles.
Space Toggle between SERVO_JOINT_VEL and SERVO_CART_TWIST modes.
Tab Switch to PLANNING_POS mode and move robot to the starting position.
[ Close the gripper.
] Open the gripper.
z Exit the program.

1.2 Joint Velocity Control

When in SERVO_JOINT_VEL mode, the following keys control the robot's joint velocities:

Key Action
1 Move the joint #1 forward (+speed).
2 Move the joint #1 backward (-speed).
3 Move the joint #2 forward (+speed).
4 Move the joint #2 backward (-speed).
5 Move the joint #3 forward (+speed).
6 Move the joint #3 backward (-speed).
7 Move the joint #4 forward (+speed).
8 Move the joint #4 backward (-speed).
9 Move the joint #5 forward (+speed).
0 Move the joint #5 backward (-speed).
- Move the joint #6 forward (+speed).
= Move the joint #6 backward (-speed).

1.3 Cartesian Twist Control

When in SERVO_CART_TWIST mode, the following keys control the robot's movement in Cartesian space:

Key Action
a Move the robot arm left along the Y-axis (+speed).
d Move the robot arm right along the Y-axis (-speed).
w Move the robot arm forward along the X-axis (+speed).
s Move the robot arm backward along the X-axis (-speed).
q Move the robot arm up along the Z-axis (+speed).
e Move the robot arm down along the Z-axis (-speed).
o Move the robot arm right along the X-axis (+speed).
u Move the robot arm left along the X-axis (-speed).
i Move the robot arm up along the Y-axis (+speed).
k Move the robot arm down along the Y-axis (-speed).
j Move the robot arm towards the user along the Z-axis (+speed).
l Move the robot arm away from the user along the Z-axis (-speed).

2. Notes

  • Ensure there are no obstacles around the robot before starting the control process.
  • The robot arm can be stopped at any time by pressing Ctrl+C.