Python access to IMU Data

I have the latest firmware for the D455 and the latest version of librealsense installed. I am using the latest version of Windows 10. I am successfully running the example3 that is provided in the wrappers/TensorFlow directory. I tried to add capturing the IMU data by enabling the gyro and accel with the following statements:

config.enable_stream(rs.stream.gyro)
config.enable_stream(rs.stream.accel)

I wanted to read the gyro and accel data with the following:

gyroVal = frames.first_or_default(rs.stream.gyro, rs.format.xyz32f)
accelVal = frames.first_or_default(rs.stream.accel, rs.format.xyz32f)

However, these statements made the Python script fail. Remove them and everything is working fine. What should I have done? Is the IMU accessible in the Python interface?

Bob Davies

Ignore my question. It was meant for the librealsense team…