mirror of
https://github.com/apirrone/Open_Duck_Mini_Runtime.git
synced 2025-09-03 11:43:58 +00:00
docs update
This commit is contained in:
parent
7eca6b1b4f
commit
b5aa4baeb8
2 changed files with 16 additions and 13 deletions
11
README.md
11
README.md
|
@ -116,3 +116,14 @@ pip install -e .
|
|||
cd scripts/
|
||||
python imu_test.py
|
||||
```
|
||||
|
||||
## Find the joints offsets
|
||||
|
||||
This script will guide you through finding the joints offsets of your robot, that you can then write in `hwi_feetech_pwm_control.py` in `self.joints_offsets`
|
||||
|
||||
> This procedure won't be necessary in the future as we will be flashing the offsets directly in each motor's eeprom.
|
||||
|
||||
```bash
|
||||
cd scripts/
|
||||
python find_soft_offsets.py
|
||||
```
|
||||
|
|
|
@ -1,18 +1,10 @@
|
|||
import adafruit_bno055
|
||||
from mini_bdx_runtime.imu import Imu
|
||||
import time
|
||||
import serial
|
||||
from scipy.spatial.transform import Rotation as R
|
||||
|
||||
uart = serial.Serial("/dev/ttyS0") # , baudrate=115200)
|
||||
imu = adafruit_bno055.BNO055_UART(uart)
|
||||
|
||||
imu = Imu(sampling_freq=30)
|
||||
while True:
|
||||
try:
|
||||
raw_orientation = imu.quaternion # quat
|
||||
euler = R.from_quat(raw_orientation).as_euler("xyz")
|
||||
print(euler)
|
||||
except Exception as e:
|
||||
print(e)
|
||||
continue
|
||||
orientation_quat = imu.get_data()
|
||||
|
||||
print(orientation_quat)
|
||||
|
||||
time.sleep(1 / 30)
|
||||
|
|
Loading…
Reference in a new issue