Skip to content

Commit ce1fa0f

Browse files
committed
Fixing queue length checking
1 parent a5aad31 commit ce1fa0f

File tree

2 files changed

+15
-16
lines changed

2 files changed

+15
-16
lines changed

Mapping/lidar_to_grid_map/lidar_to_grid_map.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

Mapping/lidar_to_grid_map/lidar_to_grid_map_tutorial.ipynb

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
},
1919
{
2020
"cell_type": "code",
21-
"execution_count": 2,
21+
"execution_count": 1,
2222
"metadata": {},
2323
"outputs": [],
2424
"source": [
@@ -37,7 +37,7 @@
3737
},
3838
{
3939
"cell_type": "code",
40-
"execution_count": 3,
40+
"execution_count": 2,
4141
"metadata": {},
4242
"outputs": [],
4343
"source": [
@@ -66,7 +66,7 @@
6666
},
6767
{
6868
"cell_type": "code",
69-
"execution_count": 4,
69+
"execution_count": 3,
7070
"metadata": {},
7171
"outputs": [
7272
{
@@ -104,7 +104,7 @@
104104
},
105105
{
106106
"cell_type": "code",
107-
"execution_count": 35,
107+
"execution_count": 4,
108108
"metadata": {},
109109
"outputs": [
110110
{
@@ -133,7 +133,7 @@
133133
},
134134
{
135135
"cell_type": "code",
136-
"execution_count": 36,
136+
"execution_count": 5,
137137
"metadata": {},
138138
"outputs": [
139139
{
@@ -170,7 +170,7 @@
170170
},
171171
{
172172
"cell_type": "code",
173-
"execution_count": 37,
173+
"execution_count": 6,
174174
"metadata": {},
175175
"outputs": [],
176176
"source": [
@@ -184,7 +184,7 @@
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",
@@ -218,7 +218,7 @@
218218
},
219219
{
220220
"cell_type": "code",
221-
"execution_count": 38,
221+
"execution_count": 7,
222222
"metadata": {},
223223
"outputs": [
224224
{
@@ -243,23 +243,22 @@
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
{

0 commit comments

Comments
 (0)