8 import fields2cover
as f2c
11 from .PP_checker
import IsPathCorrect
13 def near(a, b, error = 1e-7):
14 assert abs(a - b) < error
17 robot = f2c.Robot(2.1, 2.5);
18 robot.setCruiseVel(2.0);
19 robot.setMaxCurv(1.0);
20 robot.setMaxDiffCurv(1.0);
22 turn = f2c.PP_ReedsSheppCurves();
23 start = f2c.Point(0.0, 0.0);
24 end = f2c.Point(-3.0, 0.0);
25 path = turn.createTurn(robot, start, 0.5 * math.pi, end, 1.5 * math.pi);
26 IsPathCorrect(path, start, 0.5 * math.pi, end, 1.5 * math.pi,
False);
29 robot = f2c.Robot(2.1, 2.5);
30 robot.setCruiseVel(2.0);
31 robot.setMaxCurv(1.0);
32 robot.setMaxDiffCurv(1.0);
33 turn = f2c.PP_ReedsSheppCurves();
34 turn.using_cache =
False;
35 for ang
in np.arange(0.25, math.pi, 0.25):
36 start = f2c.Point(0.0, 0.0);
37 end = f2c.Point(4.0, 0.0);
38 path = turn.createTurn(robot, start, ang, end, ang + math.pi);