Giter VIP home page Giter VIP logo

Comments (1)

Gonzalo-Mier avatar Gonzalo-Mier commented on May 29, 2024

Hi @xluo6688,
pytest is only used to check the correct behavior of the library. If you want to try the library by yourself, open a python terminal and follow any tutorial.

A good example you can try is:

import fields2cover as f2c

rand = f2c.Random(42)
robot = f2c.Robot(2.0, 6.0)
robot.setMinRadius(2)  # m
robot.linear_curv_change = 0.1  # 1/m^2

const_hl = f2c.HG_Const_gen()
field = rand.generateRandField(5, 1e4)
cells = field.field
no_hl = const_hl.generateHeadlands(cells, 3.0 * robot.robot_width)
bf = f2c.SG_BruteForce()
swaths = bf.generateSwaths(math.pi, robot.op_width, no_hl.getGeometry(0))
snake_sorter = f2c.RP_Snake()
swaths = snake_sorter.genSortedSwaths(swaths)
path_planner = f2c.PP_PathPlanning()
dubins_cc = f2c.PP_DubinsCurvesCC();
path_dubins_cc = path_planner.searchBestPath(robot, swaths, dubins_cc);

f2c.Visualizer.figure();
f2c.Visualizer.plot(cells);
f2c.Visualizer.plot(no_hl);
f2c.Visualizer.plot(path_dubins_cc);
f2c.Visualizer.plot(swaths);
f2c.Visualizer.show();

This code is extracted from here. All the code used on the tutorials is in that folder.

from fields2cover.

Related Issues (20)

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.