Items with no label
3335 Discussions

How to use SR300 and T265 together?

RNagy1
Beginner
1,635 Views

Hi All,

 

I would like to use SR300 and T265 together in Python. This is my code:

 

import pyrealsense2 as rs

import numpy as np

import cv2

 

# Configure depth and color streams

pipeline = rs.pipeline()

config = rs.config()

 

 

config.enable_stream(rs.stream.depth, 640, 480, rs.format.z16, 30)

config.enable_stream(rs.stream.color, 640, 480, rs.format.bgr8, 30)

config.enable_stream(rs.stream.fisheye, rs.format.y8, 1)

config.enable_stream(rs.stream.fisheye, rs.format.y8, 2)

config.enable_stream(rs.stream.pose)

 

 

# Start streaming

pipeline.start(config)

 

try:

   while True:

       # Get images, imshow, etc.

 

finally:

 

   # Stop streaming

   pipeline.stop()

 

But when I run the code, I got the following error: pipeline.start(config) RuntimeError: Couldn't resolve requests.

Do you know what can be the problem? The cameras are working separately, but not together.

 

Thank You,

Renata

 

 

0 Kudos
6 Replies
MartyG
Honored Contributor III
1,195 Views

I went through your code very carefully and also compared it to other Python code for the T265, and could not see obvious errors in it. I believe that the RuntimeError: Couldn't Resolve Requests error typically means that the program could not complete what it was asked to do. An example of such a problem may be being unable to access a certain resolution or stream format. Your stream definitions look okay to me though (RealSense programming is not one of my specialist areas though).

 

I would suggest trying to simplify the pose stream code to these lines and see if it makes a difference:

 

config.enable_stream(rs.stream.fisheye, 1)

config.enable_stream(rs.stream.fisheye, 2)

 

0 Kudos
RNagy1
Beginner
1,195 Views

I simplified the lines the suggested way, but unfortunately it didn't make any difference. The interesting thing is if I comment the lines belong to one camera everything is working, but it seems like they cannot work together for some reason.

0 Kudos
MartyG
Honored Contributor III
1,195 Views

I have just handled a different case involving using a D435 and T265 together, where the information came to light that it is recommended that (a) both cameras are run in the same thread instead of separate threads, and (b) the T265 is started first and then the other camera. Perhaps some of this is applicable to your case.

 

https://github.com/IntelRealSense/librealsense/issues/4641

0 Kudos
RNagy1
Beginner
1,195 Views

Thank you! I searched more and I found this: https://github.com/IntelRealSense/librealsense/issues/1735

...and it solved the problem. I'm pretty sure I tried the separated pipeline thing, I don't know why it didn't work. Anyway, it's OK now, thank you for the help!

0 Kudos
MartyG
Honored Contributor III
1,195 Views

I'm very glad you found a solution. Thanks for the update!

0 Kudos
rroy01
Beginner
1,195 Views

Thanks for your answer.

Camvela.com

0 Kudos
Reply