I am trying to train Bittle using Reinforcement Learning.
Is there a way I can get all the sensor information using Python? (some command like getSensorData()?) I believe it is possible, as I have seen multiple posts here referring to that. Most refer to the imu.h file, but that is not accessible to me since I am using Python. In particular, I am interested in yaw, pitch, roll, but if there is more, I'd love to have it.
Currently, I use the examples shown in serialMaster in the main Github repo as a reference to run the robot, specifically, from Bittle's perspective, my code is a copy of SerialMaster/example.py.
I suggest you first try with Arduino's Serial monitor to test the outputs of the token commands.
Are you using Raspberry Pi 4 or 5? There will be some modifications in ardSerial.py to connect to ttyAMA0.
I've modified the code for the Gyro logic and pushed it to branch "better-gyro":
You can refer to the function in ardSerial.py => def printSerialMessage(port, token, timeout=0), which keeps reading the serial port and extracts useful information on the gyros.