mirror of
https://github.com/apirrone/Open_Duck_Mini_Runtime.git
synced 2025-09-03 03:33:54 +00:00
update
This commit is contained in:
parent
8e799fb52a
commit
82a176af16
1 changed files with 2 additions and 2 deletions
|
@ -95,7 +95,7 @@ class Imu:
|
||||||
print("imu_calib_data.pkl not found")
|
print("imu_calib_data.pkl not found")
|
||||||
print("Imu is running uncalibrated")
|
print("Imu is running uncalibrated")
|
||||||
|
|
||||||
self.last_imu_data = [0, 0, 0, 0]
|
self.last_imu_data = {"orientation": [0, 0, 0, 0], "gyro": [0, 0, 0]}
|
||||||
self.imu_queue = Queue(maxsize=1)
|
self.imu_queue = Queue(maxsize=1)
|
||||||
Thread(target=self.imu_worker, daemon=True).start()
|
Thread(target=self.imu_worker, daemon=True).start()
|
||||||
|
|
||||||
|
@ -159,7 +159,7 @@ if __name__ == "__main__":
|
||||||
# imu = Imu(50, upside_down=False)
|
# imu = Imu(50, upside_down=False)
|
||||||
while True:
|
while True:
|
||||||
data = imu.get_data()
|
data = imu.get_data()
|
||||||
# print(data)
|
print(data)
|
||||||
print("gyro", np.around(data["gyro"], 3))
|
print("gyro", np.around(data["gyro"], 3))
|
||||||
print("orientation", np.around(data["orientation"], 3))
|
print("orientation", np.around(data["orientation"], 3))
|
||||||
print("---")
|
print("---")
|
||||||
|
|
Loading…
Reference in a new issue