def hat_map_test(): for s in directions_sequence(): for v in directions_sequence(): x1 = np.cross(s, v) x2 = +np.dot(hat_map(s), v) x3 = -np.dot(hat_map(v), s) assert_allclose(x1, x2) assert_allclose(x1, x3)
def compute_forces(self, commands): return hat_map(self.max_force * commands)
def compute_velocities(self, commands): return hat_map(self.max_angular_velocity * commands)