-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontinuity_policy_options.sd
More file actions
70 lines (63 loc) · 2.05 KB
/
Copy pathcontinuity_policy_options.sd
File metadata and controls
70 lines (63 loc) · 2.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
// Feature options: continuity_policy — triggers, takeover modes, fleet handoff
//
// on triggers: robot.failed, battery_critical, gps_health.degraded, coordinator.failed, …
// actions: resume from checkpoint, reassign mission, promote backup coordinator,
// transfer state to successor, notify fleet, escalate to control center, …
//
// spanda check examples/features/continuity_policy_options.sd
// spanda continuity examples/features/continuity_policy_options.sd --failed RoverAlpha --progress 72 --trigger robot_failed
// spanda takeover examples/features/continuity_policy_options.sd --failed RoverAlpha --successor RoverBeta --progress 72
// spanda delegate examples/features/continuity_policy_options.sd --failed RoverAlpha --to RoverBeta
// spanda succession examples/features/continuity_policy_options.sd --failed RoverAlpha --scope fleet
//
// Docs: docs/mission-continuity.md
mission_plan WarehouseScan {
step navigate_aisle;
step scan_shelf_a;
step scan_shelf_b;
step return_dock;
}
continuity_policy WarehouseContinuity {
on robot.failed {
resume from checkpoint;
reassign mission;
transfer state to successor;
}
on battery_critical {
promote backup coordinator;
reassign mission;
}
}
continuity_policy FleetEscalation {
on gps_health.degraded {
notify fleet;
escalate to control center;
}
on coordinator.failed {
promote backup coordinator;
redistribute swarm tasks;
}
}
fleet ScannerFleet {
RoverAlpha;
RoverBeta;
RoverGamma;
}
robot RoverAlpha {
sensor gps: GPS;
actuator wheels: DifferentialDrive;
safety { max_speed = 1.0 m/s; }
behavior scan() { wheels.drive(0.3 m/s); }
}
robot RoverBeta {
sensor gps: GPS;
actuator wheels: DifferentialDrive;
safety { max_speed = 1.0 m/s; }
behavior scan() { wheels.drive(0.3 m/s); }
}
robot RoverGamma {
sensor gps: GPS;
actuator wheels: DifferentialDrive;
safety { max_speed = 1.0 m/s; }
behavior scan() { wheels.drive(0.3 m/s); }
}