当前位置:网站首页>Px4 system terminal for pixhawk

Px4 system terminal for pixhawk

2022-06-26 00:49:00 Blue sky

Version Description :

1. Self driving instrument :Holybro Of Pixhawk 4.

2. PX4 edition :1.13

3. The host machine :Thinkpad The notebook +Ubuntu 20.04.2 LTS

Reference resources :PX4 Consoles/Shells | PX4 User Guide

One . Making hardware interface

This interface is 3 Root line , take PC The machine USB Serial port and Pixhawk Serial port ( Also called Debug port) Connect .

1. understand Pixhawk 4 Yes IO Debug Interface and FMU Debug Definition of interface

PIXHAWK 4 There are two Debug Port, One is IO Debug Port, The other is FMU Debug Port. Both ports provide Pixhawk standard 6-Pin SH Debug Port.(6 The needle )

2. take Pixhawk 4 Of FMU Debug Port With the host USB The mouth is connected

In order to realize the system terminal , The host machine USB Need to be connected to a FTDI On the converter (FTDI Yes, it will USB A device that converts a port into a serial port ), I'm buying Pixhawk 4 Of the wire package Debug Port Adapter wire of ( See the picture below ), This wire is made of 6 The root line connects the two adapters , Can be cut from the middle , A system terminal interface , The other can be used to do J-Link Interface .

stay 6 Select... From the root line 3 Root line and FTDI The pins of the ,3 How to choose the root line , See the table below :

FMU Debug Port

FTDI

1 Vtref

-

2 Console TX

5

3 Console RX

4

4 SWDIO

-

5 SWDCLK

-

6 GND

1

The finished 3 Root line will FTDI( Right connection FTDI DuPont head is used for stitching ) And FMU Debug Port Adapter port of ( White on the left ) Connect , See the picture below .

  Two . Software part

1. stay Ubuntu End installation screen Software :

sudo apt-get install screen

2. Connection interface , start-up Pixhawk

Connect one end of the interface to PC Machine connection , The other end is with Pixhawk 4 Of FMU Debug Mouth connection , Then start Pixhawk.

3. function screen command  

 Open one linux terminal , Run the following command   screen /dev/ttyXXX BAUDRATE 8N1

here ttyxxx choice ttyACM1 perhaps ttyUSB0. baudrate choice 57600, such as :

sudo screen /dev/ttyUSB0 57600 8N1

here , stay screen ... appears in the interface "nsh>" Prompt , Can run nuttx command .

If you unplug the connection Pixhawk Of USB Connecting line , Then put on , You'll see PX4 stay Pixhawk Start sequence information on , Here's the picture :

 

原网站

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