Skip to content

Commit

Permalink
Fix from_angles
Browse files Browse the repository at this point in the history
  • Loading branch information
Giulero committed Feb 23, 2022
1 parent 7cf4e1b commit 41c9b69
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/liecasadi/so3.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@ def as_euler(self):

@staticmethod
def qx(q: Angle) -> "SO3":
return SO3(xyzw=cs.vertcat(cs.cos(q / 2), cs.sin(q / 2), 0, 0))
return SO3(xyzw=cs.vertcat(cs.sin(q / 2), 0, 0, cs.cos(q / 2)))

@staticmethod
def qy(q: Angle) -> "SO3":
return SO3(xyzw=cs.vertcat(cs.cos(q / 2), 0, cs.sin(q / 2), 0))
return SO3(xyzw=cs.vertcat(0, cs.sin(q / 2), 0, cs.cos(q / 2)))

@staticmethod
def qz(q: Angle) -> "SO3":
return SO3(xyzw=cs.vertcat(cs.cos(q / 2), 0, 0, cs.sin(q / 2)))
return SO3(xyzw=cs.vertcat(0, 0, cs.sin(q / 2), cs.cos(q / 2)))

def inverse(self) -> "SO3":
return SO3(xyzw=self.quat.conjugate().coeffs())
Expand Down

0 comments on commit 41c9b69

Please sign in to comment.