Dashboard (web/hand_web.py) - Record/replay panel driving g1_record_replay.py as a pty child: take library (replay/download/duplicate/rename/delete/upload/delete-all), pause & resume, and in-take key buttons that grey out in the --fingers modes the recorder ignores (measured: in touch mode the keys change nothing at all). - /api/restart is container-aware: it kills inspire_g1 and lets the supervisor relaunch it. It used to run manage.sh, which started a SECOND inspire_g1 beside the supervised one - two writers on one RS-485 bus - and never returned. - Shape/combo libraries take a .bak on every write, with an undo button. Both files are rewritten in full, so deleting the last entry was unrecoverable. recorder/ - The recorder lives in this project now: one source of truth for the CLI and the dashboard, with pause/resume added to replay. - record.sh picks a runtime by itself (a python with the SDK, the vendored SDK, or the inspire-hand container). bundle.sh packs a ~340KB portable kit. tools/ - preflight.sh: read-only readiness report for a new robot (hardware, docker, build prerequisites, per-robot settings) ending in an install-path verdict. - fetch_deps.sh: stage build dependencies, verifying the libs are aarch64. - export_ui.py: regenerate an embedding app's vendored copy of the UI. docker/ - build_image.sh resolves its dependencies from several layouts: deps/ inside the project, /usr/local, a source install prefix, or a ROS2 colcon workspace (where the idl headers live when /usr/local has none). - web/ is copied in the last layer, so dashboard edits skip the C++ rebuild. - restart=always, and start.sh always builds so an edit cannot silently run a stale image. deps/unitree_sdk2 is vendored so a robot that has never seen the SDK can build. Docs: README quickstart + embedding notes, SETUP_G1 corrected (that udev rule stopped creating /dev/inspire_* symlinks a while ago), ROBOT_README describing a live install.
1.4 KiB
1.4 KiB
unitree_sdk2
Unitree robot sdk version 2.
Prebuild environment
- OS (Ubuntu 20.04 LTS)
- CPU (aarch64 and x86_64)
- Compiler (gcc version 9.4.0)
Environment Setup
Before building or running the SDK, ensure the following dependencies are installed:
- CMake (version 3.10 or higher)
- GCC (version 9.4.0)
- Make
You can install the required packages on Ubuntu 20.04 with:
apt-get update
apt-get install -y cmake g++ build-essential libyaml-cpp-dev libeigen3-dev libboost-all-dev libspdlog-dev libfmt-dev
Build examples
To build the examples inside this repository:
mkdir build
cd build
cmake ..
make
Installation
To build your own application with the SDK, you can install the unitree_sdk2 to your system directory:
mkdir build
cd build
cmake ..
sudo make install
Or install unitree_sdk2 to a specified directory:
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/opt/unitree_robotics
sudo make install
You can refer to example/cmake_sample on how to import the unitree_sdk2 into your CMake project.
Note that if you install the library to other places other than /opt/unitree_robotics, you need to make sure the path is added to "${CMAKE_PREFIX_PATH}" so that cmake can find it with "find_package()".
Notice
For more reference information, please go to Unitree Document Center.