Open hahahah6 opened 1 week ago
Hi @hahahah6 If you have the RuntimeError: Couldn't resolve requests
error in response to attempting to configure the Accel stream to a speed of '63' then you may have a D455 that was manufactured after mid 2022, as the minimum supported Accel speed on those modern D455 models changed from 63 to 100 due to a change of IMU component. Please try changing 63 to 100 in your Accel IMU config line.
imu_config.enable_stream(rs.stream.accel, rs.format.motion_xyz32f, 100) # acceleration
You do not need to change the Gyro speed of 200.
Hi, when I set both gyro and accel to 200, I end up get imu data at 400 fps. And when I set accel to 100, gyro to 200, I end up get imu data at 300 fps. This seems a little weird to me, what's the relation between the parameter in enable_stream func and the final real fps? I use D455, and basicly same code as this post.
Update: when I set gyro to 400, accel to 200, I get 600 final fps imu data. So they add up, why is that? Is it the camera get imu data interleave? Like when getting gyro data, accel data stay still, and vice versa, which end up add their fps to the final fps? @MartyG-RealSense
Okay, thank you for your comments. I have obtained the IMU data, but it has been affected by gravity. How can I eliminate the influence?
I have another problem,I used the rs-motion code, but it reported the following error:
Error: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (6,) + inhomogeneous part.
In the rs-motion C++ example, you can adjust an alpha value to give more weight to the gyro than the accelerometer (which takes gravity into account).
https://github.com/IntelRealSense/librealsense/blob/master/examples/motion/rs-motion.cpp#L117-L118
If you installed the RealSense SDK's tools and examples, do you experience that error if you run the pre-built executable version of the rs-motion example? You should be able to find it in the usr/local/bin folder of Ubuntu if you have not used it already.
I'm very sorry, I wrote the wrong file, it should be this rs-imu-calibration.py file. it reported the following error:
Error: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (6,) + inhomogeneous part.
The error The requested array has an inhomogeneous shape has not been previously reported in regard to the rs-imu-calibration script and so there is not a solution available, unfortunately. It is likely though that your camera already has a very good calibration that was performed in the factory and so the rs-imu-calibration.py script does not need to be used.
These days, a function called enable motion correction is enabled by default and 'fixes' raw IMU data so that its values are more correct.
Hi @hahahah6 Do you require further assistance with this case, please? Thanks!
Before opening a new issue, we wanted to provide you with some useful suggestions (Click "Preview" above for a better view):
All users are welcomed to report bugs, ask questions, suggest or request enhancements and generally feel free to open new issue, even if they haven't followed any of the suggestions above :)
Issue Description
I want to obtain data from the IMU. I am using the following code
but it reports the following error: