Skip to content

Commit 84f052d

Browse files
committed
started error analysis
1 parent ed881c0 commit 84f052d

File tree

3 files changed

+84
-2
lines changed

3 files changed

+84
-2
lines changed

coqidescript.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
coqide -async-proofs-j 2 -R src ROSCOQ $@ > /dev/null &
1+
coqide -async-proofs-j 7 -R src ROSCOQ $@ > /dev/null &
22

src/CRMisc/OldMetricAsNew.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ Definition fromOldMetricTheory :MetricSpace.
9595
assert (0 < qb)%Q as qbp by (lra).
9696
specialize (H (mkQpos qbp)).
9797
apply leEq_def in H; auto.
98-
Qed.
98+
Defined.
9999

100100
End OldNew.
101101

src/robots/car/errorBounds.v

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
Require Import Vector.
2+
3+
Require Import MathClasses.interfaces.canonical_names.
4+
Require Import MCInstances.
5+
Require Import ackermannSteering.
6+
Require Import MCMisc.tactics.
7+
Require Import CartIR.
8+
Require Import ackermannSteering.
9+
Require Import fastReals.interface.
10+
Require Import fastReals.misc.
11+
Require Import geometry2D.
12+
Require Import geometry2DProps.
13+
Require Import ackermannSteeringProp.
14+
Require Import MathClasses.orders.rings.
15+
Require Import MathClasses.interfaces.orders.
16+
Require Import atomicMoves.
17+
Require Import IRMisc.LegacyIRRing.
18+
Require Import wriggle.
19+
Hint Unfold One_instance_IR : IRMC.
20+
21+
Local Notation minxy := (lstart).
22+
Local Notation maxxy := (lend).
23+
Local Notation "∫" := Cintegral.
24+
Local Notation ConfineRect := (Line2D).
25+
26+
27+
Local Opaque CSine.
28+
Local Opaque CCos.
29+
Local Opaque Sine.
30+
Local Opaque Cosine.
31+
Local Opaque Sin.
32+
Local Opaque Cos.
33+
34+
Require Import CRMisc.OldMetricAsNew.
35+
Section AtomicMove.
36+
37+
Context {maxTurnCurvature : Qpos}
38+
(acs : AckermannCar maxTurnCurvature).
39+
Variable am : AtomicMove IR.
40+
41+
Variable tstart : Time.
42+
Variable tend : Time.
43+
44+
Variable tcErr : Qpos.
45+
Variable distErr : Qpos.
46+
Require Import CoRN.metric2.Metric.
47+
48+
Let rball : Qpos → IR → IR → Prop :=
49+
@ball (fromOldMetricTheory IR_as_CMetricSpace).
50+
51+
52+
Set Implicit Arguments.
53+
(** This defines what it means for the car's controls to
54+
realistically follow the atomic move [am] during time [tstart] to [tend] *)
55+
Record CarExecutesAtomicMoveDuring (p: tstart < tend) : Type :=
56+
{
57+
am_tdrive : Time;
58+
59+
(**strict inequalities prevents impossilities like covering non-zero distance in 0 time.
60+
Note that [linVel] and [turnCurvature] evolve continuously.
61+
*)
62+
am_timeInc : (tstart < am_tdrive < tend);
63+
64+
(** From time [tsteer] to [drive], the steerring wheel rotates to attain a configuration
65+
with turn curvature [tc]. The brakes are firmly placed pressed.*)
66+
am_steeringControls : ({turnCurvature acs} am_tdrive) = (am_tc am)
67+
/\ forall (t:Time), (tstart ≤ t ≤ am_tdrive)
68+
-> {linVel acs} t = 0;
69+
70+
71+
(** From time [tdrive] to [tend], the steering wheel is held fixed*)
72+
am_driveControls : forall (t:Time), (am_tdrive ≤ t ≤ tend)
73+
-> rball tcErr ({turnCurvature acs} t) ({turnCurvature acs} am_tdrive);
74+
75+
am_driveDistance :
76+
let pf := (timeLtWeaken (proj2 (am_timeInc))) in
77+
let driveIb := (@mkIntBnd _ am_tdrive tend pf) in
78+
rball distErr (am_distance am) (∫ driveIb (linVel acs))
79+
}.
80+
81+
End AtomicMove.
82+

0 commit comments

Comments
 (0)