-
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
PyRealsense wrapper - capturing asynchronous streams (IMU, depth, color) #10238
Comments
Hi @chronma
|
Thanks MartyG! I will try to massage the example into a threaded version. |
Here's an example of threading 4 streams individually. L515 camera
|
Thanks so much @chronma for sharing your threading code for the L515 with the RealSense community :) |
Hi @chronma Do you require further assistance with this case, please? Thanks! |
@MartyG-RealSense, Marty i think I'm good, thanks. |
Thanks very much @chronma for the update! |
Hello,
1)
There is a slight bug with the L515 the gyro and accelorometer stream profiles titles are swapped when calling the data,
index 4 (frame[4]] yields gyro but is listed as "pyrealsense2.stream_profile: Accel(0) @ 200fps MOTION_XYZ32F"
index 3 (frame[3]] yields accel but is listed as "pyrealsense2.stream_profile: Gyro(0) @ 200fps MOTION_XYZ32F"
I was wondering if there was a way to thread the capture of separate streams using pyrealsense2 wrapper.
The concept is to capture and the gyro and accelerometer data frame by frame as well as depth and color frame by frame. Similar to what i think the SDK example RS-callback is doing in C++
My ultimate goal is to create a hand held "video camera" that can track its location using the gyro and accelerometer and allow for the capture of pointcloud data at the push of a button at various places. similar in function to Rtab mapper, ssl_slam, but with out the ROS overhead, cumbersome interfaces, and odometry / point stripping.
Here is output from a test file i was playing with. The distance frame is captured frame by frame, but the gyro isn't (30/200fps)
Device PID: 0B64 Device name: Intel RealSense L515 Serial number: f0244791 Firmware version: 01.05.08.01 USB: 3.2 camera init complete <pyrealsense2.[video_]stream_profile: Depth(0) 640x480 @ 30fps Z16> <pyrealsense2.[video_]stream_profile: Infrared(0) 640x480 @ 30fps Y8> <pyrealsense2.[video_]stream_profile: Color(0) 1280x720 @ 30fps RGB8> <pyrealsense2.stream_profile: Gyro(0) @ 200fps MOTION_XYZ32F> <pyrealsense2.stream_profile: Accel(0) @ 200fps MOTION_XYZ32F> accelerometer: x: 0.11768, y: -9.89491, z: 0.804145 gyro: x: -0.00523599, y: 0, z: 0 gyro frame #: 403 distance: 0.0 dist frame #: 24 accelerometer: x: 0.11768, y: -9.91452, z: 0.794339 gyro: x: -0.00174533, y: 0, z: 0 gyro frame #: 416 distance: 0.0 dist frame #: 25 accelerometer: x: 0.11768, y: -9.91452, z: 0.794339 gyro: x: -0.00174533, y: 0, z: 0 gyro frame #: 416 distance: 0.0 dist frame #: 26
The text was updated successfully, but these errors were encountered: