You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, first of all I wanted to thank you for the shared ROS package. It helped me a lot with a private project.
When I tried to integrate your package to support SLAM, firstly I visualized the IMU messages in RVIZ and noticed strange peaks in the data. I played around with your code a bit and managed to find the issue in the read_word function:
def read_word(adr):
high = bus.read_byte_data(ADDR, adr)
low = bus.read_byte_data(ADDR, adr+1)
val = (high << 8) + low
return val
The high and low values are read separately and sometimes it seems like that the values are updated in between each read call which leads to obscured values from time to time.
python smbus2 offers a read_i2c_block_data function where you could read data from multiple registers at once so they won't get updated in between. I changed it and did not observe any anomaly since. I could create a pull request.
The text was updated successfully, but these errors were encountered:
Hey, first of all I wanted to thank you for the shared ROS package. It helped me a lot with a private project.
When I tried to integrate your package to support SLAM, firstly I visualized the IMU messages in RVIZ and noticed strange peaks in the data. I played around with your code a bit and managed to find the issue in the
read_word
function:The high and low values are read separately and sometimes it seems like that the values are updated in between each read call which leads to obscured values from time to time.
python smbus2 offers a
read_i2c_block_data
function where you could read data from multiple registers at once so they won't get updated in between. I changed it and did not observe any anomaly since. I could create a pull request.The text was updated successfully, but these errors were encountered: