-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtodo.txt
147 lines (110 loc) · 5.98 KB
/
todo.txt
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
Tethered operation:
* from PC to robot:
* locomotion commands ( MOVE(), TURN(), GO(), HARD_STOP(), SOFT_STOP() )
* start/stop a state machine / behavior / reflex / feedback control loop that runs on the robot
(e.g. wall following, line detection, line alignment)
* odometry / positionaing update (i.e. set x,y,theta to specific value)
* update global state (e.g. which room we are in)
* turn on the extinguisher
Todo:
* ignore home circle when going around Room 4
Issues:
* after extinguising, need to confirm that the flame is really out by dying a 360 degree scan; if not out, repeat.
Resolved Issues (for now):
* when turning into room #4 w/ door on the south side - turning too sharp
* when the candle is near the wall, we might bump into the wall before we get close enough to the candle
* when we found the flame, we need to confirm to rule out false positive caused by other IR sources (video cameras etc)
* might scrape agains the wall when exiting from room 3 or 2 (turn more before exiting)
* when moving towards the south entrance of room 4, sometimes we come short
* when tranitioning to left wall following to pass room 4 on the east side, we should first get closer to the wall
* IR Far North is interfering w/ the NE facing IR (but noth anymore with IR N, after pointing IR Far N to the rigth)
* sometimes missing the line/door when entering room 1 w/ door on the south side
Need to test at home:
* return trip
Can test at Trinity:
* find & extinguis flame / arbitrary candle location mode
* add the additional flame detectors for wide angle detection
Return Trip:
1) Find the room exit / door - facing out
a) After blowing out the flame, stop in the original position (i.e. directly facing the candle)
b) turn around 180 degrees
c) go straight for the same distance that we initially travelled towards the flame (avoid walls)
d) now turn to face the door (based on map, e.g. -90deg for Rm#3)
e) go straight until we cross the line
f) align to line
2) travers the hallway depending on which room we come from
How to stay in center of hallway during return trip:
* go relatively slow
* if we see a wall on both sides, stay in the middle (apply a bias depending on which wall is closer)
* if we see a wall only on one side (distance > 20" == no wall), then just maintain 15" from that wall
* if we dont' see a wall on either side, just go straight (remove any bias)
* if something is right in front of us, make a course correction (depending on which side sensor registers a wall)
How to ignore the home circle:
With candle circle:
1) Scan for flame
2) Play sound to indicate detection
3) Turn into the direction of the peak flame value
4) Confirm that the flame is still there
5) Start moving straight
6) While moving, stay away from left/right wall by applying a small bias
7) if we are way too close in front (<5") then stop
8) if we are on the circle (both line sensors indicate "white"), stop; go 3" forward (avoid walls); start blowing
Arbitrary candle location / no candle circle:
1) Scan for flame
2) Play sound to indicate detection
3) Turn into the direction of the peak flame value
4) Confirm that the flame is still there
5) Start moving straight
6) if we get too close to a wall on our right:
* stop; turn left 45 deg
* go straight for 10" or until we get to close to something on any sensor
* now turn right 90 deg and scan at the same time
* point into the direction of the candle
* go to step 5
6) if we get too close to a wall on our left:
* stop; turn left 45 deg
* go straight for 10" or until we get to close to something on any sensor
* now turn left 90 deg and scan at the same time
* point into the direction of the candle
* go to step 5
7) If the front facing IR or sonar sensor indicates that we are within 10” of the candle: stop; start blowing
Todo:
* add start button
* add sound activation
Nice to haves:
* add more IR detectors (without light shielding) so we don't have to scan to determine if there is a flame in room x
Wall following:
• Add logic to "follow wall" behavior so that it first finds the wall or create a separate "find wall" behavior
• Limit the amount by which the integrator is increased/decreased (new parameter!)
• Add special logic to better handle inside corners
General Motor control / locomotion:
• Add slew-rate limiting to the motor command (to avoid reset due to over-current; don’t apply to slowing down, just for speeding up and changing direction)
o (10 per interval @ 50hz/20ms => 0.5s for full 0-255 PWM range)
General:
* add an API to start/stop a behavior & to wait for it to complete.
start_behavior(b, s1?) //start behavior b in state s1
start_behavior_and_wait(b, s1?, s2?) //start behavior b in state s1 and wait until it reaches s2
stop_behavior(b) //stop behavior b
get_behavior_state(b)
Resolved (for now) issues:
* IR_N and IR_FAR_N interfere with each other - need to mount at an offset AND need to point IR_FAR_N off-axis
(but this doesn't seem to interfere w/ dog detection)
Checklist
* sensor alignment. If the NW / NE sensors are misaligned, cornering gets messed up
Notes:
* BT1 Bluetooth module seems to have stopped working. It will pair, but can't exchange data. Using BT2 now.
motor command for turning:
1) gradually ramp up (at specified rate) to target speed
2) when we are <= 30degrees from the target, start ramping down to speed 15
3) when we are <= 10degrees from the target, apply target speed 5 (w/ feed forward) & regulate to maintain 5
3) when we are at the target, hit the brakes - full stop w/out ramping down
i2c 20x4 LCD:
5mA + 30mA for the backlight
123ms for 80 characters @ 100khz i2c speed (1540us per character)
55ms for 80 characters @ 400khz i2c speed (690us per character)
Arduino i2c speed is controlled by TWI_FREQ macro in twi.h; default is 100khz
How to fix the issue of USB serial port / bluetooth module being confused as a serial mouse:
Location: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\sermouse
Key: Start
Value: 3
Change Value to 4, which is Disabled and it will stop this problem occurring