IntelRealSense / librealsense

Intel® RealSense™ SDK
https://www.intelrealsense.com/
Apache License 2.0
7.45k stars 4.81k forks source link

T265 camera is not detected when i open realsense-viewer. #11843

Open PotroCoelho opened 1 year ago

PotroCoelho commented 1 year ago

Required Info
Camera Model { T265 }
Firmware Version (0.2.0.951)
Operating System & Version {Ubuntu 22.04 LTS}
Kernel Version (Linux Only) (5.15.0)
Platform Raspberry Pi
SDK Version { 2.53.1)
Language {python}
Segment {others }

Issue Description

When I open the realsense viewer i get this output

25/05 17:06:47,633 ERROR [281473491857632] (librealsense-exception.h:52) /dev/video10 is no video capture device Last Error: Invalid argument 25/05 17:06:47,647 ERROR [281473491857632] (sensor.cpp:664) acquire_power failed: /dev/video10 is no video capture device Last Error: Invalid argument 25/05 17:06:47,679 WARNING [281473491857632] (rs.cpp:310) null pointer passed for argument "device" 25/05 17:06:47,680 WARNING [281473491857632] (rs.cpp:2704) Couldn't refresh devices - /dev/video10 is no video capture device Last Error: Invalid argument

The viewer opens, it does not detec a camera and presents the 2 same erros and warnings in the command line. If i unplug and plug the camera again, it is detected and everything runs smoothly. What kind of issue is this? Is it only a detection failure?

Btw, i installed it via source code

DragonOnGit commented 1 year ago

hi, I am facing the same issue, my friend once solved this problem, but I forgot the method...., I am trying to fix it.

PotroCoelho commented 1 year ago

@DragonOnGit Good to know that I'm not the only one. If you manage to solve it I'd like to know the solution.

DragonOnGit commented 1 year ago

By checking the issues before, I found that T265 on Raspi has been given up now. The issues related like #4681 and #4979 said they were moving on to a new product. So if we still want to use this old one, the issue needs to be fixed by ourselves.

Furthermore, I tried many other methods online, while I finish make codes and plug in the camera, use the lsusb command in the terminal, the output is

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 03e7:2150
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

And use command dmesg the output is

[ 5469.101857] usb 1-1.2: new high-speed USB device number 4 using xhci_hcd
[ 5469.202637] usb 1-1.2: New USB device found, idVendor=03e7, idProduct=2150, bcdDevice= 0.01
[ 5469.202654] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 5469.202666] usb 1-1.2: Product: Movidius MA2X5X
[ 5469.202677] usb 1-1.2: Manufacturer: Movidius Ltd.
[ 5469.202686] usb 1-1.2: SerialNumber: 03e72150

But when I plug in the D435i, it shows like this:

[ 2730.500584] usb 2-2: New USB device found, idVendor=8086, idProduct=0b3a, bcdDevice=50.e0
[ 2730.500597] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2730.500607] usb 2-2: Product: Intel(R) RealSense(TM) Depth Camera 435i
[ 2730.500616] usb 2-2: Manufacturer: Intel(R) RealSense(TM) Depth Camera 435i
[ 2730.500625] usb 2-2: SerialNumber: 108223051352
[ 2730.551686] uvcvideo: Unknown video format 00000050-0000-0010-8000-00aa00389b71
[ 2730.551888] uvcvideo: Found UVC 1.50 device Intel(R) RealSense(TM) Depth Camera 435i (8086:0b3a)
[ 2730.556127] input: Intel(R) RealSense(TM) Depth Ca as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb2/2-2/2-2:1.0/input/input0
[ 2730.558185] usbcore: registered new interface driver usbhid
[ 2730.558191] usbhid: USB HID core driver
[ 2730.558405] uvcvideo: Unknown video format 36315752-1a66-a242-9065-d01814a8ef8a
[ 2730.558418] uvcvideo: Found UVC 1.50 device Intel(R) RealSense(TM) Depth Camera 435i (8086:0b3a)
[ 2730.563555] usbcore: registered new interface driver uvcvideo
[ 2730.563563] USB Video Class driver (1.1.1)
[ 2730.606548] hid-generic 0003:8086:0B3A.0001: hiddev0,hidraw0: USB HID v1.10 Device [Intel(R) RealSense(TM) Depth Camera 435i Intel(R) RealSense(TM) Depth Camera 435i] on usb-0000:01:00.0-2/input5
[ 2730.899301] hid-sensor-hub 0003:8086:0B3A.0001: No report with id 0xffffffff found

I am confused about it. Is the problem comes from udev rules or the SDK I installed? So still trying to fix it. Do you or anybody have some other solutions?

PotroCoelho commented 1 year ago

I don't know why but reinstalling librealsense again solved it for me. Have you installed it globally or in a virtual enviornment?

finickyDrone commented 11 months ago

I'm seeing the same issue on the T264 in Ubuntu 20.04 with the latest v2.54.1 version of the RealSense ADK. dmesg shows:

[  522.301524] videodev: Linux video capture interface: v2.00
[  522.307186] usb 3-5: Found UVC 1.00 device Integrated_Webcam_HD (0c45:6720)
[  522.314602] input: Integrated_Webcam_HD: Integrate as /devices/pci0000:00/0000:00:14.0/usb3/3-5/3-5:1.0/input/input34
[  522.314684] usbcore: registered new interface driver uvcvideo
[  577.814598] usb 3-1: new high-speed USB device number 7 using xhci_hcd
[  577.963883] usb 3-1: New USB device found, idVendor=03e7, idProduct=2150, bcdDevice= 0.01
[  577.963886] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  577.963888] usb 3-1: Product: Movidius MA2X5X
[  577.963888] usb 3-1: Manufacturer: Movidius Ltd.
[  577.963889] usb 3-1: SerialNumber: 03e72150

