diff --git a/planning.py b/planning.py index 4c02c3d72..e31c8b3a3 100644 --- a/planning.py +++ b/planning.py @@ -524,7 +524,7 @@ def goal_test(kb, goals): if solution: return solution graphplan.graph.expand_graph() - if len(graphplan.graph.levels)>=2 and graphplan.check_leveloff(): + if len(graphplan.graph.levels) >=2 and graphplan.check_leveloff(): return None diff --git a/probability.py b/probability.py index a9f65fbb0..9b732edd7 100644 --- a/probability.py +++ b/probability.py @@ -653,6 +653,7 @@ def particle_filtering(e, N, HMM): # _________________________________________________________________________ ## TODO: Implement continuous map for MonteCarlo similar to Fig25.10 from the book + class MCLmap: """Map which provides probability distributions and sensor readings. Consists of discrete cells which are either an obstacle or empty""" @@ -679,7 +680,7 @@ def ray_cast(self, sensor_num, kin_state): # 0 # 3R1 # 2 - delta = ((sensor_num%2 == 0)*(sensor_num - 1), (sensor_num%2 == 1)*(2 - sensor_num)) + delta = ((sensor_num % 2 == 0)*(sensor_num - 1), (sensor_num % 2 == 1)*(2 - sensor_num)) # sensor direction changes based on orientation for _ in range(orient): delta = (delta[1], -delta[0])