Skip to content
Snippets Groups Projects
Commit 470eedca authored by rachelmoan's avatar rachelmoan
Browse files

Save the tree to the robot class object and load the radius from the settings file

parent 83558624
No related branches found
No related tags found
No related merge requests found
...@@ -41,6 +41,7 @@ class Roomba(ControlSpace): ...@@ -41,6 +41,7 @@ class Roomba(ControlSpace):
self.max_d_acc = settings['Roomba']['max_d_acc'] self.max_d_acc = settings['Roomba']['max_d_acc']
self.max_steer = np.radians(settings['Roomba']['max_steer']) self.max_steer = np.radians(settings['Roomba']['max_steer'])
self.max_d_steer = np.radians(settings['Roomba']['max_d_steer']) self.max_d_steer = np.radians(settings['Roomba']['max_d_steer'])
self.radius = settings['Roomba']['radius']
def state_dimension(self): def state_dimension(self):
# State is [x, y, theta] # State is [x, y, theta]
......
import numpy as np import numpy as np
class Robot: class Robot:
def __init__(self, label, color, radius, start, goal, dynamics_model, target_v, rrtpath,waypoints): def __init__(self, label, color, radius, start, goal, dynamics_model, target_v, rrtpath,waypoints, tree):
self.label = label self.label = label
self.color = color self.color = color
self.radius = radius self.radius = radius
...@@ -12,6 +12,7 @@ class Robot: ...@@ -12,6 +12,7 @@ class Robot:
self.rrtpath = rrtpath self.rrtpath = rrtpath
self.dynamics_model = dynamics_model self.dynamics_model = dynamics_model
self.waypoints = waypoints self.waypoints = waypoints
self.tree = tree
self.last_mpc_trajectory = None self.last_mpc_trajectory = None
self.last_mpc_controls = None self.last_mpc_controls = None
......
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