def __init__(self, in_sim=True): BaseController.__init__(self, "Minimal controller for autonomy") self.in_sim = in_sim # 5 kg f ~ 50 N # https://bluerobotics.com/store/thrusters/t100-t200-thrusters/t200-thruster/ self.f_max = 50 self.boat_mass = 5 self.boat_width = 0.5 self.a_max = 2 * self.f_max / self.boat_mass self.max_alpha_mag = 6 * self.f_max / (self.boat_mass * self.boat_width) print(f"A MAX: {self.a_max}") print(f"ALPHA MAX: {self.max_alpha_mag}") self.accelerated = 50 self.running_error = 0 self.i_constant = 5e-6 self.last_dist = None self.accumulator = 0 self.a_constant = 5e-6 self.a_rate = 50 self.curr_waypoint = 0 self.last_accel = None self.last_alpha = None
def __init__(self, in_sim=True, print_info=True): BaseController.__init__(self, "slsqp", in_sim) self.in_sim = in_sim self.f_max = 50 self.boat_mass = 5 self.boat_width = 0.5 self.a_max = 2 * self.f_max / (self.boat_mass) self.max_alpha_mag = 6 * self.f_max / (self.boat_mass * self.boat_width) self.curr_waypoint = 0 self.print_info = print_info self.last_a = 0 self.last_alpha = 0 self.last_dist = None self.accumulator = 0 self.a_rate = 50 self.a_constant = 5e-6 self.vel_penalty = 7.5e-4 self.ang_vel_penalty = 7.5e-4 self.last_state = None
def __init__(self, window: pyglet.window.Window, scene: Scene): BaseController.__init__(self, window, scene) self._objects = Objects(self._scene) self._paused = False self.game_over = False self._draw_grid() self._draw_boundaries()
def __init__(self): BaseController.__init__(self, "Complementary Filter Test", handle_quit=False) self.filt = ComplementaryFilter(0.99) self.lastGyro = 0 self.lastMag = 0 self.lastPub = 0
def __init__(self, in_sim=True): BaseController.__init__(self, "Minimal controller for autonomy") self.in_sim = in_sim # 5 kg f ~ 50 N # https://bluerobotics.com/store/thrusters/t100-t200-thrusters/t200-thruster/ self.f_max = 50 self.boat_mass = 5 self.boat_width = 1 self.a_max = 2 * self.f_max / self.boat_mass self.max_alpha_mag = 6 * self.f_max / (self.boat_mass * self.boat_width) self.accelerated = 50 self.running_error = 0 self.i_constant = 5e-6 self.curr_waypoint = 0 self.df = pd.DataFrame(columns="theta_i, ang_vel, x_targ, x_curr, y_targ, y_curr, v_i, v_cx, v_cy, accel_init, alpha_init, accel_solved, alpha_solved".split(', '))
def __init__(self, in_sim=True, print_info=True): BaseController.__init__(self, "minimal", in_sim) self.in_sim = in_sim # 5 kg f ~ 50 N # https://bluerobotics.com/store/thrusters/t100-t200-thrusters/t200-thruster/ self.f_max = 50 self.boat_mass = 5 self.boat_width = 1 self.a_max = 2 * self.f_max / self.boat_mass self.max_alpha_mag = 6 * self.f_max / (self.boat_mass * self.boat_width) self.accelerated = 50 self.running_error = 0 self.i_constant = 4e-6 self.curr_waypoint = 0 self.print_info = print_info
def __init__(self, in_sim=True, print_info=True): BaseController.__init__(self, "voronoi_planning") self.in_sim = in_sim self.f_max = 50 self.boat_mass = 5 self.boat_width = 0.5 self.a_max = 2 * self.f_max / (self.boat_mass) self.max_alpha_mag = 6 * self.f_max / (self.boat_mass * self.boat_width) self.curr_waypoint = 0 self.print_info = print_info self.p_scale = np.array([0.25, 0, 1.5]).reshape(3, 1) self.path = [] self.voronoi_graph = None
def __init__(self, in_sim=True, print_info=True): BaseController.__init__(self, "d star planning", handle_quit=False) self.in_sim = in_sim self.f_max = 50 self.boat_mass = 5 self.boat_width = 0.5 self.a_max = 2 * self.f_max / (self.boat_mass) self.max_alpha_mag = 6 * self.f_max / (self.boat_mass * self.boat_width) self.curr_waypoint = 0 self.goal_state = None self.rhs_vals = {} self.g_vals = {} self.c_vals = {} self.intialized = False
def __init__(self, in_sim=True, print_info=True): BaseController.__init__(self, "planning", handle_quit=False) self.in_sim = in_sim self.f_max = 50 self.boat_mass = 5 self.boat_width = 0.5 self.a_max = 2 * self.f_max / (self.boat_mass) self.max_alpha_mag = 6 * self.f_max / (self.boat_mass * self.boat_width) self.curr_waypoint = 0 self.print_info = print_info self.p_scale = np.array([1.5, 0, 1.5]).reshape(3, 1) self.grid_size = 1 # lng and lat of start pos self.start_lon = None self.start_lat = None # currently planned path self.path = [] self.max_evals = 200 # do we need to redraw the path self.replot = False self.subgoal_idx = 0 # the last subgoal we were working towards self.last_subgoal_idx = 0 # how far to keep away from obstacles self.clearance = 2 * BOAT_HEIGHT
def __init__(self, in_sim=True, print_info=True): BaseController.__init__(self, "pid", handle_quit=False) self.in_sim = in_sim self.f_max = 50 self.boat_mass = 5 self.boat_width = 0.5 self.a_max = 2 * self.f_max / (self.boat_mass) self.max_alpha_mag = 6 * self.f_max / (self.boat_mass * self.boat_width) self.curr_waypoint = 0 self.p_scale = np.array([1, 0, 1]).reshape(3, 1) self.i_scale = np.array([5e-5, 0, 5e-5]).reshape(3, 1) self.last_dist = None self.last_angle = None self.running_dist_err = 0 self.running_angle_err = 0 self.print_info = print_info
def __init__(self, in_sim=True, print_info=True): BaseController.__init__(self, "planning") self.in_sim = in_sim self.f_max = 50 self.boat_mass = 5 self.boat_width = 0.5 self.a_max = 2 * self.f_max / (self.boat_mass) self.max_alpha_mag = 6 * self.f_max / (self.boat_mass * self.boat_width) self.curr_waypoint = 0 self.print_info = print_info self.start_x = None self.start_y = None self.path = None self.cmd_idx = 0 self.cmd_start_t = 0 self.delta_t = 1
def __init__(self, in_sim=True): BaseController.__init__(self, "Keyboard Controller", handle_quit=False) self.curr_waypoint = 0 self.in_sim = in_sim
def __init__(self): BaseController.__init__(self, "Empty Autonomy Controller")
def __init__(self, in_sim=True): BaseController.__init__(self, "SETest", handle_quit=False) self.curr_waypoint = 0 self.in_sim = in_sim self.complementary_filter = ComplementaryFilter(new_reading_weight=0.9)