Kuavo Docs
Development InterfacesPython SDK Guide

SDK Introduction

Version License Supported Python Versions

The KUAVO Humanoid WebSocket SDK is a comprehensive Python SDK for controlling KUAVO humanoid robots. It provides interfaces for robot state management, arm and head control, and end-effector operation. It can transmit data over a local area network to control the robot, as long as the corresponding Python package is installed. The SDK is designed to simplify the complexity of robot control, enabling developers to quickly implement a variety of robot applications.

Note: This SDK currently supports ROS1 only; ROS2 is not supported yet.

image

Features

Robot State Management

  • IMU data: acceleration, angular velocity, euler angles
  • Joint/motor states: position, velocity, torque
  • Torso state: position, orientation, velocity
  • Odometry information
  • End-effector states:
    • Gripper (LejuClaw): position, velocity, torque, grasp status
    • Dexterous hand (QiangNao): position, velocity, torque
    • Touch Dexterous hand (QiangNao_Touch): position, velocity, torque, touch state
    • End-effector position and orientation
  • Motion states: stand, walk, step_control

Motion Control

  • Arm Control

    • Joint position control
    • End-effector 6D control via inverse kinematics
    • Forward kinematics (FK) for computing end-effector pose
    • Keyframe sequence control for complex motions
  • End-effector Control

    • Gripper control (position control with configurable velocity and torque)
    • Dexterous hand control
      • Position control
      • Pre-defined hand gestures (OK, 666, fist, etc.)
  • Head Control

    • Position control
  • Dynamic Motion Control

    • Stance
    • Walking (xy and yaw velocity control)
    • Stepping (gait switching)

Robot Basic Information

  • Robot type: kuavo
  • Robot version
  • End-effector type
  • Joint names
  • Total degrees of freedom: 28
  • Arm degrees of freedom: 7 per arm
  • Head degrees of freedom: 2
  • Leg degrees of freedom: 12

Installation

Tip: There are currently two versions of this SDK, the official release version and the beta version. Their differences are:

  • Official release version: the stable version, corresponding to the features provided by the master branch of kuavo-ros-opensource,
  • Beta version: this version is more aggressive than the official version and also provides richer features, corresponding to the features provided by the beta branch of kuavo-ros-opensource.

Friendly reminder: Be sure to confirm which version you need to install. If your SDK version does not match kuavo-ros-opensource, some features may be unavailable and errors may occur.

To install the official Kuavo Humanoid SDK that matches kuavo-ros-opensource, use pip:

# If your kuavo-ros-opensource code version is 1.2.1, run
pip install kuavo-humanoid-sdk-ws==1.2.1 
# If it is another version, replace it with your actual version

To install the latest official Kuavo Humanoid SDK, use pip:

pip install kuavo-humanoid-sdk-ws

To install the latest beta Kuavo Humanoid SDK, use pip:

pip install --pre kuavo-humanoid-sdk-ws

For local development installation (editable mode), use:

cd src/kuavo_humanoid_websocket_sdk
chmod +x install.sh
./install.sh

Note (when the lower-level controller repository version is 1.3.0): Before using the WebSocket SDK, you need to make the following configuration in the lower-level controller repository:

  1. Find and edit the following file in the lower-level controller repository: src/humanoid-control/humanoid_controllers/launch/load_kuavo_real.launch
  2. Make sure the parameter in it is set to:
    <arg name="with_mm_ik" default="true"/>
  3. If it reports that /websocket_sdk_srv/get_robot.launch_status is missing, you need to launch:
    roslaunch h12pro_controller_node kuavo_humanoid_sdk_ws_srv.launch

Upgrade Instructions

Before upgrading, you can run the following command to check the currently installed version:

# Note whether the versions in the home directory and the root directory are consistent. Both can be run; the SDK version in the directory you run from takes precedence.
pip show kuavo-humanoid-sdk-ws
# Output:
Name: kuavo-humanoid-sdk-ws
Version: 0.1.2
...

Tip: If your version number contains the letter b, it is a beta version, for example Version: 0.1.2b113

If you are currently on the official version, upgrade to the latest official version:

pip install --upgrade kuavo-humanoid-sdk-ws

If you are currently on the beta version, upgrade to the latest official version:

pip install --upgrade --force-reinstall kuavo-humanoid-sdk-ws
# Or
pip uninstall kuavo-humanoid-sdk-ws && pip install kuavo-humanoid-sdk-ws

If you are currently on the official or beta version, upgrade to the latest beta version:

pip install --upgrade --pre kuavo-humanoid-sdk-ws

Quick Start

Before running any code, make sure the robot is launched using one of the following commands:

  • For simulation:

    roslaunch humanoid_controllers load_kuavo_mujoco_sim.launch
  • For a real robot:

    roslaunch humanoid_controllers load_kuavo_real.launch
  • Start the WebSocket server (if using WebSocket communication): For detailed instructions, refer to WebSocket Communication

Documentation

The documentation is available in two formats:

  • HTML format: must be generated by running a script.
  • Markdown format: view directly.

Generate the documentation:

cd /home/lab/kuavo-ros-opensource/src/kuavo_humanoid_websocket_sdk
chmod +x gen_docs.sh
./gen_docs.sh

Examples

Before running any code example, make sure the robot is launched.

Example code links:

License

This project is licensed under the MIT License — see the LICENSE file for details.

Contact & Support