Controlling the Arm with a Keyboard
This example creates an interface for controlling the arm with your keyboard. The example initializes the SDK to talk to robot and takes keyboard inputs to send cylindrical and angular hand velocity commands.
Understanding Spot Programming
For your best learning experience, please use the Quickstart Guide found in the SDK’s docs/python directory. That will help you get your Python programming environment set up properly.
Use the keyboard interface to release the e-stop [SPACE] and power [P] the robot before sending hand commands. No need launch a separate software e-stop.
Make sure the Motor Enable button on the Spot rear panel is depressed.
Make sure Spot is sitting upright, with the battery compartment on the side closest the floor.
This example requires the bosdyn API and client to be installed, and must be run using python3. Using pip, these dependencies can be installed using:
python3 -m pip install -r requirements.txt
Running the Example
python3 arm_wasd.py ROBOT_IP
When run, this example will create an interface in your terminal listing the controls which are as follows:
|X-axis Rotation Control
|Y-axis Rotation Control
|Z-axis Rotation Control
|Motor power & Control