Kuavo Docs
Development Interfaces

ROS1 Development Guide and Examples

Document Description

  • kuavo_sdk is a development interface package based on ROS1. It hosts the Topic / Service interface definitions related to robot control and provides the corresponding example nodes.

  • Through ROS Topic publishing and subscribing as well as ROS Service calls, the SDK provides a unified set of control interface definitions externally, together with Python example nodes, making it easy for users to carry out secondary development and feature verification.

  • This document mainly introduces the code structure, system runtime architecture, and basic usage of the kuavo_sdk package.

Code Architecture

  • The "kuavo_sdk package" contains the topic and service calls for both the upper-level and lower-level computers of the robot. Before use, make sure the main programs on the upper and lower computers are started. Refer to the Basic Control section in Quick Debugging.

Upper-Level Computer

  • Function description: The robot's upper-level computer is the head NUC, responsible for image and audio processing and parsing, such as voice interaction and visual feature detection. The upper-level computer connects to the lower-level computer via an Ethernet cable and automatically obtains the IP address assigned by the lower-level computer. In the robot's ROS master-slave system, the upper-level computer acts as the slave.

Lower-Level Computer

  • Function description: The robot's lower-level computer is the chest NUC, responsible for whole-robot motion control, such as inverse kinematics and gait algorithms. The lower-level computer is configured with a DHCP service, connects to the upper-level computer via an Ethernet cable, and assigns an IP address to the upper-level computer. In the robot's ROS master-slave system, the lower-level computer acts as the master.

Development Interface Package Description

  1. kuavo_sdk directory structure description
  • kuavo_sdk/
    • msg: ROS Topic message format definition files
    • srv: ROS Service format definition files
    • sdk: kuavo_sdk example programs
    • CMakeLists.txt/package.xml: build configuration files

SDK Environment Setup

Note: All compilation in the lower-level computer's on-device environment must be performed as the superuser

cd /home/lab/kuavo-ros-opensource #仓库目录
sudo su
catkin build kuavo_sdk

Usage

  • Source the environment variables
source ~/devel/setup.bash # zsh还是bash根据使用终端环境选择
  • Run the SDK example program
python3 src/kuavo_sdk/sdk/01_use_music/playmusic.py # 音频播放示例