Kuavo Docs
Common Tools

Kuavo Robot Startup Script User Guide

This document describes how to use the startup scripts of the Kuavo humanoid robot system, including the interactive startup interface, system configuration tools, and hardware detection features.

Overview

The Kuavo robot system provides two main deployment methods:

  1. Source deployment: Clone the source code directly from the Git repository for development
  2. .deb package deployment: Install from a prebuilt Debian package

This document is intended primarily for users of .deb package deployment and explains how to use the system-provided leju command to manage the Kuavo robot.

Advantages of .deb Package Deployment

  • Simplified installation: One-click installation with no manual environment setup
  • Version management: Clear version control and dependency management
  • System integration: Seamless integration with the system package manager
  • Automatic updates: Supports the apt system update mechanism
  • Standardization: Complies with Debian package management standards
  • Completeness: Includes the complete workspace and startup scripts

System Requirements

  • Operating system: Ubuntu 20.04
  • User permissions: Must be run with root privileges
  • Workspace: /opt/ros/leju (installed automatically by the .deb package)
  • Robot version: The ROBOT_VERSION environment variable must be set

Installation and Preparation

1. Installing the .deb Package

wget https://kuavo.lejurobot.com/packages/ros-leju-workspace_latest.deb && sudo dpkg -i ros-leju-workspace_latest.deb && sudo apt-get install -f -y

Method 2: Install a specific version

Replace ${VERSION} with the actual version number (for example, v1.2.3):

wget https://kuavo.lejurobot.com/packages/ros-leju-workspace_${VERSION}.deb && sudo dpkg -i ros-leju-workspace_${VERSION}.deb && sudo apt-get install -f -y

Method 3: Install a development build

Replace ${VERSION} and ${BRANCH} with the actual values (for example, v1.2.3 and dev):

wget https://kuavo.lejurobot.com/packages/ros-leju-workspace_${VERSION}-${BRANCH}.deb && sudo dpkg -i ros-leju-workspace_${VERSION}-${BRANCH}.deb && sudo apt-get install -f -y

Version Naming Rules

  • Stable release (master branch): ros-leju-workspace_${VERSION}.deb

    • For example: ros-leju-workspace_v1.2.3.deb
    • Latest version link: ros-leju-workspace_latest.deb
  • Development build (other branches): ros-leju-workspace_${VERSION}-${BRANCH}.deb

    • For example: ros-leju-workspace_v1.2.3-dev.deb
    • For example: ros-leju-workspace_v1.2.3-opensource.deb

After installation, the system automatically:

  • Installs the workspace to /opt/ros/leju
  • Copies the startup script to /usr/bin/leju
  • Sets the necessary permissions

2. Verifying the Installation

Verify that the .deb package was installed successfully:

# 检查工作空间
ls -la /opt/ros/leju

# 检查启动脚本
which leju

# 检查脚本权限
ls -la /usr/bin/leju

Using the Startup Script

Basic Startup

After installing with the .deb package, you can start it directly with the leju command:

# 以 root 权限运行
sudo su
leju 

Source Deployment Users

If you are using source deployment, you can start it as follows:

# 进入脚本目录
cd ~/kuavo-ros-opensource

# 以 root 权限运行
sudo ./scripts/leju_start.sh

After starting the script, you will see the following main menu:

==========================================
      Kuavo机器人启动系统
==========================================
当前机器人版本: 49

请选择启动方式:
1) 启动仿真机器人
2) 启动实物机器人
3) 系统配置工具
4) 硬件检测工具
5) 查看环境信息
6) 退出

Feature Details

1. Starting the Simulated Robot

After selecting option 1, you can further choose the simulation environment:

==========================================
      仿真机器人选择
==========================================
请选择仿真环境:
1) Mujoco仿真 (推荐)
2) Gazebo仿真
3) 返回主菜单
  • Mujoco simulation: High-fidelity physics simulation, recommended for development and testing
  • Gazebo simulation: Standard ROS simulation environment that supports a variety of sensor models

2. Starting the Physical Robot

After selecting option 2, first choose the startup mode:

==========================================
      实物机器人启动
==========================================
请选择启动模式:
1) 正常模式
2) 校准模式 (cali:=true)
3) 返回主菜单

The system then prompts you to choose the controller type:

==========================================
      操控器选择
==========================================
请选择操控器类型:
1) 北通阿修罗2 (bt2)
2) H12pro 遥控器 (h12)
3) 无操控器 (none)
4) 返回上级菜单

Startup Mode Description

  • Normal mode: Standard robot operation mode
  • Calibration mode: Used for robot zero-point calibration and maintenance

Controller Description

  • BETOP Asura 2 (bt2):

    • Letter buttons switch gaits: A(STANCE), B(TROT), X(JUMP), Y(WALK)
    • Left stick: forward/backward and left/right control
    • Right stick: turning control
    • Start button: switches from the suspended preparation phase to standing
  • H12pro remote controller (h12):

    • Left stick: forward/backward and left/right control
    • Right stick: turning control
    • Start switch: switches to the standing state
    • Left-side switch: terminates the program
  • No controller (none): The controller node is not started; suitable for other control methods

