Control System
Intermediate RoboticsIntro Python plus classes, NumPy arrays, sensor data, physical units, and supervised robot use.
Before you start
- Complete Robot Module
- Understand meters per second and radians per second
- Have an instructor present for every motion run
Use Robot from gather_sdk for all Python control projects. It owns the controller connection, presents clear safety state, validates speed limits, and guarantees best-effort shutdown.
Public Control Interface
from gather_sdk import RobotThe control methods are:
| Method | Purpose |
|---|---|
safety_status() | Read E-stop, motor, and service-button state |
enable_motors() | Enable output only when the E-stop circuit is OK |
drive(linear_mps, angular_rps) | Send an in-range supervised velocity |
stop() | Command zero linear and angular velocity |
disable_motors() | Stop and disable motor output |
close() | Stop, disable, and close camera/controller devices |
Opening Robot connects to the camera and controller but never enables motor output.
Safety State
from gather_sdk import Robot
with Robot() as robot:
status = robot.safety_status()
print("E-stop circuit healthy:", status.estop_ok)
print("Motors enabled:", status.motors_enabled)status.estop_ok=True means the E-stop circuit reports healthy. A false or unreadable safety state blocks motion.
Supervised Motion Pattern
Do not run this example until an instructor confirms the area, speed, and physical E-stop.
import time
from gather_sdk import Robot
with Robot() as robot:
robot.enable_motors()
try:
robot.drive(linear_mps=0.10, angular_rps=0.0)
time.sleep(1.0)
robot.stop()
finally:
robot.disable_motors()The default limits are 0.25 m/s linear and 0.75 rad/s angular. Commands outside the configured limits raise an error.
Control Rules
- Read safety state before enabling motion.
- Begin below the configured speed limits.
- Keep the physical E-stop reachable.
- Stop and disable in
finallyor a context manager. - Do not bypass
SafetyErroror edit controller/network configuration.