Skip to content
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

about get the imu and stereo image separately at the same time #6264

Closed
jyzhong opened this issue Apr 18, 2020 · 19 comments
Closed

about get the imu and stereo image separately at the same time #6264

jyzhong opened this issue Apr 18, 2020 · 19 comments

Comments

@jyzhong
Copy link

jyzhong commented Apr 18, 2020

  • 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 :)


Required Info
Camera Model { D435i }
Firmware Version (05.12.03.00
Operating System & Version { Linux (Ubuntu 18)
Kernel Version (Linux Only) (e.g. 5.3.0.46)
Platform PC
SDK Version { legacy / 2.34.0 }
Language {C++ }
Segment {AR }

Issue Description

<Describe your issue / question / feature request / etc..>
Hi,i can not get the imu and stereo image at the same time, some imu are dropped. Can you update a sample or give me some clue?

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Apr 18, 2020

If you activate the Stereo and Motion modules at the same time, are you getting frame drops on the IMU streaming, please?

Are you using a T265 or a D435i camera?

What computer device are you using the camera with please? (PC / Mac / Raspberry Pi / Jetson / Android etc)

And which operating system? (Windows / MacOS / Linux etc)

A sample program that you could use to test your camera with multiple windows is rs-multicam, which opens a number of windows of different types. The number of windows generated is based on the number of cameras attached.

https://github.com/IntelRealSense/librealsense/tree/master/examples/multicam

@jyzhong
Copy link
Author

jyzhong commented Apr 18, 2020

If you activate the Stereo and Motion modules at the same time, are you getting frame drops on the IMU streaming, please?

Are you using a T265 or a D435i camera?

What computer device are you using the camera with please? (PC / Mac / Raspberry Pi / Jetson / Android etc)

And which operating system? (Windows / MacOS / Linux etc)

D435i, PC, Ubuntu. Now, i have not the dropping imu or image. Now i wanna get the same frequency of gyro and acc.

@MartyG-RealSense
Copy link
Collaborator

Thank you very much. You would like to align the IMU data to depth data, please?

@jyzhong
Copy link
Author

jyzhong commented Apr 18, 2020

Thank you very much. You would like to align the IMU data to depth data, please?
I wanna get the Infrared image and the IMU data.

@MartyG-RealSense
Copy link
Collaborator

Ok, thanks. You are trying to do this with programming, like C++, and not with the RealSense viewer program?

@jyzhong
Copy link
Author

jyzhong commented Apr 18, 2020

Ok, thanks. You are trying to do this with programming, like C++, and not with the RealSense viewer program?
en

@MartyG-RealSense
Copy link
Collaborator

I do apologise. What is 'en' please?

@MartyG-RealSense
Copy link
Collaborator

Ok, thank you very much. So you would like a C++ sample program that shows the infrared image and the IMU data of the D435i. I will search for information for you. Thank you for your patience.

@jyzhong
Copy link
Author

jyzhong commented Apr 18, 2020

@MartyG-RealSense
Sorry. I mean "Yes". I wanna the same frequency of gyro and acc as the version of ROS do. If i should set some paras so the imu and infrared image is synchronous ?

@MartyG-RealSense
Copy link
Collaborator

Thank you. I hope the very detailed discussion in the link below about aligning IMU measurements to IR frames will be helpful.

#3942

@jyzhong
Copy link
Author

jyzhong commented Apr 20, 2020

Thank you. I hope the very detailed discussion in the link below about aligning IMU measurements to IR frames will be helpful.

#3942

Hi, after i run sample "motion". I found that the frequency of gyro and acceleration are unstable. For example, i set 400hz for gyro, i get many drop frame and the interval of data isn't 2.5ms, maybe 3ms or 2ms. So do the acceleration. I wish get your help. Is this the right data ? Is my sdk wrong?

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Apr 20, 2020

I thought about your case very carefully. As you are trying to use IMU and infrared data together, the discussion in the link below may help you to program ways to generate a better output.

#4386

If you are testing the IMU on its own in the "Motion Module" controls of the RealSense Viewer at 400hz and getting a time period of worse than 2.5 ms and dropped frames, please check whether your PC is overloaded at the time (for example, whether your CPU usage is close to or at 100%).

@jyzhong
Copy link
Author

jyzhong commented Apr 21, 2020

@MartyG-RealSense Thanks. The CPU usage is bigger than 100%. Actually i just run the sample. How can i get the right imu data without dropped frame? BTW, when i install the SDK, "./scripts/patch-realsense-ubuntu-lts.sh " is failed because of "fatal: index-pack failed", but i still finished installation.

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Apr 21, 2020

If your PC has an Nvidia GPU then you can offload some of the processing work from the CPU onto the GPU by building the SDK with CUDA support.

#4905 (comment)

To avoid the need for patching, you could try the 'bypass' method of installation that is confirmed to work with D435i. This method is also not reliant on Linux versions or kernel versions, so it is a good choice to try if you have problems with the usual Linux installation process. The bypass installation needs an internet connection to work.

https://support.intelrealsense.com/hc/en-us/community/posts/360037657234/comments/360009799533

@jyzhong
Copy link
Author

jyzhong commented Apr 21, 2020

@MartyG-RealSense thanks! i install the source code using the "bypass". Open the "realsense-viewer", i found i can get the "hardware time". i click on the button "global time", but it's still have "hardware time". When i use the "dkms"

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Apr 21, 2020

I do not have an Ubuntu setup to test with as I am a Windows user. I ran some tests with 'Global Time' toggled on and off in the RealSense Viewer on my Windows setup, at the bottom of the "Controls" section of the stereo module's side-panel options.

When 'Global Time Enabled' was enabled, this was reflected in the stream information by showing it to be using 'Global Time'.

image

When the 'Global Time Enabled' option was disabled whilst streaming was active, the Viewer automatically changed 'Global Time' to 'Hardware Clock'.

image

Toggling 'Global Time Enabled' back on during streaming automatically switched the information back from 'Hardware Clock' to 'Global Time'.

Are you unable to get Global Time on your own Viewer on Ubuntu when the Bypass installation method is used, please?

@jyzhong
Copy link
Author

jyzhong commented Apr 21, 2020

@MartyG-RealSense yes. when i try "cmake ../ -DBUILD_EXAMPLES=true". The acceleration get the two types. But the gyroscope only have the "system" and mention "Per-frame metadata is not enable at the OS level, please follow the installation guide for details". BTW, i install the SDK according to the "DKMS", the realsense-viewer work well. Actually, Maybe the issue trouble me is that when i use the "callback" rather than "wait_for_stream", i can get the IR frame and imu data, but just like i say, the gyroscope have lots of dropped frame. Maybe the next version will give a sample about "align the IR and imu", or "color and imu". Thanks for your nice reply.

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Apr 21, 2020

My understanding is that the "backend" bypass method installs support for metadata on Linux, but when using the normal installation method, metadata support for Linux has to be patched in (metadata is supported by default on Windows).

#3686 (comment)

If you would like to make a request for the sample programs that you described, I recommend creating a new issue just for that request, with the words 'Feature Request' in the title. I can then label the issue as a feature request so that the RealSense developer team can track it. Thanks!

@jyzhong
Copy link
Author

jyzhong commented Apr 21, 2020 via email

@dorodnic dorodnic closed this as completed May 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants