当前位置:网站首页>Pixhawk4+Up Board / NUC Implement VIO By Deploying T265
Pixhawk4+Up Board / NUC Implement VIO By Deploying T265
2022-04-22 07:17:00 【ZXXL】
Reference Links
Open links below in sequence.
(Things you need to learn, or following Overall Steps below but get nothing )
Some are combined by same web page.
ROS Tutorials
PX4 User Guide
PX4 Development Guide
Initial Setup
Ubuntu Development Environment
PX4 Buliding(Alternative)
Companion Computer
MAVLink
MAVROS Installation
MAVLink Router(Alternative)
VIO Introduction
MAVLink Interface
T265
VIO Git
VIO Dependence
Realsense-ros
Vision_to_Mavros
MAVLink Inspector
Flight Analysis which is really important.
(Matlab is available of course)
cnROS_T
cnPX4_UG
cnPX4_DG
PX4 User/Development Guide & ROS Tutorials in Chinese.
(Recommend BUT Reference)
QGC User Guide
Flight Modes
Flight Modes Setup
Vehicle Status Notifications !!! MUST Remember and Check before each Flying Mission !!!
Notes
- How to install Java & Ant correctly.(if using Flightplot)
- connection between PX4 & Up Board
Overall Steps Beta
Capable in 20.04 tutorial has released. Please check at the end of the article.
Already have drones and a PC installed QGC?
Disarm your propellers First !
ESC Calibration
After ESC Calibration, press SWITCH button
Step 1. Choose Companion Computer
Intel NUC or Up Board (both used in my development) or others, with Ubuntu18.04 Mate or 16.04 (18.04 is officially recommend).
Step 2. PX4 Tool Chain
Set on the computer that using QGC for PX4 firmware upgrade.
CC is recommend.
Here’s reference with his notes
git clone https://github.com/PX4/Firmware.git --recursive
bash ./Firmware/Tools/setup/ubuntu.sh
reboot
sudo apt upgrade libignition-math2 //In case of (gazebo: symbol lookup error: xxx_xxx...)
//*************************
//QGC Linux Installtion
sudo usermod -a -G dialout $USER
sudo apt-get remove modemmanager -y
sudo apt install gstreamer1.0-plugins-bad gstreamer1.0-libav gstreamer1.0-gl -y
sudo apt install libqt5gui5 -y
/**Download QGC from Link above**/
chmod +x ./QGroundControl.AppImage
./QGroundControl.AppImage
//**************************
//Test if Tool Chain successfully configured
//Run QGC first
cd Firmware/
make px4_sitl_default jmavsim /*(or gazebo)*/ //Run Simulation
commander takeoff
commander land
Step 3. Basic Environment Setting: Ros Melodic installed. (or 16.04 & kinetic)
Before Ros installed (python2.7 for 18.04)
sudo apt install python2.7
sudo ln -s /usr/bin/python2.7 /usr/bin/python
Step 4. Install Mavros
mavros is a ROS (1) package that enables MAVLink extendable communication between computers running ROS1 for any MAVLink enabled autopilot, ground station, or peripheral. MAVROS is the “official” supported bridge between ROS1 and the MAVLink protocol.
The easiest way to setup PX4 simulation with ROS on Ubuntu Linux is to use the standard installation script that can be found at Development Environment on Linux > Gazebo with ROS.
wget https://raw.githubusercontent.com/PX4/Devguide/master/build_scripts/ubuntu_sim_ros_melodic.sh
bash ubuntu_sim_ros_melodic.sh
or
sudo apt-get install ros-melodic-mavros ros-melodic-mavros-extras
//For 'wget' below
sudo apt-get install openssl
sudo apt-get install libssl-dev
wget https://raw.githubusercontent.com/mavlink/mavros/master/mavros/scripts/install_geographiclib_datasets.sh
sudo bash ./install_geographiclib_datasets.sh
Step 5. VIO Dependencies
- ROS in step1.
- Librealsense
build it from source or following below bash code
export http_proxy="http://<proxy>:<port>" //In case the public key cannot be retrieved
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE || sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE
sudo add-apt-repository "deb https://librealsense.intel.com/Debian/apt-repo $(lsb_release -cs) main" -u
sudo apt-get install librealsense2-dkms
sudo apt-get install librealsense2-utils
sudo apt-get install librealsense2-dev
sudo apt-get install librealsense2-dbg
/*Reconnect the Intel RealSense depth camera and run:
realsense-viewer
to verify the installation.*/
//sudo apt install python-catkin-tools
Step 6. T265 Dependencies
// realsense2_camera
sudo apt-get install ros-melodic-realsense2-camera
sudo apt install ros-melodic-cv-bridge ros-melodic-image-transport ros-melodic-tf ros-melodic-diagnostic-updater ros-melodic-ddynamic-reconfigure
//**************************
//Realsense SDK
git clone https://github.com/IntelRealSense/librealsense.git
cd librealsense
mkdir build
cd build
cmake ../ -DCMAKE_BUILD_TYPE=Release -DBUILD_EXAMPLES=true \
-DFORCE_RSUSB_BACKEND=ON -DBUILD_WITH_TM2=false -DIMPORT_DEPTH_CAM_FW=false
sudo make uninstall && make clean && make && sudo make install
//**************************
//realsense-ros
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
git clone -b 2.2.7 https://github.com/IntelRealSense/realsense-ros.git
sudo apt-get install ros-melodic-ddynamic-reconfigure
catkin_init_workspace
cd ..
catkin_make clean
/****
There might be a "...find_if... ...suggested alternative: In file included from...from..." error while below catkin_make
vim /home/xxl/catkin_ws/src/realsense-ros/realsense2_camera/src/base_realsense_node.cpp +1854
//Then add 'std::' before 'find_if'
***/
catkin_make -DCATKIN_ENABLE_TESTING=False -DCMAKE_BUILD_TYPE=Release
catkin_make install
gedit ~/.bashrc
source ~/catkin_ws/devel/setup.bash
export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:~/catkin_ws/
Step 7. Vision_to_Mavros
This is vision_to_mavros project original, you may get something useful.
mkdir -p ~/vision_ws/src
cd ~/vision_ws/src
git clone https://github.com/thien94/vision_to_mavros.git
catkin_init_workspace
cd ..
catkin_make
gedit ~/.bashrc
source ~/vision_ws/devel/setup.bash
export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:~/vision_ws/
cd vision_ws/src/vision_to_mavros/launch
vim t265_all_nodes.launch
//TURN <include file="$(find mavros)/launch/apm.launch"/> TO <include file="$(find mavros)/launch/px4.launch"/>
//***
If there is timesync warning during below step, you can
sudo vim /opt/ros/melodic/share/mavros/launch/px4_config.yaml
CHANGE line 12
/
timesync_rate: 0.0
/
/***
Step 8. VIO Installation
cd ~/catkin_ws/src
git clone https://github.com/Auterion/VIO.git
sudo apt install ros-melodic-mavros ros-melodic-mavros-extras //melodic
cd ~/catkin_ws
catkin build px4_realsense_bridge
source ~/catkin_ws/devel/setup.bash
roslaunch px4_realsense_bridge bridge_mavros.launch //This launch file starts the mavros node as well.
Step 8. QGC Parameter Setup
Set up Step2. computer’s QGC
Official

here’s my addition
| Parameter name | Set the value |
|---|---|
| MPC_XY_VEL_MAX (X/Y Direction maximum speed limit ) | 0.50m/s(1.12mph) |
| MPC_Z_VEL_MAX_DN (Z Shaft lowering speed limit ) | 0.500m/s(1.12mph) |
| MPC_Z_VEL_MAX_UP (Z Shaft rising speed limit ) | 0.500m/s(1.12mph) |
| PWM_MAX Upper limit of channel frequency | 2000us |
| PWM_MIN Lower limit of channel frequency | 1000us |
| CBRK_USB_CHK | 197848 ( Ban USB Check ) |
| EKF2_AID_MASK () | 24 ( Visual peripheral number ) |
| EKF2_HGT_MODE ( Height source ) | Vision |
| SENS_TEL2_BAUD (TELEM2 Baud rate setting ) | 921600 8N1 |
Step 9. Connection CC with PX4
Official
...
...
...
Flight_Modes
USE FTDI FT232
sudo chmod 777 /dev/ttyUSB0
sudo vim /opt/ros/melodic/share/mavros/launch/px4.launch
//*****************
/CHANGE/
<arg name="fcu_url" default="/dev/ttyACM0:57600" />
/TO/
<arg name="fcu_url" default="/dev/ttyUSB0:460800" />
*****************//
UDEV<--------MUST DO IT
Step 10. Check Everything
roscore
rosrun turtlesim turtlesim_node
rosrun turtlesim turtle_teleop_key
/**********************************************/
roslaunch realsense2_camera demo_t265.launch
/***********************************************/
roslaunch mavros px4.launch
/***********************************************/
roslaunch realsense2_camera rs_t265.launch
roslaunch mavros px4.launch
roslaunch vision_to_mavros t265_tf_to_mavros.launch
/************************************************/
roslaunch vision_to_mavros t265_all_nodes.launch
rostopic echo mavros/vision_pose/pose
Step 11. Others
Ros launch automatically. (rm_bringup is recommend)
Easy way.
System Setting -----> login window ----> automatic login
vim start.sh
" #! /bin/bash source /opt/ros/melodic/setup.bash source ~/catkin_ws/devel/setup.bash source ~/vision_ws/devel/setup.bash roslaunch vision_to_mavros t265_all_nodes.launch "
sudo chmod 777 start.sh
Add start.sh to System Startup Application
Now Enjoy
Arm your paddle
RC----POSITION MODE
roslaunch vision_to_mavros t265_all_nodes.launch
Capable in 20.04

