Another rewording

This commit is contained in:
Danny Staple
2023-01-21 20:04:14 +00:00
parent 7b894dd5a8
commit 7208a9472f
4 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -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]
+2 -2
View File
@@ -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(
+2 -2
View File
@@ -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(
+2 -2
View File
@@ -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(