/unitreepy

the interface to unitree legged sdk

Primary LanguageC++MIT LicenseMIT

UnitreePy

UnitreePy is a lightweight python package that facilitate low and high level control of unitree quadruped robots. The package provide minimal easy to use interface to unitree legged SDK as well as several technical features, such as forward kinematics, setting down motion and etc.

The project consist of following parts:

  • The Legged SDK Interface: The interface to C++ legged sdk library to send both high and low level commands and receive respective replies. This is done by modifying pybindings from the motion imitation project
  • The Parsers: Are used to parse the robots and wireless remote states to intuitive python structures
  • The Robot Handler: Provide the object that can be used to generate commands based on desired robot behavior i.e desired torques, positions in joints etc. Update the actual state of the robot and initialize the specific While being bind to the chosen interface will send and receive messages with predefined update rate.

Installing the package

First you need to build the python interface to unitree legged sdk from unitreepy/unitree_legged_sdk/

mkdir build
cd build
cmake ../
make

To do so the following dependencies should be met:

  • Boost (version 1.5.4 or higher)
  • CMake (version 2.8.3 or higher)
  • LCM (version 1.4.0 or higher)

Then copy the resulting .so file to the root of repository and install the package with

python -m pip install -e .

The Legged SDK Interface

You may use this package to interface directly with Legged SDK without any additional parsers. For details please follow the short documentation and examples in examples/legged_sdk/ directory.