Files
PathPlanning/Search-based Planning/__pycache__/environment.cpython-37.pyc
T

18 lines
1.5 KiB
Plaintext
Raw Normal View History

2020-06-16 14:07:58 -07:00
B
2020-06-18 10:56:12 -07:00
FŸë^zã@s4dZddlZd\ZZddddgZdd „Zd
d ZdS) z
@author: huiming zhou
éN)é2é)ér)éÿÿÿÿr)rr)rrcCsddttƒDƒ}x8ttƒD],}dddg|d|<dddg|td|<qWx8ttƒD],}dddg||d<dddg||td<qVWx$tddƒD]}dddg|d|<qWxVtdƒD]J}dddg|td|d <dddg||dd<dddg||dd
<q¶W|S) zM
Design the obstacles' positions.
:return: the map of obstacles.
cSsg|]}ddttƒDƒqS)cSsg|]}dddgqS)gð?©)Ú.0ÚxrrúBC:\Users\Huiming Zhou\Desktop\Search-based Planning\environment.pyú
<listcomp>sz(obstacles.<locals>.<listcomp>.<listcomp>)ÚrangeÚcol)rÚyrrr r
szobstacles.<locals>.<listcomp>grré
ééré()r Úrowr )Ú
backgroundÚirrr Ú obstacles
s rcCs^t ttf¡}tƒ}xDttƒD]8}x2ttƒD]&}|||dddgkr,d|||<q,WqW|S)
Using a matrix to represent the position of obstacles,
which is used for obstacle detection.
:return: a matrix, in which '1' represents obstacle.
gr)ÚnpÚzerosr rrr )Úobs_mapZpos_maprrrrr Úmap_obs$sr)Ú__doc__Únumpyrr rÚmotionsrrrrrr Ú<module>s