docs update

This commit is contained in:
apirrone 2025-02-24 22:41:26 +01:00
parent 7eca6b1b4f
commit b5aa4baeb8
2 changed files with 16 additions and 13 deletions

View file

@ -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
```

View file

@ -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)