本文整理匯總了Python中markov.Markov.current_estimate方法的典型用法代碼示例。如果您正苦於以下問題:Python Markov.current_estimate方法的具體用法?Python Markov.current_estimate怎麽用?Python Markov.current_estimate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類markov.Markov
的用法示例。
在下文中一共展示了Markov.current_estimate方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: load_map
# 需要導入模塊: from markov import Markov [as 別名]
# 或者: from markov.Markov import current_estimate [as 別名]
world = load_map("assets/test_plattegrond.txt")
robot = None
# Verbind met de robot Kies tussen echte of gesimuleerde robot
if SIMULATION:
robot = Robot()
else:
robot = HistogramFilter(world, 6, 4, start_orientation)
robot.draw()
robot.connect_color()
markov = Markov(world, start_orientation, "rddesmit")
found = False
while not found:
location = markov.current_estimate()
destination = (1, 1)
# drive
robot.drive(0.10)
markov.move()
# rotate
direction = Orientation.calculate_direction((location[1], location[2]), destination)
while direction != markov._orientation:
rotate_direction = Orientation.rotate(markov._orientation, direction)
if rotate_direction == Orientation.LEFT:
markov.rotate_left()
robot.turn_left()
time.sleep(3)