Skip to content

Quick Start

This section introduces how to use the Daystar Bot SDK for developing applications on Daystar Robots.

Environment Requirements

System Requirements

  • OS: Ubuntu (recommended: 22.04)
  • C++: Version 17 or higher
  • Python: Version 3.10 or higher

Network Requirements

The development device must connect to the robot’s Wi-Fi network:

  • SSID: IS_**
  • Password: DaystarBot

Once connected, you should see a network interface assigned with an IP in the 192.168.144.* range and a subnet mask of 255.255.255.0. The gateway address should be 192.168.144.254.

1751629694921-d9dc45fe-cbb9-46f8-bae3-b8d9cb715899.png

Unpack and Build

Assume the working directory is your home directory.

Unpack the SDK

In the terminal:

shell
mkdir ~/lenovo_daystar_sdk
mv lenovo_daystar_robot_sdk-2.2.0.tar.gz ~/lenovo_daystar_sdk/
cd lenovo_daystar_sdk/
tar -xvf lenovo_daystar_robot_sdk-2.2.0.tar.gz

Directory Structure

After unpacking the SDK archive, the resulting directory structure should look like the following:

shell
u@u-LAPTOP:~$ cd ~/lenovo_daystar_sdk
u@u-LAPTOP:lenovo_daystar_sdk$ ls -liah
total 12M
10638894 drwxrwxr-x  3 u u 4.0K Jul  4 14:20 ./
 9961474 drwxr-x--- 26 u u 4.0K Jul  4 14:20 ../
10638895 drwxrwxr-x  5 u u 4.0K Jul  4 14:13 install/
10236138 -rw-rw-r--  1 u u  12M Jul  4 14:14 lenovo_daystar_robot_sdk-2.2.0.tar.gz

The install/ directory contains all the SDK components:

shell
u@u-LAPTOP:install$ ls -liah
total 28K
10638895 drwxrwxr-x 5 u u 4.0K Jul  4 14:13 ./
10638894 drwxrwxr-x 3 u u 4.0K Jul  4 14:20 ../
10639084 -rw-r--r-- 1 u u 3.9K Jul  3 18:28 CALLBACK_GUIDE.md
10638896 drwxrwxr-x 3 u u 4.0K Jul  4 14:13 example/
10639089 drwxrwxr-x 3 u u 4.0K Jul  4 14:13 include/
10639085 drwxrwxr-x 2 u u 4.0K Jul  4 14:13 lib/
10639083 -rw-r--r-- 1 u u 3.8K Jul  3 13:35 README.md

The include directory contains the SDK header files, lib stores the shared library files, and example provides the source code for demo applications. The two .md files are documentation resources related to the SDK.

Building the Example Demos

To compile the example demos, run the following commands:

Note: Building the examples requires cmake. Please make sure it is installed: sudo apt install cmake

shell
u@u-LAPTOP:install$ cd example/
u@u-LAPTOP:example$ ls
CMakeLists.txt  src
u@u-LAPTOP:example$ cmake -B build && cd build && make
-- The C compiler identification is GNU 11.4.0
-- The CXX compiler identification is GNU 11.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done (6.1s)
-- Generating done (0.0s)
-- Build files have been written to: /home/weijy/robot-sdk/daystar-bot-sdk-client/cpp/example/build
[ 16%] Building CXX object CMakeFiles/sport_demo_interactive.dir/src/sport_demo_interactive.cpp.o
[ 33%] Linking CXX executable sport_demo_interactive
[ 33%] Built target sport_demo_interactive
[ 50%] Building CXX object CMakeFiles/rps_demo_interactive.dir/src/rps_demo_interactive.cpp.o
[ 66%] Linking CXX executable rps_demo_interactive
[ 66%] Built target rps_demo_interactive
[ 83%] Building CXX object CMakeFiles/sysb_demo_interactive.dir/src/sysb_demo_interactive.cpp.o
[100%] Linking CXX executable sysb_demo_interactive
[100%] Built target sysb_demo_interactive

