Building Realsense in this Version in the big 2025 is painful to say the least Since T261's software support is crap, I had to build an older version of librealsense that still supports T261 and use an older version of Ubuntu to get it working.
samad@imu:~/rover$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.5 LTS
Release: 22.04
Codename: jammy
samad@imu:~/rover$ uname -r
5.15.0-1087-raspiIf your system info is different, you might need to adjust some steps accordingly.
Note: This (T265 Modules) does not work on new 6.x kernels (both on x86 and ARM) in my experience so make sure you are around 5.x kernel
We need this specific version of librealsense. Download and extract it.
wget https://github.com/IntelRealSense/librealsense/archive/refs/tags/v2.51.1.zip
unzip v2.51.1.zip
cd librealsense-2.51.1Make sure you have the required dependencies installed.
sudo apt update
sudo apt -y install git libssl-dev libusb-1.0-0-dev pkg-config cmake git g++
sudo apt -y install libgtk-3-dev libglfw3-dev libglfw3 libx11-dev libxinerama-dev
sudo apt -y install libgl1-mesa-dev libglu1-mesa-dev
sudo apt -y install libasound2-dev libpulse-dev
sudo apt -y install libudev-dev libx11-dev libxinerama-dev libxc libxrandr-dev libx11-dev
sudo apt -y install libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libgl1-mesa-dev libglu1-mesa-devCheck with chatgpt incase i missed a few dependencies.
While building it ( steps for building later) you'll run into some problems with gcc 10+ since this library was build ages ago??
While building with a recent compiler you'll see an error like
librealsense-2.51.1/src/libusb/libusb.h:10:82: error: extended character ‘ is not valid in an identifier
10 | /usr/include/libusb-1.0/libusb.h:736:4: warning: ISO C++ forbids zero-size array ‘dev_capability_data’ Find the file in that's throwing this error (likely librealsense-2.51.1/src/libusb/libusb.h:10:82 ) and replace ‘ with ' in 3 lines (6 replacements).
See this patch to understand what to edit in the file.
While building examples you'll also see an issue like this
"undefined reference to `gluPerspective'"Use this comment on github to patch the CMakeLists.txt file in the root of the librealsense source code.
Now we can build the library.
cd librealsense-2.51.1 // If not already there
mkdir build && cd build
cmake .. -DBUILD_EXAMPLES=ON -DBUILD_WITH_TM2=ON -DFORCE_RSUSB_BACKEND=ON -DCMAKE_CXX_FLAGS="-Wno-pedantic"
make -j 4To allow non-root access to the T261 device, we need to add udev rules.
cd librealsense-2.51.1 // If not already there
sudo ./scripts/setup_udev_rules.shAfter building, you can test the installation by running one of the examples.
Plug in your T261 device and run the enumerate devices tool:
cd librealsense-2.51.1/build/tools/enumerate-devices
./rs-enumerate-devicesThe output should look like
Device info:
Name : Intel RealSense T265
Serial Number : 908412110976
Firmware Version : 0.2.0.951
Physical Port : 2-1-2
Product Id : 0B37
Usb Type Descriptor : 3.1
Product Line : T200
Stream Profiles supported by Tracking Module
Supported modes:
stream resolution fps format
Fisheye 1 848x800 @ 30Hz Y8
Fisheye 2 848x800 @ 30Hz Y8
Gyro N/A @ 200Hz MOTION_XYZ32F
Accel N/A @ 62Hz MOTION_XYZ32F
Pose N/A @ 200Hz 6DOFWhen you plug in the T261 device, run the following command to check if the device is recognized:
lsusbYou may see an entry similar to:
Bus 001 Device 009: ID 03e7:2150 Intel Myriad VPU [Movidius Neural Compute Stick]If not, try plugging the device into a different USB port and ensure that your udev rules are correctly set up. Also, a reboot might help after setting up udev rules.
Run the enumerate devices tool again to see if the device is detected.
After running it, you should see output similar to:
lsusb
Bus 002 Device 002: ID 8087:0b37 Intel Corp. Intel(R) RealSense(TM) Tracking Camera T265