Python SDK for AlphaDog robotic dog control.
pip install robodog- Ensure your computer is on the same network as the robotic dog
- Note the IP address of the robotic dog (default: 10.10.10.10)
from robodog import Dog
import time
with Dog() as dog:
# Adjust standing height
dog.body_height = 0.25
time.sleep(2)
# Restore default height
dog.set_parameters({'body_height': 0.23})The SDK provides comprehensive parameter control capabilities:
dog.vx = 0.2 # Forward velocity (-1.0 to 1.0)
dog.vy = 0.1 # Lateral velocity (-1.0 to 1.0)
dog.wz = 0.1 # Rotational velocity (-1.0 to 1.0)dog.roll = 0.1 # Roll angle (-0.5 to 0.5)
dog.pitch = 0.1 # Pitch angle (-0.5 to 0.5)
dog.yaw = 0.1 # Yaw angle (-0.5 to 0.5)
dog.body_height = 0.25 # Body height (0.1 to 0.35)dog.foot_height = 0.08 # Foot lift height (0.0 to 0.15)
dog.swing_duration = 0.3 # Swing period (0.1 to 1.0)
dog.friction = 0.6 # Friction coefficient (0.1 to 1.0)Combined parameter settings:
# Set gait parameters
dog.set_gait_params(
friction=0.6, # Friction coefficient
scale_x=1.2, # Support surface X scaling
scale_y=1.0 # Support surface Y scaling
)
# Set motion parameters
dog.set_motion_params(
swaying_duration=2.0, # Swaying period
jump_distance=0.3, # Jump distance
jump_angle=0.1 # Jump rotation angle
)
# Set control parameters
dog.set_control_params(
velocity_decay=0.8, # Velocity decay
collision_protect=1, # Collision protection
decelerate_time=2.0, # Deceleration delay
decelerate_duration=1.0 # Deceleration duration
)Check out examples for a complete demonstration including:
- Basic motion control demo
- Advanced motion parameter adjustment
- Complete parameter configuration showcase
- User mode switching demonstration
Running the example:
python examples/demo_basic_movement.pyIssues and pull requests are welcome. For major changes, please open an issue first to discuss proposed changes.
This project is licensed under the MIT License - see the LICENSE file for details.
For questions or suggestions:
- Submit GitHub Issues
- Email: towardsrwby@gmail.com