You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To support spatial positioning directly from the Raspberry Pi I have added an MPU6050 module, which is the same as is currently used in the body PCB of the Buddy release.
The script is functioning, however there is frequently an error that blocks the continuation of the script:
Reading Data of Gyroscope and Accelerometer
Gx=-0.23 °/s Gy=-0.12 °/s Gz=0.17 °/s Ax=1.05 g Ay=-0.03 g Az=-0.20 g
Gx=-0.22 °/s Gy=-0.12 °/s Gz=0.15 °/s Ax=1.05 g Ay=-0.02 g Az=-0.18 g
Gx=-0.22 °/s Gy=-0.11 °/s Gz=0.15 °/s Ax=1.05 g Ay=-0.03 g Az=-0.18 g
Traceback (most recent call last):
File "/home/cm5/modular-biped/main.py", line 102, in <module>
main()
File "/home/cm5/modular-biped/main.py", line 29, in main
module_instances = loader.load_modules()
^^^^^^^^^^^^^^^^^^^^^
File "/home/cm5/modular-biped/module_loader.py", line 68, in load_modules
instance = getattr(mod, module_name)(**instance_config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cm5/modular-biped/modules/mpu6050.py", line 44, in __init__
self.read_data()
File "/home/cm5/modular-biped/modules/mpu6050.py", line 65, in read_data
acc_x = self.read_raw_data(ACCEL_XOUT_H)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/cm5/modular-biped/modules/mpu6050.py", line 48, in read_raw_data
high = self.bus.read_byte_data(self.Device_Address, addr)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: [Errno 121] Remote I/O error
It seems that the more frequent the data is checked, the more likely the error is to take place.
This post suggested adding a delay, but this is not practical for real-time measurement.
For now I have handled and ignored any errors of that type: 19f57c6
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
To support spatial positioning directly from the Raspberry Pi I have added an MPU6050 module, which is the same as is currently used in the body PCB of the Buddy release.
Guide
My wiring deviates slightly from this as the module is powered with 3v.
Full commit
The script is functioning, however there is frequently an error that blocks the continuation of the script:
It seems that the more frequent the data is checked, the more likely the error is to take place.
This post suggested adding a delay, but this is not practical for real-time measurement.
For now I have handled and ignored any errors of that type: 19f57c6
Beta Was this translation helpful? Give feedback.
All reactions