Robot Client API
1. Typical Usage: The RobotClient
RobotClientimport time
from stretch4_body.robot.robot_client import RobotClient
# Using a context manager ensures stop() is called automatically
with RobotClient() as robot:
# Check if the robot needs to be homed
if not robot.is_homed():
robot.home()
print("Robot is ready!")2. Accessing Subsystems
Example: Commanding Subsystems
3. The User Control Loop Design Pattern
Rate Expectations
Example: Reactive Control Loop
4. The Status Dictionary Structure
Common Subsystem Status Keys
Example: Working with Status Dictionaries
Direct Subsystem Status Access
5. Blocking vs. Non-Blocking Calls
Non-Blocking Calls (Asynchronous)
Blocking Calls (Synchronous)
Example: Waiting for Motion
6. Remote Clients
Example: Remote Connection
7. Architecture Visualization
Summary for AI Agents
Last updated
Was this helpful?