3. System Configuration Tool

After selecting option 3, you can access the system configuration features:

==========================================
      系统配置工具
==========================================
请选择配置工具:
1) Kuavo系统自动配置脚本
2) 返回主菜单

The system configuration script includes:

  • PIP mirror source configuration
  • Code repository cloning
  • Robot version setup
  • Robot weight configuration
  • Driver board type configuration
  • Arm motor configuration
  • End effector configuration
  • VR dependency installation
  • Project compilation
  • Network configuration

4. Hardware Detection Tool

After selecting option 4, you can run hardware detection:

==========================================
      硬件检测工具
==========================================
请选择检测工具:
1) 硬件检测和配置工具
2) 返回主菜单

The hardware detection tool provides:

  • USB device detection
  • IMU status check
  • Motor communication test
  • Sensor calibration
  • System resource monitoring

5. Environment Information

Selecting option 5 displays the current system environment information:

  • Workspace directory
  • Robot version
  • User permissions
  • Build status
  • Robot mass configuration
  • Calibration file status

Troubleshooting

.deb Package Installation Issues

Problem: Failed to download the .deb package

Solution:

# 检查网络连接
ping kuavo.lejurobot.com

# 联系技术支持获取备用下载地址

Problem: .deb package installation fails

dpkg: error processing package ros-leju-workspace (--install):
 dependency problems - leaving unconfigured

Solution:

# 修复依赖问题
sudo apt-get install -f

# 如果仍有问题,手动安装依赖
sudo apt-get install -y ros-noetic-catkin ros-noetic-rosbash

Permission Errors

ERROR: 此脚本必须使用 root 权限运行

Solution:

# .deb 包安装用户
sudo su

leju 

# 源码部署用户
sudo ./scripts/leju_start.sh

Workspace Not Found

ERROR: 未找到工作空间目录: /opt/ros/leju

Solution:

  1. .deb package users: Reinstall the .deb package
sudo dpkg -i ros-leju-workspace_${VERSION}.deb
  1. Source deployment users: Run the system configuration script to create the workspace
wget https://kuavo.lejurobot.com/statics/setup-kuavo-ros-control.sh
sudo ./setup-kuavo-ros-control.sh

Startup Command Not Found

bash: leju: command not found

Solution:

# 检查是否正确安装了 .deb 包
dpkg -l | grep ros-leju-workspace

# 如果未安装,重新安装 .deb 包
sudo dpkg -i ros-leju-workspace_${VERSION}.deb

Robot Version Not Set

WARNING: 未设置ROBOT_VERSION环境变量

Solution:

export ROBOT_VERSION=49
# 或者在 ~/.bashrc 中永久设置
echo 'export ROBOT_VERSION=49' >> ~/.bashrc
source ~/.bashrc

Build Environment Issues

WARNING: 未找到编译后的环境

Solution:

# .deb 包应该已经包含编译好的环境
# 如果有问题,检查安装
cd /opt/ros/leju
source installed/setup.bash

# 源码部署用户需要手动编译
catkin build humanoid_controllers

System Configuration Notes

Configuration File Locations

  • Robot mass: ~/.config/lejuconfig/TotalMassV${ROBOT_VERSION}
  • Leg zero-point calibration: ~/.config/lejuconfig/offset.csv
  • Arm zero-point calibration: ~/.config/lejuconfig/arms_zero.yaml
  • Driver board type: ~/.config/lejuconfig/EcMasterType.ini

Network Configuration

The script automatically checks and configures:

  • ROS_MASTER_URI
  • ROS_HOSTNAME
  • /etc/hosts mappings

Developer Information

Source Code Locations

  • Startup script: scripts/leju_start.sh
  • System configuration: tools/setup-kuavo-ros-control.sh
  • Hardware detection: tools/check_tool/Hardware_tool.py

.deb Package Build Information

The .deb package contains:

  • The complete workspace (/opt/ros/leju)
  • The startup script (/usr/bin/leju)
  • All required configuration files and dependencies
  • Precompiled binaries

Package Information

Logging and Debugging

  • The startup script outputs detailed execution information
  • Each tool has its own error handling and messages
  • Uses set -euo pipefail to ensure errors are caught promptly

Technical Support

If you encounter any problems, please:

  1. Check the Troubleshooting section of this document
  2. Review the detailed error messages output by the script
  3. Run the hardware detection tool to diagnose system status
  4. Contact the technical support team

Deployment Recommendations

  • Deploy using the .deb package
  • Configure an automatic update mechanism
  • Back up configuration files regularly
  • Monitor system operation status
  • Use source deployment
  • Use Git for version control
  • Sync the latest code regularly
  • Contribute to the community

Kuavo Robot System - A complete solution for humanoid robot control