Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove R_from_rpy(rpy) method #6

Merged
merged 8 commits into from
Nov 9, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions src/liecasadi/so3.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,6 @@ def inverse(self) -> "SO3":
def transpose(self) -> "SO3":
return SO3(xyzw=cs.vertcat(-self.quat.coeffs()[:3], self.quat.coeffs()[3]))

@staticmethod
def R_from_rpy(rpy) -> "SO3":
return SO3.Rz(rpy[2]) * SO3.Ry(rpy[1]) * SO3.Rx(rpy[0])

@staticmethod
def q_from_rpy(rpy) -> "SO3":
return SO3.qz(rpy[2]) * SO3.qy(rpy[1]) * SO3.qx(rpy[0])
Expand Down Expand Up @@ -138,7 +134,7 @@ def quaternion_derivative(
).coeffs()

@staticmethod
def product(q1: Quaternion, q2: Quaternion) -> Quaternion:
def product(q1: Vector, q2: Vector) -> Vector:
p1 = q1[3] * q2[3] - cs.dot(q1[:3], q2[:3])
p2 = q1[3] * q2[:3] + q2[3] * q1[:3] + cs.cross(q1[:3], q2[:3])
return cs.vertcat(p2, p1)
Expand Down