Skip to content

Simulation Platform

To support developers in development, debugging, and testing without physical robot hardware, the Daystar Bot SDK provides a simulation platform SDK, offering a virtual environment for robot development and testing. This avoids excessive experimentation on actual hardware, thereby improving development efficiency and reducing risks.

1. Overview

1.1 Simulation Platform Introduction

Webots is an open-source 3D robot simulation platform designed for robotics research, education, and industrial applications. It supports various robot types, including wheeled robots, quadruped robots, robotic arms, drones, and more. It enables high-precision robot motion simulation with physics engine support. The Daystar Bot Simulation SDK is implemented based on the Webots platform.

1.2 Supported Features

  • Basic motion control
  • Robot status monitoring

2. Installation & Environment Setup

2.1 System Requirements

  • Linux (Recommended): Ubuntu 20.04
  • Windows: Windows 11 (requires a dedicated GPU and must run in a Linux environment, e.g. WSL2)

2.2 Download, Installation & Environment Setup

Download Link: Simulation Tool Download

Linux System

Install Webots

  1. Extract the downloaded webots.tar.gz (includes Webots tools, simulation SDK, and robot model):
bash
tar -xvzf webots.tar.gz
  1. For first-time use, run the following command in the extracted webots directory to install the simulation platform and dependencies:
bash
sudo ./saturn_sim_init.sh

Windows System

Install WSL and Upgrade to WSL 2

  1. Manually create a **.wslconfig** file.
  2. Copy it to the C:\Users<your_username> directory.
  3. Restart WSL for the changes to take effect.
bash
# Settings apply across all Linux distros running on WSL 2
[wsl2]
networkingMode=mirrored
firewall=true
dnsTunneling=true
autoProxy=true

Install Webots

  1. Extract the downloaded **webots.tar.gz** file (contains Webots tools, simulation SDK, and robot model):
bash
tar -xvzf webots.tar.gz
  • First-time setup:
    Navigate to the extracted webots directory and run the following command to install the simulation platform and dependencies:
bash
sudo ./saturn_sim_init.sh

2.3 Launching the Simulation Platform

After installation. Launch the simulation with the following steps:

  1. Run:
plain
./run_sim.sh
  1. On first launch, the platform will download required Webots resources online. Ensure a stable internet connection and wait patiently.

1741157477046-e5acb2b9-12ff-47d6-9e35-55c1efdae18c.png

1741157452349-129fb089-0af2-4781-a343-854178d8a691.png

3. Quick Start Guide

3.1 Loading the Default Robot Model

After Webots resources are downloaded, load the preconfigured Daystar Bot model:

  1. In Webots: File → Open World →saturn_V2.0_simple_model.wbt
  2. Model path: webots/webots_release/rc_core/webots/worlds/saturn_V2.0_simple_model.wbt

1741158040762-4555d126-8258-4f17-92a3-b38cd5d18722.png

If success:

1741158363234-272165f8-3302-4008-8f2d-3e62431d8115.png

3.2 Basic Operations

Once the model loads successfully:

  1. Connect your application device (running DaystarBot SDK) and the simulation device to the same local network.
  2. Control the simulated robot via LAN.

4. Troubleshooting

Issue 1: run_sim.sh fails with "library not found"

1741350841795-febdec62-040c-46c9-bfd5-3b213113c621.png

Solution: Install missing dependencies: sudo apt-get install -f, then rerun ./run_sim.sh.

Issue 2: Missing libopencv_core.so.4.2

1741159548175-6704ab88-06cf-4634-95ca-d6899392a708.png

Solution: Manually install OpenCV 4.2 compatibility packages.

bash
sudo add-apt-repository universe
sudo apt update
sudo apt install -y libopencv-core4.2

If sudo apt install -y libopencv-core4.2 fails, create a symlink:

1741352371123-5a8a2e81-e043-4606-8301-aeaa39578e53.png

1744521162999-b95ef6b2-6026-4c8e-82af-bb66732681d3.png

Issue 3: Missing libopencv_imgcodecs.so.4.2

Solution:

  1. Check current OpenCV versions:

1744521287052-ae8b033d-306a-4044-b1aa-d1f9dbc4a090.png

Solution:

Run the command ldconfig -p | grep libopencv_imgcodecs to check the current path and version of the libopencv_imgcodecs library, then execute the following command to create a soft link to version 4.2.

Solution:

  1. Check current OpenCV versions:
bash
ldconfig -p | grep libopencv_imgcodecs
  • Symlink to v4.2:
bash
sudo ln -s /usr/lib/x86_64-linux-gnu/libopencv_imgcodecs.so.4.6.0 /usr/lib/x86_64-linux-gnu/libopencv_imgcodecs.so.4.2
sudo ldconfig

1742458556714-c58c27fe-cf47-4029-9094-d17fc40c466a.png

Issue 4: wsl --install fails with "cannot resolve server"

Solution: Modify the hosts file:

  1. Find a valid IP for raw.githubusercontent.com (e.g., 185.199.110.133) via IP Lookup
  2. Edit hosts:
    • Path: C:\Windows\System32\drivers\etc\hosts
    • Add:
bash
185.199.110.133 raw.githubusercontent.com
  • If permission denied: Right-click file → Properties → Security → Add Everyone with full control.
  1. Verify DNS:
bash
ping raw.githubusercontent.com

Issue 5: Webots launches with a black screen (no 3D model)

1744537980704-6d2349f7-f419-4941-97a3-5a826098f47c.png

Solution: Update your GPU drivers and restart Webots.