mirror of
https://github.com/apirrone/Open_Duck_Mini_Runtime.git
synced 2025-09-03 03:33:54 +00:00
aze
This commit is contained in:
parent
37e46c00bd
commit
4ef0ec75fe
1 changed files with 3 additions and 2 deletions
|
@ -150,8 +150,9 @@ class Imu:
|
|||
euler = R.from_quat(self.last_imu_data["orientation"]).as_euler("xyz")
|
||||
self.last_imu_data["orientation"] = euler
|
||||
elif as_mat:
|
||||
mat = R.from_quat(self.last_imu_data["orientation"]).as_matrix()
|
||||
self.last_imu_data["orientation"] = mat
|
||||
if self.last_imu_data["orientation"].shape != (3, 3):
|
||||
mat = R.from_quat(self.last_imu_data["orientation"]).as_matrix()
|
||||
self.last_imu_data["orientation"] = mat
|
||||
|
||||
return self.last_imu_data
|
||||
|
||||
|
|
Loading…
Reference in a new issue