Skip to content

Simulation Platform

In order to support developers to develop, debug and test without actual robot hardware, Daystar Bot SDK provides simulation platform SDK to provide a virtual environment for robot development and testing, avoiding too many experiments on actual hardware, thus improving development efficiency and reducing risks.

1. Overview

1.1. Brief introduction of simulation platform:

Webots is an open source 3D robotics simulation platform designed for robotics research, education and industrial applications. It supports a variety of robot types, including wheeled robots, quadruped robots, robotic arms, drones, etc. It can perform high-precision robot motion simulation with the support of the physics engine, and implements the Daystar Bot simulation SDK based on the Webots platform.

1.2. Functional support:

  • support the basic operation control of the robot

  • support to get the status of the robot

2. Installation and Environment Configuration

2.1 System Requirements:

Linux system (recommend):ubuntu20.04

Windows system: win11, with independent graphics card, need to install WSL and run in Linux environment

2.2 Download, installation and environment configuration:

download address: simulation Tool Download

Linux system

install Webots

  1. decompress and download webots.tar (including webots tool, simulation sdk, robot dog model)
    tar -xvzf webots.tar.gz
  2. for the first time, run the following command in the decompressed webots directory to install the simulation platform and dependent environment
    sudo ./saturn_sim_init.sh

Window System

Step 1: install WSL and upgrade to WSL 2

  • please refer to the official Microsoft link to install:

https://learn.microsoft.com/zh-cn/windows/wsl/install

  • after installation, you need to manually create the. wslconfig file and copy it to the C disk user directory (C:\Users \ <your_username>), restart wsl to take effect after saving.
bash
# Settings apply across all Linux distros running on WSL 2
[wsl2]
networkingMode=mirrored
firewall=true
dnsTunneling=true
autoProxy=true

Step 2: Install Webots

  1. Decompress the downloaded webots.tar (including webots tools, simulation sdk, robot dog model)
  • tar-xvzf webots.tar.gz
  1. For the first time, execute the following command to install the simulation platform and dependent environment in the decompressed webots directory
  • sudo./saturn_sim_init.sh

2.3 Start the simulation platform:

After the installation is complete, you can use the simulation environment. The instructions for enabling simulation are as follows:

  1. ./run_sim.sh

  2. the startup interface is as follows. The resource files required by webots will be downloaded online for the first time. Please keep the network open and wait patiently.

1745575975074-d156632b-1a79-4847-b567-8b66ba73f20e.png

1745575975288-7dfcddcc-9f7c-461c-9376-86fc69c0112d.png


3. Quick Start

3.1 Load Default Robot Model

After the webots resource is successfully downloaded, you can choose to load the robot dog model preset by the Daystar Bot simulation SDK:

  1. click on the upper left corner of the webots tool File: 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

After successful loading, the interface is displayed as follows:

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

3.2 Basic operation guide

After running the webots to load the model, connect the device where the application developed based on the DaystarBot SDK is located to the emulation platform device **the same network **it can realize the control of the simulation platform robot dog in the LAN environment.

4. Frequently Asked Questions

question 1: run run_sim.sh script to start webots prompt library file not found error

1745575975132-773fbf1d-8932-4aa9-b72d-6eae4027be1a.png

solution: install the missing dependencies (run sudo apt-get install -f), and then run the srun_sim.sh script again to restart webots.


question 2: starting the webots program prompts "error while loading shared libraries: libopencv_core.so.4.2: cannot open shared object file: No such file or directory"

1745575975122-88bc1ce4-7565-468d-81f6-6663ab3da267.png

solution: manually install the OpenCV -4.2 compatible package

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

If the sudo apt install -y libopencv-core4.2 fails, execute the following command to Softlink to the 4.2 version:

1745575975195-c243d7b2-8749-46ec-a144-9ac4343c7c75.png

1745575976319-668d539f-55c2-494c-bf23-78a328ec582b.png


question 3: starting the webots program prompts "error while loading shared libraries:: cannot open shared object file: No such file or directory"

1745575976501-6726775c-daf1-40ff-9a81-ca0264f812c6.png

solution: run ldconfig -p l grep libopencv_imgcodecs to view the path and version of the current libopencv_imgcodecs library, and then run the following command to soft-link to the 4.2 version.

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


question 4: execute wsl -- install, indicating that the name or address of the server cannot be resolved.

solution: modify the Hosts file and manually add the mapping between domain names and IP addresses to resolve DNS issues.

  1. query available IP addresses visit IP query website( https://site.ip138.com/raw.Githubusercontent.com/), get raw.githubusercontent.com the currently available IP (such 185.199.110.133 ).
  2. Modifying the Hosts file
  • path: C:\Windows\System32\drivers\etc\hosts.

Open the file in Notepad with administrator privileges and add a line at the end:

  • 185.199.110.133 raw.githubusercontent.com
  • if you are prompted that the permission is insufficient when saving, you need to modify the file permission: Right-click the File → Properties → Security → Add User Everyone and give full control.
  1. verify DNS resolution execute in the command prompt ping raw.githubusercontent.com , confirm that IP can be successfully parsed.

question 5: if the 3D model cannot be loaded after opening webots, a black screen will be displayed (as shown in the following figure).

1745575976359-5f225b97-5d02-45b9-89f6-d72e82c95967.png

solution: you can try to update the video card driver of your computer to a new version and restart webots.