Python API
The Dropbear Python API provides a high-level interface for controlling the robot, reading sensors, and deploying learned behaviors — without writing ROS 2 boilerplate. It's designed for researchers, builders, and anyone who wants to get a Dropbear doing things fast.
Installation
pip install dropbear-sdk
# Or install from source
git clone https://github.com/Hyperspawn/Dropbear.git
cd Dropbear
pip install -e ".[dev]"Quick Start
Connect to a running Dropbear (real or simulated) and send your first command:
from dropbear import Robot
# Connect to the robot (auto-discovers via ROS 2)
robot = Robot()
# Read current joint positions
joints = robot.get_joint_positions()
print(f"Current joints: {joints}")
# Command the robot to stand
robot.stand()
# Move the right arm to a target pose
robot.move_arm("right", position=[0.4, -0.2, 0.8], orientation="forward")
# Walk forward 1 meter
robot.walk(distance=1.0, speed=0.3)Core API: Robot Class
The Robot class is the primary interface. It wraps ROS 2 communication and provides synchronous methods.
| Method | Description | Returns |
|---|---|---|
| Robot() | Initialize and connect to the robot | Robot instance |
| get_joint_positions() | Current position of all 32 joints (radians) | dict[str, float] |
| get_imu() | IMU readings — orientation, angular velocity, acceleration | IMUReading |
| stand() | Command the robot to stand from any position | bool |
| walk(distance, speed) | Walk forward a given distance at a given speed | bool |
| move_arm(side, position, orientation) | Move an arm to a target Cartesian pose | bool |
| move_head(pitch, yaw) | Point the head to look at a direction | bool |
| deploy_skill(name) | Deploy a skill from the Hyperspawn marketplace | SkillHandle |
Sensor Access
# Camera stream
frame = robot.get_camera("head") # Returns numpy array (H, W, 3)
# Force/torque sensors (feet)
left_ft = robot.get_foot_force("left")
right_ft = robot.get_foot_force("right")
# Battery status
battery = robot.get_battery()
print(f"Battery: {battery.percentage}% ({battery.voltage}V)")Skills Integration
Deploy learned behaviors directly from the Hyperspawn Skills Marketplace:
# List available skills
skills = robot.list_skills()
# Deploy a walking policy trained in Isaac Lab
handle = robot.deploy_skill("bipedal-walk-v2")
handle.start()
# Monitor execution
while handle.running:
print(f"Status: {handle.status}")
time.sleep(1)
handle.stop()📦 API Status
The Python API is under active development. The interface shown here reflects the target design. Some methods may change as the platform matures. Check the GitHub repo for the latest version.