Easier setup for Intel RealSense T265

I am very interested in using my T265 for object avoidance. Is there a thread to follow / get involved in the progress

1 Like

As the files included in the APSYNC image are updated, how does someone with very little knowledge of Linux, update/add files onto the SD card?

Thanks

1 Like

Hi @RoboBill,

We will publish a new APSync image in the near-ish future so you’ll just overwrite the existing SD card (or a new one if you prefer of course) with the new image and the insert it into the RPI4 (or similar) and it should just work.

Linux is tricky so we’re hoping that most people won’t need to log onto the RPI4 ever.

1 Like

@rge99,

Sorry, I missed this post. The team working on this is mostly talking on the ArduPilot VisionProjects gitter channel.

1 Like

We’ve created a new APSync image for the RPI4. If anyone would like to give it a try the image can be downloaded from firmware.ardupilot.org/Companion/apsync/beta/apsync-rpi-ubuntu-t265-20200612.img.xz

You’ll need to use Etcher (or similar) to flash this image to a 16GB (or larger) SD card and then insert it into your RPI4 (RPI3 should also work). More detailed instructions are here.

By the way, when using the T265 we now recommend using Copter-4.1.0-dev and use the EKF3 at least for beta testing purposes. Copter-4.1.0-dev hasn’t been officially released yet so of course you need to be careful because it will have some issues (aka bugs) although it is generally fairly safe.

If you do choose to give this new APSync image a try, please feel free to provide feedback (good or bad) so that we can resolve any issues. Hopefully within a week or so we will make this new apsync image the official/stable version for the RPI4.

I’ve released a new APSync image for the RPI4 + T265 which can be downloaded from https://firmware.ardupilot.org/Companion/apsync/beta/apsync-rpi-ubuntu-t265-20200703.img.xz

Improvements over the previous beta:

  • Intel Realsense libraries upgraded to v2.35.1 (was v2.33.2)
  • Thien’s scripts updated to the latest version including these improvements:
    • status messages including “T265: connecting to camera” inform user of connection problems
    • position reset information passed from the camera to AP’s EKF
    • vision-speed-estimate and vision-position-delta message support
    • user sets EKF origin from the GCS map instead of using a hard-coded location
  • Wifi AP scripts added to allow easier enabling, disabling and switching the band (2.4Ghz vs 5Ghz). Login to the RPI (login:apsync, pwd:apsync) and look at the start_wifi directory. run commands like “sudo ./start_wifi_2.4Ghz.sh”

All testing is greatly appreciated!

3 Likes

