hiwad-aziz / ros2_mpu9250_driver

A ROS2 driver for an MPU9250 sensor.
MIT License
15 stars 14 forks source link

No such device or address #4

Open Narek-939 opened 1 year ago

Narek-939 commented 1 year ago

[mpu9250driver-1] Error! Errno: No such device or address [mpu9250driver-1] Error! Errno: No such device or address [mpu9250driver-1] Error! Errno: No such device or address [mpu9250driver-1] Error! Errno: No such device or address [mpu9250driver-1] Error! Errno: No such device or address [mpu9250driver-1] Error! Errno: No such device or address [mpu9250driver-1] Error! Errno: No such device or address [mpu9250driver-1] Error! Errno: No such device or address [mpu9250driver-1] Accelerometer Range: +-2g [mpu9250driver-1] Gyroscope Range: +-250 degree per sec [mpu9250driver-1] DLPF Range: 94 Hz [mpu9250driver-1] Accelerometer Offsets: x: -0.00359253, y: -0.00359253, z: -9.81359 [mpu9250driver-1] Gyroscope Offsets: x: -0.0458015, y: -0.0458015, z: -0.0458015 [ERROR] [mpu9250driver-1]: process has died [pid 24861, exit code -8, cmd '/home/vis/Desktop/ros2_mpu9250_driver/install/mpu9250driver/lib/mpu9250driver/mpu9250driver --ros-args -r __node:=mpu9250driver_node --params-file /home/vis/Desktop/ros2_mpu9250_driver/install/mpu9250driver/share/mpu9250driver/params/mpu9250.yaml'].

Narek-939 commented 1 year ago

this is my output, I could get data of IMU in arduino ide, my IMU is MPU6500, I read from several articles that MPU9250 registers have the same construction with MPU6500, please help me to understand what error is this, Thanks)

hiwad-aziz commented 1 year ago

@Narek-939 you may have to adjust the bus number for your sensor. The LinuxI2cCommunicator allows to specify the bus number in the constructor. The default value is 1 which may not be the same as in your case. You can pass the number in this line: https://github.com/hiwad-aziz/ros2_mpu9250_driver/blob/482aa093c36dae0303a103c3d6e9296151146f65/src/mpu9250driver.cpp#L13

See the constructor for reference: https://github.com/hiwad-aziz/ros2_mpu9250_driver/blob/482aa093c36dae0303a103c3d6e9296151146f65/lib/i2c/src/LinuxI2cCommunicator.cpp#L15C7-L15C7

Narek-939 commented 1 year ago

I fixed that error but after that I am encountered to this

[mpu9250driver-1] /dev/i2c-1 [mpu9250driver-1] Error! Errno: Remote I/O error [mpu9250driver-1] Error powering down magnometer [mpu9250driver-1] Error! Errno: Remote I/O error [mpu9250driver-1] Error reactivating magnometer

[mpu9250driver-1] Accelerometer Range: +-2g [mpu9250driver-1] Gyroscope Range: +-250 degree per sec [mpu9250driver-1] DLPF Range: 94 Hz [mpu9250driver-1] Accelerometer Offsets: x: -5.92275, y: 1.4816, z: -15.5174 [mpu9250driver-1] Gyroscope Offsets: x: 0.21629, y: 3.40532, z: -1.80744 [mpu9250driver-1] Error! Errno: Remote I/O error [mpu9250driver-1] Error! Errno: Remote I/O error [mpu9250driver-1] Error! Errno: Remote I/O error [mpu9250driver-1] Error! Errno: Remote I/O error [mpu9250driver-1] Error! Errno: Remote I/O error [mpu9250driver-1] Error! Errno: Remote I/O error [mpu9250driver-1] Error! Errno: Remote I/O error

Narek-939 commented 1 year ago

so what you think about it?