Skip to content
Snippets Groups Projects
Commit 68d852b1 authored by rachelmoan's avatar rachelmoan
Browse files

Remove unused code

parent 91cf551e
No related branches found
No related tags found
No related merge requests found
...@@ -49,8 +49,7 @@ class MPC: ...@@ -49,8 +49,7 @@ class MPC:
# weight for error in control # weight for error in control
self.R = np.diag(input_cost) self.R = np.diag(input_cost)
self.P = np.diag(input_rate_cost) self.P = np.diag(input_rate_cost)
def get_linear_model_matrices_roomba(self,x_bar,u_bar): def get_linear_model_matrices_roomba(self,x_bar,u_bar):
""" """
Computes the approximated LTI state space model x' = Ax + Bu + C Computes the approximated LTI state space model x' = Ax + Bu + C
...@@ -98,7 +97,6 @@ class MPC: ...@@ -98,7 +97,6 @@ class MPC:
return A_lin, B_lin, C_lin return A_lin, B_lin, C_lin
def get_linear_model_matrices(self, x_bar, u_bar): def get_linear_model_matrices(self, x_bar, u_bar):
""" """
Computes the approximated LTI state space model x' = Ax + Bu + C Computes the approximated LTI state space model x' = Ax + Bu + C
...@@ -221,7 +219,6 @@ class MPC: ...@@ -221,7 +219,6 @@ class MPC:
solution = prob.solve(solver=opt.OSQP, warm_start=True, verbose=False) solution = prob.solve(solver=opt.OSQP, warm_start=True, verbose=False)
return x, u return x, u
if __name__ == "__main__": if __name__ == "__main__":
# Example usage: # Example usage:
dt = 0.1 dt = 0.1
......
...@@ -4,7 +4,7 @@ RRT implementation ...@@ -4,7 +4,7 @@ RRT implementation
import math import math
import numpy as np import numpy as np
from guided_mrmp.utils import Node, Env, Plotting from guided_mrmp.utils import Node, Env
class RRT: class RRT:
def __init__(self, env, s_start, s_goal, step_len, goal_sample_rate, iter_max): def __init__(self, env, s_start, s_goal, step_len, goal_sample_rate, iter_max):
...@@ -16,7 +16,7 @@ class RRT: ...@@ -16,7 +16,7 @@ class RRT:
self.sampled_vertices = [self.s_start] self.sampled_vertices = [self.s_start]
self.env = env self.env = env
self.plotting = Plotting(self.env) # self.plotting = Plotting(self.env)
# self.utils = utils.Utils() # self.utils = utils.Utils()
self.x_range = self.env.boundary[0] self.x_range = self.env.boundary[0]
......
""" """
RRT* RRT*
""" """
from guided_mrmp.utils import Node, Env, Plotting
from guided_mrmp.planners.singlerobot.RRT import RRT from guided_mrmp.planners.singlerobot.RRT import RRT
class RRTStar(RRT): class RRTStar(RRT):
......
from .conflict import Conflict from .conflict import Conflict
from .control import Roomba from .control import Roomba
from .environment import Node, Env from .environment import Node, Env
from .figures import Plotting
from .library import Library from .library import Library
from .robot import Robot from .robot import Robot
from .template_matcher import TemplateMatcher
from .helpers import * from .helpers import *
\ No newline at end of file
...@@ -61,10 +61,6 @@ class Env: ...@@ -61,10 +61,6 @@ class Env:
self.circle_obs = circle_obs self.circle_obs = circle_obs
self.rect_obs = rectangle_obs self.rect_obs = rectangle_obs
def update_obs(self, obs_cir, obs_bound, obs_rec):
self.circle_obs = obs_cir
self.obs_boundary = obs_bound
self.rect_obs = obs_rec
def get_obs_vertex(self): def get_obs_vertex(self):
delta = self.delta delta = self.delta
......
import numpy as np
class Robot: class Robot:
def __init__(self, label, color, radius, start, goal, target_v, T, DT, rrtpath,waypoints): def __init__(self, label, color, radius, start, goal, target_v, T, DT, rrtpath,waypoints):
self.label = label self.label = label
......
"""
Match a local nxm regiaon to its corresponding database tmeplate
"""
class TemplateMatcher:
def __init__(self,type, starts, goals):
"""
inputs:
- type (string): the type of subproblem
"""
self.type = type
self.starts = starts
self.goals = goals
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment