Exemple #1
0
 def startServer(self):
     MapServer('0.0.0.0', 1234, self).start_server()
Exemple #2
0
 def __init__(self, slam, MAP_SIZE_PIXELS, vehicle):
     self.map_server = MapServer(slam, MAP_SIZE_PIXELS)
     self.control_server = ControlServer(vehicle)
import sys
import os
import random
import time
import datetime
import json
import copy

from mapserver import MapServer
from test_spec import TestSpec, testRanges, generate_list_of_perturbation_sequences

cp1_map_fp      = sys.argv[1]
test_spec_fold  = sys.argv[2]
map_server      = MapServer(cp1_map_fp)
waypoints       = list(map_server.get_waypoints()) # node-id of each waypoint
# exclude l11 and l12 from the list of waypoints 
for w in waypoints:
    if (w == "l11") or ( w == "l12"):
        waypoints.remove(w)

def create_test_spec(test_spec_fold, num_targets, power_model_ID, budget, levels, perturbations):
    global waypoints
    global map_server

    # Start location and target locations
    start_loc = random.choice(waypoints)
    # Waypoints could repeat in the list of targets
    # as long as they are not consective in the list.
    target_loc_list = []
    prev_loc = start_loc
    for _ in range(num_targets):