码迷,mamicode.com
首页 > 其他好文 > 详细

Ardupilot与T265配置

时间:2019-12-26 21:07:21      阅读:118      评论:0      收藏:0      [点我收藏+]

标签:mon   The   驱动   real   tty   nal   amp   cti   source   

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

Ardupilot与T265配置

标签:mon   The   驱动   real   tty   nal   amp   cti   source   

原文地址:https://www.cnblogs.com/hellocxz/p/12104290.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!