Giter Site home page Giter Site logo

spanning-tree-covering's Introduction

Spanning-Tree-Covering

A preliminary implementation of Spanning Tree Coverage algorithm.

一个简单的机器人全覆盖实现,使用了生成树覆盖算法,可以保证在近乎全覆盖地图面积的同时不走回头路,大大提高覆盖效率。后期可以扩展加入动态避障以及对由于算法本身缺陷无法覆盖到的点的覆盖。

下图是某地图的可视化

original map

下图是程序运行结果

output path

使用

默认机器人是一个正方形/圆形,直径为 0.3m。如果需要改变它的直径,可以直接修改 Map.robot_len。依照下面的指示运行程序后,程序默认展示生成的路径图,路径以一个包含 (x,y) 坐标的数组形式存储在 result 中。

Precondition: 要求输入的地图四周确确实实封闭,且机器人在一个封闭区域内。

SEER smap 格式

  1. Main.py 中将 map_path 改为想要读入的 smap 格式文件
  2. planner = PathPlanner(my_map, 20, 10) 最后两个参数(这个例子中是x坐标为20m,y坐标为10m)改为机器人起始位置的坐标
  3. 运行 Main.py

非 SEER smap 格式

  1. 修改 MapReader.py 或直接修改 Map.py,使 min_x, min_y, max_x, max_y, blocked[][] 可以得到正确地初始化
  2. 其他步骤同 SEER 2,3

鸣谢

spanning-tree-covering's People

Contributors

harmonyano avatar

Stargazers

 avatar linxigjs avatar  avatar MasterNL avatar YYS avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.