Python Setup for Intel RealSense T265 with Jetson Nano and Ubuntu 18.04

I wanted to document the process I went through to get my Python development environment up and running with Jetson Nano and Intel's T265 tracking camera. While there is documentation out there I kept running into dead ends. You'll want to install the librealsense2-utils as documented here:
github.com/IntelRealSense/lib...
That will get you to the point where you can run realsense-viewer and see the data stream from the camera and sensors. Don't worry about installing librealsense2-dev as you'll want to build from source.
Make sure you clone the repo to your local machine and then following these steps to get your Python dev environment working:
github.com/IntelRealSense/lib...
The instruction about using "pip install pyrealsense2" did not work for me so I built from source. Make sure you clone the repo and when you configure the project with cmake be sure to specify the path to python 2 and not 3. For some reason I could not get python 3 to work. So your cmake will look like this:
cmake ../ -DBUILD_PYTHON_BINDINGS:bool=true -DPYTHON_EXECUTABLE=/usr/bin/python
Once you make and install be sure to update your PYTHONPATH:
export PYTHONPATH=$PYTHONPATH:/usr/local/lib
I'm excited about the possibilities with this camera and hope this video was helpful.

Пікірлер: 54

  • @samwooseong1811
    @samwooseong18113 жыл бұрын

    Thank you tons! I was struggling to build pyrealsense2 library from source for couple of hours and I came across your video! I really appreciate it!

  • @JR-kk6ce
    @JR-kk6ce4 жыл бұрын

    Thanks for continuing to push the limits and making our hobby cutting edge science.

  • @dennisbaldwin

    @dennisbaldwin

    4 жыл бұрын

    Thank you for the good words :)

  • @aBucketOfPuppies
    @aBucketOfPuppies Жыл бұрын

    This tutorial still works in 2023. And I'm glad I found it. This video was a godsend after trying to get pyrealsense working for over a week. I had to duplicate the .so files into my working folder.

  • @angelleal3005
    @angelleal30053 жыл бұрын

    For anyone struggling or not finding pyrealsense2 it was in /usr/local/lib/python2.7/pyrealsense2 as some other comments suggested. Then you just do export PYTHONPATH=$PYTHONPATH:/usr/local/lib/python2.7/pyrealsense2 and problem solved !

  • @timb772
    @timb7724 жыл бұрын

    YOU ARE THE MAN. lifesaver!

  • @dronetech3358
    @dronetech33584 жыл бұрын

    You are awesome Dennis. Thank you very

  • @LeezyLV
    @LeezyLV4 жыл бұрын

    A million times, thank you.

  • @jazzysehgal7543
    @jazzysehgal7543 Жыл бұрын

    Thanks, I was trying to make it work for python3. If you figured can you please make a separate video for python3?

  • @nivu
    @nivu Жыл бұрын

    Saved my day ❤

  • @sansarlkhagva1141
    @sansarlkhagva11413 жыл бұрын

    Hello nice video. How did you get the pyrealsense library?

  • @yadukrishnan7982
    @yadukrishnan79824 жыл бұрын

    Thanks for posting this video,I have a question will t265 and ardupilot firmware allow drone to arm in guided mode without use of GPS so it could be used in indoor environment

  • @dennisbaldwin

    @dennisbaldwin

    4 жыл бұрын

    Exactly! Will share my results in the coming days.

  • @NSAwatchesME
    @NSAwatchesME3 жыл бұрын

    is it true there are issues with realsense on dev boards like tinker edge r or rockpi 4c because of linux kernel and its not a simple install because some things need to be modified in installation configuration to get it to work and even if get it to work it is buggy?

  • @GM6DroneMapping
    @GM6DroneMapping4 жыл бұрын

    This is probably the wrong video for this question but along the same theme of this video is my question. Have you ever dealt with Pixhawk, 4 in 1 ESC, and a Spektrum radio all on the same build? Holy crap its frustrating.

  • @migueldelahoz4740
    @migueldelahoz47404 жыл бұрын

    Hi Buddy. I'm a person with limitations due to amyotrophic lateral sclerosis disease. Sorry, what is the accuracy of the eye tracking of this device?.

  • @bhaveshjain3452
    @bhaveshjain34523 жыл бұрын

    Hi. How Can I get frames and sensor data to an android device android 8? Can you please video for that Thanks

  • @indira7217
    @indira72173 жыл бұрын

    Can you do a video tutorial like this but for windows?

  • @GOBish23
    @GOBish234 жыл бұрын

    Thanks for this video. Were you ever able to get it to work with Python3? I have tried and tried with no success on python3. Python2 works though.

  • @MrNorbye

    @MrNorbye

    3 жыл бұрын

    i just changed the path to PYTHON_EXECUTABLE . /usr/bin/python3. got I working

  • @MrNorbye

    @MrNorbye

    3 жыл бұрын

    and then use export PYTHONPATH=$PYTHONPATH:/usr/local/lib/python3.6

  • @GOBish23

    @GOBish23

    3 жыл бұрын

    @@MrNorbye thanks for the reply. I had tried that but it was not the solution for me. Here is what eventually worked - it turns out you have to update cmake differently on the Jetson: 1.wget www.cmake.org/files/v3.13/cmake-3.13.0.tar.gz 2. tar xpvf cmake-3.13.0.tar.gz cmake-3.13.0/ 3. cd cmake-3.13.0/ 4. ./bootstrap --system-curl 5. make -j6 6. echo 'export PATH=/home/nvidia/cmake-3.13.0/bin/:$PATH' >> ~/.bashrc 7. source ~/.bashrc

  • @costaiquan5020

    @costaiquan5020

    3 жыл бұрын

    ​@@GOBish23 Hi Gabi. I moved the file to the home directory, and I followed your method, and I got an error: " Configuring incomplete, errors occurred. See also "/home/Koxinga/cmake-3.3.0/CMakeFiles/CMakeOutput.log". See also "/home/Koxinga/cmake-3.3.0/CMakeFiles/CMakeError.log". Error when bootstrapping CMake Problem while running initial CMake" Did you ever meet an error like this?

  • @GOBish23

    @GOBish23

    3 жыл бұрын

    @@costaiquan5020 I didn't - did you change line 6 to be your home path? echo 'export PATH=/home/Koxinga/cmake-3.13.0/bin/:$PATH' >> ~/.bashrc

  • @awosog57
    @awosog573 жыл бұрын

    I tried this. I'm getting "module 'pyrealsense2' has no attribute 'pipeline'. Could someone please help?

  • @BrunoSa96

    @BrunoSa96

    2 жыл бұрын

    same here, how to solve this, can anyone chime in pleease?

  • @ScionTech

    @ScionTech

    Жыл бұрын

    In python script import as "from pyrealsense2 import pyrealsense2 as rs"

  • @pietrolungaro6411
    @pietrolungaro64114 жыл бұрын

    This is super frustrating. Can you explain what it means it did not work for you? I have been following your steps, do not get any errors, but do not have any files regarding pyrealse.so. I am as well on Jetson nano...Do you have any idea of what can be wrong?

  • @asdfds6752

    @asdfds6752

    4 жыл бұрын

    Same here. Got only librealsense2.so and librealsense2.so.2.36 but nothing concerning pyealsense....

  • @asdfds6752

    @asdfds6752

    4 жыл бұрын

    Moreover, do you think it could be possible to share your build folder?

  • @GOBish23

    @GOBish23

    4 жыл бұрын

    In the new SDK (2.36), the files are in a subfolder specific to your python version. For me it looks like this: /usr/local/lib/python2.7/pyrealsense2 . Note that you have to use that directory for your PYTHONPATH as well.

  • @ernestoponce9894

    @ernestoponce9894

    3 жыл бұрын

    Same here, I also check inside /usr/local/lib/python2.7/ but the file is not there either. Followed every step with no errors along the path.

  • @SarindaJayasinghe

    @SarindaJayasinghe

    3 жыл бұрын

    This worked for me export PYTHONPATH=$PYTHONPATH:/usr/local/lib/python3.6/pyrealsense2

  • @glowingenigma
    @glowingenigma3 жыл бұрын

    for python3 - github.com/IntelRealSense/librealsense/issues/6980 (upgrade cmake) and after github.com/jetsonhacks/buildLibrealsense2TX/issues/13 (problem with cmake ../ -DBUILD_PYTHON_BINDINGS:bool=true)