# val = range(10,60,10) # for i in val: # drunkWalkCase(i) def drunkWalkCase(i): # case = Case("DrunkWalk") # case.cov_algo = "drunkwalk" # case.start = [4,4] # case.end = [46,46] # case = Case("DrunkWalk_PProbe", "./ArenaMaps/7room_slam_map_small.bmp") # case.cov_algo = "drunkwalk_pprobe" case = Case("DrunkWalk_BiasedRandom", "./ArenaMaps/7room_slam_map_small.bmp") #case = Case("DrunkWalk_BiasedRandom", "./ArenaMaps/7room_slam_map.bmp") case.cov_algo = "drunkwalk_biased" # case = Case("DrunkWalk_BiasedRandom", "./ArenaMaps/6room_map_small/6room_map.bmp") # case.cov_algo = "drunkwalk_biased" case.goal_graph = goalgraph.GoalGraph() case.num_explorers = 6 #10 case.num_anchors = 4 #5 # Noises case.noise_radio = 0.5 case.noise_turn = 0.2 case.noise_velocity = 0.2 case.noise_mag = 20
import numpy as np from Sim.case import Case import sys, traceback import scipy.io import progressbar as pb # import time import os def main(): print "Running SugarMapSim" drunkWalkCase(0) def drunkWalkCase(i): case = Case("DrunkWalk", "./ArenaMaps/testbed.bmp") case.cov_algo = "drunkwalk" case.start = [1,1] case.end = [5,8] # case = Case("DrunkWalk_Maps", "./ArenaMaps/7room_slam_map_small.bmp") # case.cov_algo = "drunkwalk_biased" # # # case = Case("DrunkWalk_BiasedRandom", "./ArenaMaps/6room_map_small/6room_map.bmp") # # case.cov_algo = "drunkwalk_biased" # case.goal_graph = goalgraph.GoalGraph() case.num_explorers = 4 case.num_anchors = 6 # Noises
def drunkWalkCase(i): case = Case("DrunkWalk", "./ArenaMaps/testbed.bmp") case.cov_algo = "drunkwalk" case.start = [1,1] case.end = [5,8] # case = Case("DrunkWalk_Maps", "./ArenaMaps/7room_slam_map_small.bmp") # case.cov_algo = "drunkwalk_biased" # # # case = Case("DrunkWalk_BiasedRandom", "./ArenaMaps/6room_map_small/6room_map.bmp") # # case.cov_algo = "drunkwalk_biased" # case.goal_graph = goalgraph.GoalGraph() case.num_explorers = 4 case.num_anchors = 6 # Noises case.noise_radio = 0.5 case.noise_turn = 0.2 case.noise_velocity = 0.2 case.noise_mag = 30 case.fail_prob = 0 case.rf_signature_db = [] # Particle filter settings case.stop_on_all_covered = True case.num_particles = 100 # Display case.is_display_on_real = False # Run case case.num_total_run = 360 case.max_iterations = 5 case.deltick = 1 runCase(case)
def drunkWalkCase(i): # case = Case("DrunkWalk") # case.cov_algo = "drunkwalk" # case.start = [4,4] # case.end = [46,46] case = Case("DrunkWalk_BiasedRandom", "./ArenaMaps/6room_map_small/6room_map.bmp") case.cov_algo = "drunkwalk_biased" case.goal_graph = goalgraph.GoalGraph() case.num_explorers = i case.num_anchors = 5 # Noises case.noise_radio = 0.5 case.noise_turn = 0.2 case.noise_velocity = 0.2 case.noise_mag = 20 case.fail_prob = 0 # Particle filter settings case.stop_on_all_covered = True case.num_particles = 100 # Display case.is_display_on_real = False # Run case case.num_total_run = 1000 case.max_iterations = 10 case.deltick = 1 runCase(case)
# val = range(10,60,10) # for i in val: # drunkWalkCase(i) def drunkWalkCase(i): # case = Case("DrunkWalk") # case.cov_algo = "drunkwalk" # case.start = [4,4] # case.end = [46,46] # case = Case("DrunkWalk_PProbe", "./ArenaMaps/7room_slam_map_small.bmp") # case.cov_algo = "drunkwalk_pprobe" case = Case("DrunkWalk_BiasedRandom_13room", "./ArenaMaps/13room_slam_map/nsh_level_a.bmp") case.cov_algo = "drunkwalk_biased" # case = Case("DrunkWalk_BiasedRandom", "./ArenaMaps/6room_map_small/6room_map.bmp") # case.cov_algo = "drunkwalk_biased" case.goal_graph = goalgraph.GoalGraph() case.num_explorers = 10 case.num_anchors = 5 # Noises case.noise_radio = 0.5 case.noise_turn = 0.2 case.noise_velocity = 0.2 case.noise_mag = 20 case.fail_prob = 0
# for i in val: # drunkWalkCase(i) val = range(5, 26, 5) for i in val: drunkWalkCase(i) def drunkWalkCase(i): # case = Case("DrunkWalk") # case.cov_algo = "drunkwalk" # case.start = [4,4] # case.end = [46,46] case = Case("DrunkWalk_BiasedRandom", "./ArenaMaps/6room_map_small/6room_map.bmp") case.cov_algo = "drunkwalk_biased" case.goal_graph = goalgraph.GoalGraph() case.num_explorers = i case.num_anchors = 5 # Noises case.noise_radio = 0.5 case.noise_turn = 0.2 case.noise_velocity = 0.2 case.noise_mag = 20 case.fail_prob = 0 # Particle filter settings case.stop_on_all_covered = True
# for i in val: # drunkWalkCase(i) val = range(1,11,2) for i in val: drunkWalkCase(i) def drunkWalkCase(i): # case = Case("DrunkWalk") # case.cov_algo = "drunkwalk" # case.start = [4,4] # case.end = [46,46] case = Case("DrunkWalk_FingerPrint", "./ArenaMaps/6room_map_small/6room_map.bmp") case.cov_algo = "drunkwalk_biased" case.goal_graph = goalgraph.GoalGraph() case.num_explorers = 10 case.num_anchors = 5 # Noises case.noise_radio = i case.noise_turn = 0.2 case.noise_velocity = 0.2 case.noise_mag = 30 case.fail_prob = 0 # Particle filter settings
def drunkWalkCase(i): #def drunkWalkCase(): print "running DrunkWalk" case = Case("DrunkWalk", "./ArenaMaps/testbed" + mapsize + ".bmp") case.cov_algo = "drunkwalk" case.start = [1,1] case.end = [25,30]#[8,11]#[25,25] # case.map_array[case.end[0],case.end[1]] = 2 # added by xinlei #case.map_array[25,26] = 2 # added by xinlei #case.map_array[25,24] = 2 # added by xinlei #case.map_array[24,24] = 2 # added by xinlei #case.map_array[24,25] = 2 # added by xinlei #case.map_array[24,26] = 2 # added by xinlei #case.map_array[26,26] = 2 # added by xinlei #case.map_array[26,24] = 2 # added by xinlei #case.map_array[26,25] = 2 # added by xinlei # case = Case("DrunkWalk_Maps", "./ArenaMaps/7room_slam_map_small.bmp") # case.cov_algo = "drunkwalk_biased" # # # case = Case("DrunkWalk_BiasedRandom", "./ArenaMaps/6room_map_small/6room_map.bmp") # # case.cov_algo = "drunkwalk_biased" # case.goal_graph = goalgraph.GoalGraph() case.num_explorers = 1#1 case.num_anchors =6#3#6 # Noises case.noise_radio = 0.01#0.1 case.noise_turn = 0.2 case.noise_velocity = 0.2 case.noise_mag = 30 case.fail_prob = 0 # Import the database of collected RF signatures ''' raw = np.loadtxt("./ArenaMaps/testbed_sigs/sensorfly_x_y_time_id_rss.txt", delimiter=','); #raw = np.loadtxt("./ArenaMaps/testbed_sigs/fingerprint36*27.txt", delimiter=','); for i in range(0,9): for j in range(0,12): idxX = raw[:,0] == i idxY = raw[:,1] == j idx = idxX & idxY id_sigs = raw[idx,:][:,[2,3]] for k in range(1, case.num_anchors+1): idxK = id_sigs[:,0] == k if idxK.size != 0: rss = id_sigs[idxK,1] else: rss = np.array([0]) case.rf_signature_db[(i,j,k)] = rss ''' # Particle filter settings case.stop_on_all_covered = True case.num_particles = 100 # Display case.is_display_on_real = False # Run case case.num_total_run = 14000#360 case.max_iterations = 1#5 case.deltick = 1 runCase(case)