Comments (1)
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)
- Spiral route pattern won't work as expected if bulk of swaths is bigger than 6
- Segmentation fault when generating headland HOT 1
- odd turns when attempting to generate dubins paths HOT 3
- Compilation on Debian 12 Bookworm deprecated declaration Python3.11 HOT 2
- catkin_make_isolated error HOT 10
- Max_Icc and Set Radius HOT 1
- How to get the swath endpoint HOT 3
- Not completely covering field HOT 1
- Nav2 Integration HOT 64
- Create Pypi package for the python interface
- Planning of Loops HOT 1
- Option to have turns happen inside the polygon when leaving the polygon shape is not permissible HOT 3
- Compilation steps are not rendered HOT 4
- Does not compile with clang HOT 1
- Is it possible to use this library to plan a coverage path connecting multiple convex polygons? HOT 4
- AerialmapDisplay HOT 3
- Headland width is not constant HOT 2
- questions about headland generator HOT 7
- Can F2C work with wgs84 coordinates? HOT 5
- Connecting between two fields HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fields2cover.