Ardupilot與T265配置


1. Ardupilot與T265配置

1.1. 介紹

在英特爾RealSense追蹤相機T265是一種智能相機,它使用專用的V-SLAM 22 (視覺慣性同步定位與地圖)技術,將數據從相機和慣性測量單元(IMU)相結合,跟蹤攝像頭的周圍未知的空間位置GPS可能不可用的地方。該軟件使用所有這些數據來構建並不斷更新環境和設備位置的地圖,並保持較高的准確性

1.2. 系統要求

在Windows和Linux上,通過librealsense支持T265。根據您對T265的需求,配套計算機應具有USB2或USB3:

  • 對於姿勢(xyz位置和方向)數據:任何帶有USB2的板就足夠了。
  • 對於魚眼圖像流:需要USB3。

對於定位和導航用例,我們需要捕獲姿態數據並將其發送到飛行控制器進行定位。一個系統包括:

  • 樹莓派3B型與16GB微型SD卡
  • 運行Ubuntu MATE 16.04 LTS 36

硬件要求

  • 樹莓派3B+
  • 16G高速存儲卡
  • 英特爾追蹤相機T265
  • 能穩定懸停的無人機
  • Pixhawk硬件

軟件要求

樹莓派:

  • ubuntu16.04meta
  • ROS
  • librealsense(T265驅動)
  • realsense-ros (與ROS協同的T265驅動)

1.3. 系統總體框架

1.4. 環境配置


1.4.1. 安裝ROS

設置安裝源

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'

設置密匙

sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654

更新軟件包

sudo apt update

安裝ros-kinetic

sudo apt-get install ros-kinetic-desktop-full
sudo apt-get install ros-kinetic-desktop
sudo apt-get install ros-kinetic-ros-base

初始化環境

sudo rosdep init
rosdep update

更新bash

echo "source /opt/ros/kinetic/setup.zsh" >> ~/.zshrc
source ~/.zshrc

安裝開發依賴包

sudo apt install python-rosinstall python-rosinstall-generator python-wstool build-essential

1.4.2. 安裝MAVROS

Instructions for installing MAVROS can be found here but in short involve running the following command

sudo apt-get install ros-kinetic-mavros ros-kinetic-mavros-extras
wget https://raw.githubusercontent.com/mavlink/mavros/master/mavros/scripts/install_geographiclib_datasets.sh
chmod a+x install_geographiclib_datasets.sh
./install_geographiclib_datasets.sh

For ease of use on a desktop computer, please also install RQT

sudo apt-get install ros-kinetic-rqt ros-kinetic-rqt-common-plugins ros-kinetic-rqt-robot-plugins

We recommend using caktin_tools instead of the default catkin_make as it is more powerful

sudo apt-get install python-catkin-tools

1.4.3. 安裝librealsense

1.4.4. 安裝realsense-ros

1.4.5. T256連接樹莓派

roslaunch mavros apm.launch fcu_url:=/dev/ttyACM0:57600

1.4.6. 啟動攝像頭

There are 3 nodes running in this setup. Launch in 3 separated terminals on RPi:

T265 node:

roslaunch realsense2_camera rs_t265.launch

The topic /camera/odom/sample/ and /tf should be published at 200Hz.
MAVROS node: (with fcu_url and other parameters in apm.launch modified accordingly).

roslaunch mavros apm.launch fcu_url:=/dev/ttyAMA0:921600

rostopic echo /mavros/state should show that FCU is connected.
rostopic echo /mavros/vision_pose/pose is not published

vision_to_mavros node:

roslaunch vision_to_mavros t265_tf_to_mavros.launch

rostopic echo /mavros/vision_pose/pose should now show pose data from the T265.
rostopic hz /mavros/vision_pose/pose should show that the topic is being published at 30Hz


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM