-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to get depth information and IMU data at the same time on windows ? #2945
Comments
If you are looking to get IMU and depth data at the same rate, look at rs-capture. When you run it with the D435i, two frames in the frameset will be of type Please note that you need the latest SDK version (2.17+), I would recommend building from source the development branch, since several fixes for the IMU on Windows has been merged but not released yet. |
In the enable_stream function, how should I configure it? |
Can you share a call code? |
Thank you very much for your guidance. |
Happy to help. To enable IMU explicitly, you can call You could also specify the frame-rate using You can see the list of supported configurations here and in the device data-sheet. We don't include explicit configuration details in the examples, because we want the same examples to work on all supported (and future) devices. So if you don't provide an explicit configuration, you will just get the default IMU from the D435i. Once you do get a frameset with motion frames, you can cast them to rs2::motion_frame: using namespace std;
using namespace rs2;
frameset fs = p.wait_for_frames();
for (auto& f : fs) {
if (f.is<motion_frame>()) {
motion_frame mf = f.as<motion_frame>();
rs2_vector xyz = mf.get_motion_data();
cout << f.get_profile().stream_type() << ": "
<< xyz.x << ", " << xyz.y << ", " << xyz.z << endl;
}
} |
[Realsense Customer Engineering Team Comment] |
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
<>
The text was updated successfully, but these errors were encountered: