Fixed comments for clarity (Issue #15)

This commit is contained in:
spencerfolk
2025-01-20 12:36:00 -05:00
parent 68ad764727
commit 317ffbb5d6
2 changed files with 2 additions and 2 deletions

View File

@@ -62,7 +62,7 @@ class SE3Control(object):
k = self.k_m/self.k_eta # Ratio of torque to thrust coefficient. k = self.k_m/self.k_eta # Ratio of torque to thrust coefficient.
# Below is an automated generation of the control allocator matrix. It assumes that all thrust vectors are aligned # Below is an automated generation of the control allocator matrix. It assumes that all thrust vectors are aligned
# with the z axis and that the "sign" of each rotor yaw moment alternates starting with positive for r1. 'TM' = "thrust and moments" # with the z axis.
self.f_to_TM = np.vstack((np.ones((1,self.num_rotors)), self.f_to_TM = np.vstack((np.ones((1,self.num_rotors)),
np.hstack([np.cross(self.rotor_pos[key],np.array([0,0,1])).reshape(-1,1)[0:2] for key in self.rotor_pos]), np.hstack([np.cross(self.rotor_pos[key],np.array([0,0,1])).reshape(-1,1)[0:2] for key in self.rotor_pos]),
(k * self.rotor_dir).reshape(1,-1))) (k * self.rotor_dir).reshape(1,-1)))

View File

@@ -118,7 +118,7 @@ class Multirotor(object):
k = self.k_m/self.k_eta # Ratio of torque to thrust coefficient. k = self.k_m/self.k_eta # Ratio of torque to thrust coefficient.
# Below is an automated generation of the control allocator matrix. It assumes that all thrust vectors are aligned # Below is an automated generation of the control allocator matrix. It assumes that all thrust vectors are aligned
# with the z axis and that the "sign" of each rotor yaw moment alternates starting with positive for r1. # with the z axis.
self.f_to_TM = np.vstack((np.ones((1,self.num_rotors)),np.hstack([np.cross(self.rotor_pos[key],np.array([0,0,1])).reshape(-1,1)[0:2] for key in self.rotor_pos]), (k * self.rotor_dir).reshape(1,-1))) self.f_to_TM = np.vstack((np.ones((1,self.num_rotors)),np.hstack([np.cross(self.rotor_pos[key],np.array([0,0,1])).reshape(-1,1)[0:2] for key in self.rotor_pos]), (k * self.rotor_dir).reshape(1,-1)))
self.TM_to_f = np.linalg.inv(self.f_to_TM) self.TM_to_f = np.linalg.inv(self.f_to_TM)