If the build process completes to 100% without any errors, the compilation is successful.

After successfully running the make command, the compiled demo executables will appear in the current directory. As shown in the listing below, rps_demo_interactive, sport_demo_interactive, and sysb_demo_interactive are the resulting binaries corresponding to the example demos.

shell
u@u-LAPTOP:build$ ls
CMakeCache.txt  CMakeFiles  cmake_install.cmake  Makefile  rps_demo  rps_demo_interactive  sport_demo_interactive  sysb_demo_interactive

WARNING

⚠️ Note: As the SDK is continuously updated, the actual names of the generated executables may differ slightly from those shown above.

Running the Example Demos

Before running the example programs, ensure that your development host is connected to the robot's Wi-Fi network. The network name is typically one of the following:

  • IS_0**_5G
  • IS_Plus_0**_5g

You can verify the connection using the following commands:ifconfig and arp -a

shell
u@u-LAPTOP:build$ ifconfig
lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  
        RX packets 13814  bytes 1982216 (1.9 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 13814  bytes 1982216 (1.9 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlp0s20f3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.144.9  netmask 255.255.255.0  broadcast 192.168.144.255
        inet6 fe80::3d19:ddeb:2d3a:1a38  prefixlen 64  scopeid 0x20<link>
        ether 14:75:5b:75:c6:be  txqueuelen 1000  
        RX packets 457434  bytes 256860222 (256.8 MB)
        RX errors 0  dropped 46  overruns 0  frame 0
        TX packets 175324  bytes 839413349 (839.4 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

u@u-LAPTOP:build$ arp -a
_gateway (192.168.144.254) 位于 80:ae:54:da:eb:4b [ether] 在 wlp0s20f3
? (169.254.169.254) 位于 <incomplete> 在 wlp0s20f3

If connected properly, you should see:

  • An IP address in the 192.168.144.* subnet with a 255.255.255.0 netmask.
  • A gateway address of 192.168.144.254 visible in the ARP table.

Robot Setup Checklist

Before launching any demo, make sure the robot is properly positioned:

  1. The robot should be placed in a resting posture with its legs lying flat and naturally aligned.
  2. Ensure there is enough open space around the robot for safe movement.
  3. Locate the red emergency stop button on the rear of the robot. In case of unexpected behavior or potential collisions, press the button immediately to halt the robot.

Launching a Demo Program

To start the demo, run the following command: :./sport_demo

To launch the demo, execute the following command in the terminal:

shell
u@u-LAPTOP:build$ ./bin/sport_demo_interactive 
Sport interactive control program started...
RobotClient: Connecting to 192.168.100.103:50051
McsClient: Connected to MCS service.
RpsClient: Connected to RPS service.
OtaClient: Connected to OTA service.
SnmpClient: Connected to SNMP service.
RobotClient: Successfully connected to robot service.
Note: Server handshake timed out - continuing with default settings
RobotClient: Server information unavailable, continuing with limited version checking.

========== Sport Control Menu ==========
1.  Check connection status
2.  Get server information
3.  Enable actuators
4.  Disable actuators
5.  Stand up
6.  Lie down
7.  Set scene mode
8.  Adjust speed
9.  Move robot
10. Rotate robot
11. Stop movement
12. Set body posture
13. Configure gait parameters
14. Query motion status
15. Query system status
16. Set status callback
17. Set motion callback
18. Get heartbeat value
19. Generic API call test
0.  Exit
=========================================
Please enter your choice (0–19):

Additional Demo Programs

  • rps_demo_interactive:
    This demo allows you to test and control various robot peripherals, including battery status, facial expressions (LEDs), and cooling fans. You can run this demo to verify power-related and interactive features.
  • sysb_demo_interactive:
    This demo provides interfaces for gimbal control and navigation-related testing, making it useful for verifying motion perception and localization capabilities.

Python

Installation & Setup (Python)

To ensure environment isolation and better dependency management, it is recommended to deploy your application using a virtual environment such as venv or uv. Below is an example using venv:

1、 Verify Python Version (must be ≥ 3.10)

python
python --version || python3 --version

2、 Install Python and Virtual Environment Tool

python
sudo apt update && sudo apt install python3 python3-venv

3、 Create and Activate the Virtual Environment

python
python -m venv .venv 
source venv/bin/activate

4、 Install the SDK (using .whl package, version 2.2 as an example)

python
pip install -e .
pip install dist\daystar_robot_sdk_python-2.2.0-py3-none-any.whl

5、 Verify SDK Installation

python
pip list | grep daystar
daystar-robot-sdk-python 2.2.0  #If the version number is displayed, the installation is successful.

Running Example Scripts

pThe Python SDK includes test scripts such as motion_cli.py and perception_cli.py, which are provided to validate the core interfaces for:

  • Motion control
  • Perception services

WARNING

Note: For further integration and advanced usage, refer to the demo scripts in the python_demo/example directory:

  • motion_demo.py
  • perception_demo.py

1、 List Available Test Commands

python
python motion_cli.py

1751617290148-85849bce-75bf-4773-b9fb-c4b83d0e2692.png

2、 Run a Test

python
python motion_cli.py status

Additional Examples

python
# Get Battery Information
python motion_cli.py battery

# Get Emergency Stop (E-Stop) Status
python motion_cli.py estop_state

# Get Charging Status
python motion_cli.py charging_status

# RPS (Robot Peripheral System) – LED Control
python motion_cli.py rps_light 1  # Turn off all LEDs
python motion_cli.py rps_light 2  # Power off
python motion_cli.py rps_light 3  # Power on
python motion_cli.py rps_light 4  # Normal operation
#  1: Turn off all LEDs
#  2: Power off
#  3: Power on
#  4: Normal operation
#  5: Smiley face
#  6: Crying face
#  7: Follow mode
#  8: Shocked expression

# Reboot RPS System
python motion_cli.py reboot
python
# Get Current Robot Pose
python perception_cli.py get_pose

# Add Navigation Waypoint
python perception_cli.py add_location 1

# Delete Navigation Waypoint
python perception_cli.py delete_location 1

# Navigate to a Specific Waypoint
python perception_cli.py nav_to_location 1

C# (Unity)

Installation & Setup (Unity)

Install the Unity Editor with a version ≥ 2021.3.22f.

Import the SDK package file(com.lenovo.daystar.robot-2.0.0.tgz)

Unity --> Windows --> Package Manager --> Add package from tartall ( Load the SDK package from a local tarball )

1751628334299-6ebd6970-6199-48b7-816b-23cd0d44a2e0.png

After successful import:

1751628472842-238dfade-ddb8-4591-8a99-69c29f505009.png

Running the Example Scene

Import the sdk sample

1751628568795-924d19fb-afd6-42bc-9dd7-4e5bef75daa3.png

Open the SDK Sample Scene

1751628606098-0483cd38-5258-4d22-9f75-4bc0a980da2e.png

Run the Sample Program

The sample scene supports both Editor Mode and Android Device Deployment.

Editor Mode
  • Connect your PC to the robot's Wi-Fi
  • SSID: IS_***
  • Password: DaystarBot
  • In Unity, click the Play ▶ button in the Editor to run the scene.
  • If successful, you will see the simulation interface and can begin interacting with the robot.
  • To make the robot walk:
  • Enable Actuators → Stand Up → Move Forward

1751629105056-d4c37c07-e14b-462d-848d-26b83955eb7a.png

Android Deployment

  1. Build the Sample Scene
    Compile the sample scene into an Android APK using Unity’s Build Settings.
  2. Install the APK
    Transfer and install the generated APK onto your Android device.
  3. Connect to the Robot’s Wi-Fi
    • SSID: IS_***
    • Password: DaystarBot
  4. Launch the APK
    Start the app on your Android device to interact with the robot in real-time.

1751629174689-0f806dcc-b71c-4725-9fb6-880c763389f6.png