版权声明
本文为[ZXXL]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220610405078.html
边栏推荐
- ASP.NET日常开发随手记------解析和转换xml
- Parseexception unparseable date time conversion exception
- 假设成年人的体重和身高存在此种关系: 身高(厘米)-100=标准体重(千克) 如果一个人的体重与其标准体重的差值在正负5%之间,显示“体重正常”,其他则显示“体重超标”。编写程序,能处理用户输入的
- [bug notes] mounted is executed only once under keepalive
- [bug notes] input: - WebKit autofill: the input box automatically fills in the background problem
- 分布式任务调度与计算框架:PowerJob 高级特性-容器 03
- Wechat third party web page authorization
- leetcode 打卡
- 安裝和修改uTools及vscode插件安裝路徑
- 【Bug小记】页面刷新后获取不到sessionstorage数据
猜你喜欢

Jenkins部署pm2

Matlab: remove audio signal noise

Shift left and right

Introduction to IC Analog Layout - learning notes on layout Basics (2)

Install and modify the installation path of utools and vscode plug-ins

安装和修改uTools及vscode插件安装路径

模二除运算的上商原则

SQL server stored procedure development notes - piecemeal problems and operations on operation files

Comparison and improvement of Nacos service registration center

Chip design how to prepare for the upcoming autumn recruitment and spring recruitment in the coming year?
随机推荐
Distributed task scheduling and computing framework: powerjob advanced features - OpenAPI 04
实验室安全考试
Installer et modifier les chemins d'installation des plug - ins utools et vscode
A solution to the error of selecting objects in pyautocad
XPath of crawler notes
VScode 看这一篇就够了
Notes on daily development ---- some easy-to-use settings on vs
Eight functions of random library
Nacos服务提供者注册
[bug notes] mounted is executed only once under keepalive
PowerJob 工作流
[bug notes] input: - WebKit autofill: the input box automatically fills in the background problem
MySQL学习笔记
Chip design how to prepare for the upcoming autumn recruitment and spring recruitment in the coming year?
Parseexception unparseable date time conversion exception
Difference between analog IC design and digital IC design, including salary table
Does microelectronics major make chips? What is the chip related to?
ASP. Net daily development notes ---- export to excel
leetcode 打卡
Is it difficult to get started with self-study of Digital IC design? How to get started quickly?