IHi @rmackay9. Here’s my set up so far - RPI4 + Intel T625 Camera + Pixhawk 4 flight controller.
As of now I have used your latest apsync image that you mentioned at the start of the documentation. I have installed librealsense using installation steps from Ubuntu page. (https://github.com/IntelRealSense/librealsense/blob/master/doc/installation.md). Is this fine or should I use rpi running ubunti wiki - which is for ubuntu 16.04?

I’m having issues with pyrealsense2.
I used these commands -

  • sudo add-apt-repository ppa:ubuntu-toolchain-r/test
  • sudo apt-get update
  • sudo apt-get install gcc-5 g++-5
  • sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 60 --slave /usr/bin/g++ g++ /usr/bin/g++-5
  • sudo update-alternatives --set gcc "/usr/bin/gcc-5"

cmake …/ DCMAKE_BUILD_TYPE=Release

  • cmake ../ -DBUILD_EXAMPLES=true

sudo make uninstall && make clean && make && sudo make install

This runs without error, but does not create a “python” folder inside ~/librealsense/build/wrappers/

However, I can run this example “t265_example.py” inside ~/librealsense/wrappers/python/example

Then I try this command -
pip3 install pyrealsense2

It throws this error -
Collecting pyrealsense2
Could not find a version that satisfies the requirement pyrealsense2 (from versions: )
No matching distribution found for pyrealsense2

I have tried a lot of things, but unable to solve this problem. Is there something that I’m missing out on? Please help

@gauravshukla914,

Sounds like you are using the RPI4 image linked from this AP wiki page https://ardupilot.org/copter/docs/common-vio-tracking-camera.html so it shouldn’t be necessary to any modification of packages on the RPI4. It should not even be necessary to log into the RPI4. If connected correctly to the autopilot and the ArduPilot params are set as mentioned on that wiki page it should just work.

Maybe go back and reinstall the RPI4 image?

Thanks @rmackay9 Yes I’m using the apsync image from the wiki page. Well my plan is to fly the drone autonomously using python scripts which @LuckyBird uses to provide waypoints. So I still need to install pyrealsense2 right along with realsense ros and mavros packages.

Hi @gauravshukla914, if you can build librealsense with Python wrapper successfully, then the library pyrealsense2.so should be under /usr/local/lib and not necessary to install via pip3 anymore.

1 Like

Im using jetson nano with 2 monitors its pretty cool.

Has there been progress on using it in conjunction with GPS?

@vosair,

Yes, I’ve added a wiki page here which shows the setup for transitioning from GPS to Non/GPS environments.

3 Likes

I am try to setup the T265 on my rover with raspberry pi 4 but having some problem.

I am using rover 4.1.0 dev on Cube Black, raspberry pi4 with the APSync image on Ardupilot wiki. No modification on APSync.

wiring:

At first I was trying to connect the pi and cube through gpio serial port.


But the connection keeps failing. I was thinking if there are any hardware conflict in pi, but there is no config.txt in ubuntu.

I have also tried using a CH340 serial-USB converter. The connection seems good


But I can’t get my vehicle in Africa as it should

After about 1 minute the vehicle should appear on the ground station map in central Africa.

If I manually set somewhere as EKF origin, the rover does appear on the map.

The baud rate was not 921600 as default because I’m not sure if baudrate makes any different. So I tried to lower it.

1 Like

@AlvinLai,

Ah, sorry, the wiki is out of date on this point. The vehicle no longer appears in Africa but instead you must set the EKF origin… the easiest way being to use MP’s right-mouse-button menu and select, “Set Home Here” >> “Set EKF Origin Here”.

I’ll fix up the wiki, txs!

1 Like

Nice! I was worrying the system wouldn’t fuse the vision positioning data if I manually set the EKF origin.

For the pi connection, is it possible to connect it through gpio? The wiki page tells connecting autopilot telem - PiConnectLite serial - pi gpio. Are there extra stuffs needs to be setting up if I skip the PiConnectLite part?
I would like to avoid serial-USB converter if possible, because I think gpio is more secured.

@AlvinLai,

You can certainly connect the autopilot to the PI directly using some of the pins on the RPI4. In fact, the PiConnectLite doesn’t do a huge amount except make it easy to connect a power supply and the telemetry cable properly and securely. It’s recommended but optional.

Finally figure out the gpio serial. I’m now connecting Ardupilot and pi through gpio. Old problem, bluetooth occupied it. There should be some setting in pi needed to disable the bluetooth but never mentioned. I thought APSync had setup for me but apparently it didn’t.

Pi-Connect Lite documentation tells you how to enable its serial in raspbian, but not in ubuntu.

To do this
Edit /boot/firmware/syscfg.txt then add

# Disable Bluetooth
enable_uart=1
dtoverlay=disable-bt

(For pi3, the dtoverlay should be something like pi3-disable-bt. But I didn’t test it)

Edit /boot/firmware/nobtcmd.txt then remove

console = /ttyAMA 115200

from the line, to disable serial shell.

1 Like

Hi, I’m using the APSync Ubuntu image from this page too, but it doesn’t work. I get “Pre Arm: VisOdom: not healthy”.

I’m using a RPI4.

On Mission Planner I don’t have VISION_POSITION_ESTIMATE but I can’t figure out why

–edit–

I found out some errors on the boot:

[FAILED] Failed to start Load Kernel Modules
See ‘systemctl status systemd-modules-load.service’ for details

[FAILED] Failed to start MAVLink Router.
See “systemctl status mavlink-router.service” for details.

Still no clue…

Hi I have issue with apsync-rpi-ubuntu-t265-latest.img.xz.It doesn`t boot on both rpi3 and rpi4 What could be mistake.The green led of rpi which is indicator of booting is doesnt flash stable and hdmi doesnt work.I have official power supply for both rpi.