community/sig-robotics/examples/Implement-VSLAM-algorithm-b...
jike5 ab43e15212 Add part of VSLAM-demo code
Signed-off-by: jike5 <2719825969@qq.com>

Signed-off-by: jike5 <2719825969@qq.com>

Signed-off-by: jike5 <2719825969@qq.com>

Signed-off-by: jike5 <2719825969@qq.com>

Signed-off-by: jike5 <2719825969@qq.com>
2022-10-28 21:11:19 +08:00
..
build Add part of VSLAM-demo code 2022-10-28 21:11:19 +08:00
images Add part of VSLAM-demo code 2022-10-28 21:11:19 +08:00
scripts Add part of VSLAM-demo code 2022-10-28 21:11:19 +08:00
README.md Add part of VSLAM-demo code 2022-10-28 21:11:19 +08:00
cloud-deployment.yaml Add part of VSLAM-demo code 2022-10-28 21:11:19 +08:00
edge-deployment.yaml Add part of VSLAM-demo code 2022-10-28 21:11:19 +08:00

README.md

Implement VSLAM algorithm based on KubeEdge

This project aims to develop a Visiual SLAM application on an edge-side robot and implementing compute offloading to reduce the compute and memory resource pressure on edge-side.

Prerequisites

  1. Kubeedge 1.10.1+
  2. Edgemesh 1.11.0+

Steps to reproduce

  1. Make sure your cluster is set up and edgemesh is enabled.

  2. Clone the community/sig-robotics respository.

    git clone https://github.com/kubeedge/community
    
  3. Prepare your RGBD dataset or RGBD-sensors on the edge-side.

    We use TUM Datasets and its format in our development and test process.

  4. With all nodes running on the cluster, we create the deployment by using the yaml file below.

    For example, we have a cloud node and two edge nodes, named edge01 and edge02

    cloud-deployment.yaml

    spec:
      template:
        spec:
          nodeName: edge02
    

    edge-deployment.yaml

    spec:
      template:
        spec:
          nodeName: edge01
    

    Download TUM Datasets to your edge node, and mount it within k8s.

    spec:
      template:
        spec:
          - name: data-mount
            hostPath: 
              path: [your_absolute_path]/workspace/data
    
  5. Make sure you have replace the PATH_TO_SEQUENCE_FOLDER ,ASSOCIATIONS_FILE in edge-deployment.yaml and TUN_NAME in cloud-deployment.yamlto your own parameters.

    env:
    - name: PATH_TO_SEQUENCE_FOLDER
      value: /workspace/data/YOUR_DATA_FOLDER
    - name: ASSOCIATIONS_FILE
      value: /workspace/Edgeslam/Examples/RGB-D/YOUR_CONFIG.yaml
    
    env:
    - name: TUM_NAME
      value: TUM2
    
  6. Create the applications deployment.

    kubectl apply -f edge-deployment.yaml
    kubectl apply -f cloud-deployment.yaml
    
  7. If your edge-side node support X11 GUI, you will see a frame windows and a map window. The trajectory will be saved under /workspace/edgeslam/Examples folder.

Validation

The works we has used for reference including ORB_SLAM2, and combined the performance on TUM datasets. We illustrate the overall framework of ours in the chart and figures.

RMSE ORBSLAM2 Ours
fr2_desk 0.05 0.12
fr3_office 0.02 0.04
results

Conclusion: Through the cloud-edge collaboration, the computational pressure on edge devices is reduced while ensuring better localization accuracy results.

Development Tools

Due to the different application scenarios of robots, for cases that customer require, we provide some tools and environments to accelerate development process.

You can locally build a mutually isolated cloud and side container. To simulate edgemesh network communication, we need to first define a docker-network:

docker network create orbslam-cloud

Start the containers:

sudo ./scripts/run_container_cloud.sh
sudo ./scripts/run_container_edge.sh

Reference