Another rewording
This commit is contained in:
@@ -102,7 +102,7 @@ class Simulation:
|
||||
rot2 = rot1
|
||||
return rot1, arc_length, rot2
|
||||
|
||||
def apply_motion_to_poses(self, rot1, trans, rot2):
|
||||
def move_poses(self, rot1, trans, rot2):
|
||||
self.poses[:,2] += rot1
|
||||
rot1_radians = np.radians(self.poses[:,2])
|
||||
self.poses[:,0] += trans * np.cos(rot1_radians)
|
||||
@@ -121,7 +121,7 @@ class Simulation:
|
||||
self.last_encoder_left = new_encoder_left
|
||||
self.last_encoder_right = new_encoder_right
|
||||
|
||||
self.apply_motion_to_poses(rot1, trans, rot2)
|
||||
self.move_poses(rot1, trans, rot2)
|
||||
print(
|
||||
json.dumps(
|
||||
[self.poses.tolist(), rot1, trans, rot2]
|
||||
|
||||
@@ -107,7 +107,7 @@ class Simulation:
|
||||
rot2 = rot1
|
||||
return rot1, arc_length, rot2
|
||||
|
||||
def apply_motion_to_poses(self, rot1, trans, rot2):
|
||||
def move_poses(self, rot1, trans, rot2):
|
||||
self.poses[:,2] += rot1
|
||||
rot1_radians = np.radians(self.poses[:,2])
|
||||
self.poses[:,0] += trans * np.cos(rot1_radians)
|
||||
@@ -136,7 +136,7 @@ class Simulation:
|
||||
self.last_encoder_right = new_encoder_right
|
||||
|
||||
rot1_model, trans_model, rot2_model = self.randomise_motion(rot1, trans, rot2)
|
||||
self.apply_motion_to_poses(rot1_model, trans_model, rot2_model)
|
||||
self.move_poses(rot1_model, trans_model, rot2_model)
|
||||
|
||||
print(
|
||||
json.dumps(
|
||||
|
||||
@@ -125,7 +125,7 @@ class Simulation:
|
||||
rot2 = rot1
|
||||
return rot1, arc_length, rot2
|
||||
|
||||
def apply_motion_to_poses(self, rot1, trans, rot2):
|
||||
def move_poses(self, rot1, trans, rot2):
|
||||
self.poses[:,2] += rot1
|
||||
rot1_radians = np.radians(self.poses[:,2])
|
||||
self.poses[:,0] += trans * np.cos(rot1_radians)
|
||||
@@ -154,7 +154,7 @@ class Simulation:
|
||||
self.last_encoder_right = new_encoder_right
|
||||
|
||||
rot1_model, trans_model, rot2_model = self.randomise_motion(rot1, trans, rot2)
|
||||
self.apply_motion_to_poses(rot1_model, trans_model, rot2_model)
|
||||
self.move_poses(rot1_model, trans_model, rot2_model)
|
||||
|
||||
print(
|
||||
json.dumps(
|
||||
|
||||
@@ -125,7 +125,7 @@ class Simulation:
|
||||
rot2 = rot1
|
||||
return rot1, arc_length, rot2
|
||||
|
||||
def apply_motion_to_poses(self, rot1, trans, rot2):
|
||||
def move_poses(self, rot1, trans, rot2):
|
||||
self.poses[:,2] += rot1
|
||||
rot1_radians = np.radians(self.poses[:,2])
|
||||
self.poses[:,0] += trans * np.cos(rot1_radians)
|
||||
@@ -154,7 +154,7 @@ class Simulation:
|
||||
self.last_encoder_right = new_encoder_right
|
||||
|
||||
rot1_model, trans_model, rot2_model = self.randomise_motion(rot1, trans, rot2)
|
||||
self.apply_motion_to_poses(rot1_model, trans_model, rot2_model)
|
||||
self.move_poses(rot1_model, trans_model, rot2_model)
|
||||
|
||||
print(
|
||||
json.dumps(
|
||||
|
||||
Reference in New Issue
Block a user