Skip to content

IMU basic_starter.py runtime errors  #28

@ARLunan

Description

@ARLunan

Raspberry Pi 4/4G Ubuntu 22.04/ROS 2 Humble with PyPi imusensor library installed. mpu9250 correctly connected to i2C 1 address 68.

Running a ros2 package it has calibration data for acceleration_bias, gyro_bias magnetometer_bias and successfully publishes orientation, angular velocity, Linear acceleration data

However, as I would like the calibrate the mpu9250, I ran these scripts from this repository with these logs with IMU fixed in position.
basic_starter.py

ubuntu@rp4-ub22h-mt:~/imu$ python3 basic_starter.py
The name is wrong [112]
The mag name is different and it is [0]
looks like it did not write properly
looks like it did not write properly
looks like it did not write properly
looks like it did not write properly
looks like it did not write properly
/home/ubuntu/.local/lib/python3.10/site-packages/imusensor/MPU9250/MPU9250.py:521: RuntimeWarning: invalid value encountered in divide
normMagVals = self.MagVals/magLength
roll: 179.4388073106308 ; pitch : -6.540237823437541 ; yaw : nan
roll: 178.84802350813396 ; pitch : -2.457731262926437 ; yaw : nan
.
.
.

identical log with imuExtraction.py

Could you suggest troubleshooting to enable adjusting calibration?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions