Realsense-ros: Multiple T265 cameras

Created on 28 Mar 2019  Â·  10Comments  Â·  Source: IntelRealSense/realsense-ros

My system is Ubuntu 16.04, and I have some problem when I try to get data from two T265 cameras.

After connecting two T265 cameras to PC, I ran the following commands from different terminals.

roslaunch realsense2_camera rs_t265.launch camera:=cam_1 serial_no:=<serial number of the first camera>
roslaunch realsense2_camera rs_t265.launch camera:=cam_2 serial_no:=<serial number of the second camera>

I can get the data from the first camera (cam_1). However, the information from the second camera (cam_2) cannot be acquired. The second terminal only shows

[ INFO] [1553711925.173709452]: Initializing nodelet with 8 worker threads.
[ INFO] [1553711925.195283050]: RealSense ROS v2.2.1
[ INFO] [1553711925.195304806]: Running with LibRealSense v2.19.1
[ WARN] [1553711925.204682574]: No RealSense devices were found!

Thanks.

T265 enhancement

Most helpful comment

I wrote code in Python 3 to test two T265 cameras. It works.

more_devices_test.py.zip

All 10 comments

It is an issue. For now it is not possible to run more then one node handling T265 on the same machine.

Thanks for your reply. And when could I get a new version including this function? Thanks.

Yes, it would be very helpful to have the capability to launch multiple t265 in the near future.

Also, right now it is possible to stream data from two t265 units with the Intel RealSense Viewer! So in principle it is possible.

I am not able to do it right now...when I try to start the second unit I get an error: "RuntimeError: Failed to start TM2 camera"

Any tips to do it?

THank you!!

It's possible to use two T265 with realsense viewer because the viewer is only 1 process.
With realsense2_camera, each node handles one device. Since a process can either hold the T265 context or not, you can use only one T265 at a time.
The real solution to this problem is replacing the backend for T265 in librealsense. A possible workaround is modifying the function unload_tracking_module in such a way that it will keep the hold of the current process on the device while releasing the context for other processes to search for other devices.
In any case, the solution is in the underlying librealsense2 library.

I wrote code in Python 3 to test two T265 cameras. It works.

more_devices_test.py.zip

Wonderful! Thank you for doing it!

Agostino

On Fri, Aug 2, 2019, 14:50 Ivo Marvan notifications@github.com wrote:

I wrote code in Python 3 to test two T265 cameras. It works.

more_devices_test.py.zip
https://github.com/IntelRealSense/realsense-ros/files/3461264/more_devices_test.py.zip

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/IntelRealSense/realsense-ros/issues/706?email_source=notifications&email_token=ADYMIIOGIBGBEHWFQWDMKVDQCQUS7A5CNFSM4HCCTQXKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3NUUXA#issuecomment-517687900,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADYMIILHHQ3G44BHVLFQI3TQCQUS7ANCNFSM4HCCTQXA
.


Is there anything more needed on this ticket? Right now we do not have the capability but it seems we have some savvy users (Thanks @ivomarvan) and the python script was made available.

Actually, the solution is not related with ros package. Do you plan to implement this feature on the next release?

Dear Intel Support,
the wonderful code written by IVOMARVAN is not working anymore with the new release of librealsense 2.33.1.1370.

When I try to run it (Ubuntu 18.04), I have the following runtime error:

_RuntimeError Traceback (most recent call last)
in
182 if __name__ == "__main__":
183 number_of_experiments = 50
--> 184 serial_numbers = get_devices_serial_numbers()
185 sources = [T265CameraSource(serial_number) for serial_number in serial_numbers]
186

in get_devices_serial_numbers(device_suffix)
30 ret_list = []
31 ctx = rs.context()
---> 32 for d in ctx.devices:
33 if device_suffix and not d.get_info(rs.camera_info.name).endswith(device_suffix):
34 continue

RuntimeError: Unable to open device interface_

Can you help me with that?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

PerrineAguiar picture PerrineAguiar  Â·  4Comments

ranjitkathiriya picture ranjitkathiriya  Â·  3Comments

ELDEMIRY picture ELDEMIRY  Â·  5Comments

lauesa picture lauesa  Â·  6Comments

Kyungdon picture Kyungdon  Â·  6Comments