File tree Expand file tree Collapse file tree 2 files changed +15
-16
lines changed
Mapping/lidar_to_grid_map Expand file tree Collapse file tree 2 files changed +15
-16
lines changed Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ def flood_fill(cpoint, pmap):
126126 sx , sy = pmap .shape
127127 fringe = deque ()
128128 fringe .appendleft (cpoint )
129- while len ( fringe ) > 0 :
129+ while fringe :
130130 n = fringe .pop ()
131131 nx , ny = n
132132 # West
Original file line number Diff line number Diff line change 1818 },
1919 {
2020 "cell_type" : " code" ,
21- "execution_count" : 2 ,
21+ "execution_count" : 1 ,
2222 "metadata" : {},
2323 "outputs" : [],
2424 "source" : [
3737 },
3838 {
3939 "cell_type" : " code" ,
40- "execution_count" : 3 ,
40+ "execution_count" : 2 ,
4141 "metadata" : {},
4242 "outputs" : [],
4343 "source" : [
6666 },
6767 {
6868 "cell_type" : " code" ,
69- "execution_count" : 4 ,
69+ "execution_count" : 3 ,
7070 "metadata" : {},
7171 "outputs" : [
7272 {
104104 },
105105 {
106106 "cell_type" : " code" ,
107- "execution_count" : 35 ,
107+ "execution_count" : 4 ,
108108 "metadata" : {},
109109 "outputs" : [
110110 {
133133 },
134134 {
135135 "cell_type" : " code" ,
136- "execution_count" : 36 ,
136+ "execution_count" : 5 ,
137137 "metadata" : {},
138138 "outputs" : [
139139 {
170170 },
171171 {
172172 "cell_type" : " code" ,
173- "execution_count" : 37 ,
173+ "execution_count" : 6 ,
174174 "metadata" : {},
175175 "outputs" : [],
176176 "source" : [
184184 " sx, sy = pmap.shape\n " ,
185185 " fringe = deque()\n " ,
186186 " fringe.appendleft(cpoint)\n " ,
187- " while len( fringe)>0 :\n " ,
187+ " while fringe:\n " ,
188188 " n = fringe.pop()\n " ,
189189 " nx, ny = n\n " ,
190190 " # West\n " ,
218218 },
219219 {
220220 "cell_type" : " code" ,
221- "execution_count" : 38 ,
221+ "execution_count" : 7 ,
222222 "metadata" : {},
223223 "outputs" : [
224224 {
243243 ]
244244 },
245245 {
246- "cell_type" : " code" ,
247- "execution_count" : null ,
246+ "cell_type" : " markdown" ,
248247 "metadata" : {},
249- "outputs" : [],
250- "source" : []
248+ "source" : [
249+ " Let's use this flood fill on real data:"
250+ ]
251251 },
252252 {
253253 "cell_type" : " code" ,
254- "execution_count" : 39 ,
254+ "execution_count" : 8 ,
255255 "metadata" : {},
256256 "outputs" : [
257257 {
258258 "name" : " stdout" ,
259259 "output_type" : " stream" ,
260260 "text" : [
261- " The grid map is 150 x 100 .\n " ,
262- " 150 100\n "
261+ " The grid map is 150 x 100 .\n "
263262 ]
264263 },
265264 {
You can’t perform that action at this time.
0 commit comments