and lsusb shows: Bus 003 Device 007: ID 03e7:2150 Intel Myriad VPU [Movidius Neural Compute Stick] It seems to be misidentifying the T265 for some reason. This is on the latest version of RealSense ADK and I already rebooted and reinstalled RealSense.

EDIT: Nevermind, it appears they just removed support for T265 and L535 in v2.54: "Removed deprecated camera PIDs, such as T265, L535"

AllenIsaacJose commented 10 months ago

SOLVED

sudo sh -c "echo 141a0000.pcie > /sys/bus/platform/drivers/tegra194-pcie/unbind"
sudo sh -c "echo 141a0000.pcie > /sys/bus/platform/drivers/tegra194-pcie/bind"

Find the PCIe card to which the USB is connected. In my case 141a0000.pcie. The above command will turn the power supply to the PCIe card off and then on thereby making my T265 tracker camera detectable.

LuanVuNguyen commented 7 months ago

SOLVED

sudo sh -c "echo 141a0000.pcie > /sys/bus/platform/drivers/tegra194-pcie/unbind"
sudo sh -c "echo 141a0000.pcie > /sys/bus/platform/drivers/tegra194-pcie/bind"

Find the PCIe card to which the USB is connected. In my case 141a0000.pcie. The above command will turn the power supply to the PCIe card off and then on thereby making my T265 tracker camera detectable.

Hello, I also had the same problem. How to search for "141a0000.pcie". Thank you image

AllJordanSS commented 3 months ago

RESOLVIDO

sudo sh -c "echo 141a0000.pcie > /sys/bus/platform/drivers/tegra194-pcie/unbind"
sudo sh -c "echo 141a0000.pcie > /sys/bus/platform/drivers/tegra194-pcie/bind"

Encontre a placa PCIe à qual o USB está conectado. No meu caso 141a0000.pcie. O comando acima desligará e ligará a fonte de alimentação da placa PCIe, tornando minha câmera rastreadora T265 detectável.

Resolvi da mesma forma, reiniciando a fonte de energia do hub usb. Em controladoras que não conseguem reiniciar a fonte de energia do hub, é necessário seccionar a alimentação do cabo usb da câmera, adicionando um relé acionado por uma gpio. Assim é possível reiniciar a câmera e utilizá-la sem problemas. Eu utilizava essa resolução quando usava a câmera com uma Raspberry PI 4, no entanto quando mudei para Jetson Orin Nano, que tem a função de reiniciar a fonte de alimentação do seu hub usb via terminal, não precisei mais.

AllenIsaacJose commented 3 months ago

SOLVED

sudo sh -c "echo 141a0000.pcie > /sys/bus/platform/drivers/tegra194-pcie/unbind"
sudo sh -c "echo 141a0000.pcie > /sys/bus/platform/drivers/tegra194-pcie/bind"

Find the PCIe card to which the USB is connected. In my case 141a0000.pcie. The above command will turn the power supply to the PCIe card off and then on thereby making my T265 tracker camera detectable.

Hello, I also had the same problem. How to search for "141a0000.pcie". Thank you image

Hi,

Sorry for the late reply.

This method works only if the USB is connected to a separate PCIe card whose power can be turned off and on programmatically. To find the PCIe card info, if I remember correctly, you can open the realsense-viewer and connect the camera. On the left side, there would be an information panel where you could click on the info button and see the complete path to the USB port including the PCIe card information in the physical port section.

DragonOnGit commented 2 months ago

SOLVED

sudo sh -c "echo 141a0000.pcie > /sys/bus/platform/drivers/tegra194-pcie/unbind"
sudo sh -c "echo 141a0000.pcie > /sys/bus/platform/drivers/tegra194-pcie/bind"

Find the PCIe card to which the USB is connected. In my case 141a0000.pcie. The above command will turn the power supply to the PCIe card off and then on thereby making my T265 tracker camera detectable.

Hello, I also had the same problem. How to search for "141a0000.pcie". Thank you image

Hi,

Sorry for the late reply.

This method works only if the USB is connected to a separate PCIe card whose power can be turned off and on programmatically. To find the PCIe card info, if I remember correctly, you can open the realsense-viewer and connect the camera. On the left side, there would be an information panel where you could click on the info button and see the complete path to the USB port including the PCIe card information in the physical port section.

Do you mean that the power supplement is the reason that the driver recognizeing the camera?

AllenIsaacJose commented 2 months ago

SOLVED

sudo sh -c "echo 141a0000.pcie > /sys/bus/platform/drivers/tegra194-pcie/unbind"
sudo sh -c "echo 141a0000.pcie > /sys/bus/platform/drivers/tegra194-pcie/bind"

Find the PCIe card to which the USB is connected. In my case 141a0000.pcie. The above command will turn the power supply to the PCIe card off and then on thereby making my T265 tracker camera detectable.

Hello, I also had the same problem. How to search for "141a0000.pcie". Thank you image

Hi, Sorry for the late reply. This method works only if the USB is connected to a separate PCIe card whose power can be turned off and on programmatically. To find the PCIe card info, if I remember correctly, you can open the realsense-viewer and connect the camera. On the left side, there would be an information panel where you could click on the info button and see the complete path to the USB port including the PCIe card information in the physical port section.

Do you mean that the power supplement is the reason that the driver recognizeing the camera?

I am not very sure about the internal software stack. But when the power to the T265 camera is received before the host system is fully booted up, the camera goes into low power mode. So by diagnosing the USB ports, we could see the USB connection to the camera is in 2.0 mode instead of the expected 3.0 mode. As a result, we had to make sure the camera power was received only after the host system was booted up.