当前位置:网站首页>2.0 detailed explanation of ROS and Px4 communication

2.0 detailed explanation of ROS and Px4 communication

2022-06-11 01:43:00 Mbot

**

ROS And PX4 Communication for introduction :

**
Video Explanation link :ROS And PX4 Communication for introduction

This part is mainly divided into three parts , It mainly includes ROS Configuration of the environment 、PX4 Configuration of the environment , as well as MAVROS Installation , Scholars can configure by themselves according to the following links , The complete configuration of link bits is given below , Readers can view the entire configuration process in detail , Avoid spending too much time on environment configuration .
( Be careful : The following configuration process can be realized through simulation PX4 and ROS Communication for , And complete the simple offboard Control mode , But in the process of physical connection , Still slightly different from the simulation environment , Please check this chapter carefully )

**

Simulation environment :

**

1、ROS Installation tutorial (ROS Melodic + Ubuntu18.04)
https://www.cnblogs.com/cporoske/p/11612158.html

2、[Pixhawk/PX4] Development environment construction (Ubuntu 18.04)
https://www.cnblogs.com/cporoske/p/11630426.html

3、[PX4]mavros install +offboard Control process records
https://www.cnblogs.com/cporoske/p/11641477.html

Physical part : After configuring the above environment , Can pass USB First connect the laptop to the flight control , In the process of connecting , It should be turned off QGC Ground station , Otherwise, a serial port connection conflict will occur .

Step one : Pass the assembled physical UAV USB The cable is connected to the main control end , It should be noted that , Connect PC Of USB mouth , Use as much as possible PC Self contained USB mouth , Through one turn of multiple boards , There may be a problem with the connection .
 Insert picture description here

Step two : Open the terminal , Check whether flight control is recognized , Enter the command ll /dev/ttyACM*
 Insert picture description here

Step three : After detection , Add permissions , Otherwise it won't start , The terminal command is as follows :

sudo chmod 777 /dev/ttyACM0

Specific permissions can be configured by yourself
 Insert picture description here

Step four : start-up mavros node , The terminal command is as follows :

roslaunch mavros px4.launch _fcu_url:=/dev/ttyACM0:57600

The baud rate can be configured after you are familiar with it , In this paper, we have 57600 For example , Need and PX4 Agreement .
 Insert picture description here

   After successfully starting the node , You can see the feedback version number and other information , thus , Have gone through MAVROS Realized ROS And PX4 Communication for .

 Insert picture description here

**

MAVROS Introduce

**

introduction :

Realization ROS and PX4 Firmware communication requires certain protocol conversion ,PX4 It's using MAVLINK agreement , In order to realize the communication between the two , Usually use MAVROS As a bridge , Concrete MAVROS Introduce , Relevant links will be given below , What you are interested in can be studied in depth , For general use , To understand its function as a whole, just pay attention to it .

This part is mainly divided into three parts , It mainly includes ROS Configuration of the environment 、PX4 Configuration of the environment , as well as MAVROS Installation , Scholars can configure by themselves according to the following links , The complete configuration of link bits is given below , Readers can view the entire configuration process in detail , Avoid spending too much time on environment configuration .
( Be careful : The following configuration process can be realized through simulation PX4 and ROS Communication for , And complete the simple offboard Control mode , But in the process of physical connection , Still slightly different from the simulation environment , Please check this chapter carefully )

Simulation environment :

1、MAVROS brief introduction
https://www.ncnynl.com/archives/201709/2077.html

2、MAVROS Official website
http://wiki.ros.org/mavros

**

MAVROS Common topics and services

**

introduction
It's going on MAVROS Before learning , First, please ROS Do a simple study . In understanding ROS On the basis of MAVROS Learning from , Can quickly master MAVROS Development of communication protocol .
be based on ROS+PX4 Development mode , Communication between the two is indispensable , This summary mainly introduces some commonly used methods MAVROS Topics and services related to controlling UAV movement . Need a detailed and in-depth understanding , Please refer to the MAVROS Official website .
In the next summary , A specific topic will be selected for introduction , Other topics and services are essentially the same , Not much to say , Give the link directly .

1、MAVROS Common topics and service introduction
https://blog.csdn.net/qq_26550927/article/details/102993703

原网站

版权声明
本文为[Mbot]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/162/202206110025144462.html