跳到主要内容

Walker S2 Data Collection Package Workflow

This document describes how to deploy the collector body data collection script to the Walker S2 EDU Explorer vision board (192.168.11.3). If you are using the Walker S2 EDU Explorer model, please follow this document to complete the body package deployment.

Prerequisites​

  1. Robot Version: Ensure the Walker S2 robot version is walker-s2-0001-1-1002-DAC-v0.6.15 or a later data collection version.
  2. Docker Image: Log in to the vision board at 192.168.11.3 and run docker images to check for the image:

    glcr.rd.ubtrobot.com/runtime/walker-s2/data_collection:ws2_vision-v1.3.35
    

    If it does not exist, pull it first:

    docker pull glcr.rd.ubtrobot.com/runtime/walker-s2/data_collection:ws2_vision-v1.3.35
    

One-Click Installation and Auto-Start​

The project includes a one-click installation script install_offline.sh, which automatically completes offline dependency installation, registers the systemd auto-start service, and starts the collection service.

Installation Steps​

  1. Copy collector.tar.gz to the vision board user directory /home/walker:

    scp ./collector.tar.gz walker@192.168.11.3:/home/walker
    
  2. Log in to the vision board, extract the package, and enter the directory:

    ssh walker@192.168.11.3
    cd /home/walker
    tar -zxvf collector.tar.gz
    cd collector
    
  3. Execute the one-click installation script:

    chmod +x install_offline.sh
    ./install_offline.sh
    

After the script completes:

  • Python dependencies in requirements.txt are installed offline automatically;
  • The systemd service walker-collector.service is registered;
  • Auto-start on boot is enabled;
  • The collection service is started immediately.

Service Description​

Service name: walker-collector

Actual startup command:

/usr/bin/python3 /home/walker/collector/src/run.py

run.py starts:

  • collector_cmd.py: Command service, listening on 0.0.0.0:5001, providing /start, /stop, and /health endpoints;
  • collector_worker.py: Background processing module responsible for file pulling, Docker conversion, packaging, uploading, and cleanup.

Common Management Commands​

# Check service status
sudo systemctl status walker-collector

# View real-time logs
sudo journalctl -u walker-collector -f

# Stop the service
sudo systemctl stop walker-collector

# Start the service
sudo systemctl start walker-collector

# Restart the service
sudo systemctl restart walker-collector

# Disable auto-start on boot
sudo systemctl disable walker-collector

API Endpoints​

Endpoint Method Description
/start POST Start collection, returns collect_id
/stop POST Stop collection, background conversion/upload begins
/health GET Check service health and current recording task

Examples:

curl -X POST http://192.168.11.3:5001/start
curl -X POST http://192.168.11.3:5001/stop

Notes​

  • The systemd service is created and enabled automatically when you run ./install_offline.sh for the first time; there is no need to manually edit /etc/systemd/system/walker-collector.service.
  • If you update the code later and need to reload the service, run:

    sudo systemctl restart walker-collector
    
  • Ensure that the /home/walker/collector directory and its contents on the vision board are readable and writable by the walker user.