When trying to dynamically load multiple Realsense 465s in Unity, only one is loaded and the error "Frame didn't arrive within 5000" occurs.
Hello.
I have the problem as shown in the title when I load multiple units at runtime in Unity.
For example, when I run a program that connects 3 units and loads them at runtime, I cannot get information from the first and second Realsense units, but I can get information from the third Realsense unit.
When two devices are connected and a program is executed to load at runtime, the first Realsense will not be able to retrieve information, but the second Realsense will.
The terminal that cannot display the information will give the following error
ExternalException: rs2_pipeline_wait_for_frames(pipe:000001EC94855880)
Rethrow as Exception: Frame didn't arrive within 5000
Intel.RealSense.ErrorMarshaler.MarshalNativeToManaged (System.IntPtr pNativeData) (at <cb539c8577184d8bb3db94250e9792dc>:0)
Intel.RealSense.Pipeline.WaitForFrames (System.UInt32 timeout_ms) (at <cb539c8577184d8bb3db94250e9792dc>:0)
RsDevice.WaitForFrames () (at Assets/RealSenseSDK2.0/Scripts/RsDevice.cs:159)
System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) (at <1c8569827291471e9db0dcd976e97952>:0)
System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) (at <1c8569827291471e9db0dcd976e97952>:0)
System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) (at <1c8569827291471e9db0dcd976e97952>:0)
System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) (at <1c8569827291471e9db0dcd976e97952>:0)
System.Threading.ThreadHelper.ThreadStart () (at <1c8569827291471e9db0dcd976e97952>:0)
UnityEngine.<>c:<RegisterUECatcher>b__0_0(Object, UnhandledExceptionEventArgs)
Intel.RealSense.NativeMethods:rs2_pipeline_wait_for_frames(IntPtr, UInt32, Object&)
Intel.RealSense.Pipeline:WaitForFrames(UInt32)
RsDevice:WaitForFrames() (at Assets/RealSenseSDK2.0/Scripts/RsDevice.cs:159)
System.Threading.ThreadHelper:ThreadStart()
Shows the experimental environment.
Environment:
Unity: 2021.3.26f1
Realsense: 465
Number of devices: 3 (2)
program:
Realsense's prefab will be the next parent-child relationship.
RsProccesingPipe
-RsDevice
--RsStreamTextureRenderer(DepthTexture)
--RsStreamTextureRenderer(ColorTexture)
I have tried the following from errors and past troubleshooting with no resolution.
- Read each unit one by one with an interval of at least 5 seconds between reads
- All devices were connected directly to USB ports without USB extension cords.
Please let me know.
Thanks.
-
Hi Maruyama I have not previously seen a multiple RealSense camera Unity application where the cameras are automatically detected. There is a past guide submitted by a RealSense user at the link below that describes how to set up multiple cameras manually by creating multiple RsDevice components and assigning a camera serial number to each.
Please sign in to leave a comment.
Comments
1 comment