주요 콘텐츠

알고리즘을 개발하여 PX4 Autopilot에 배포하기

알고리즘을 개발하고 PX4 Autopilot에 배포할 모델을 준비합니다.

알고리즘을 개발하고 PX4 Autopilot에 배포할 모델을 준비합니다. 다음 항목에서는 모델 구성 파라미터, COM 포트 설정, Simulink®에서 PX4 Autopilot을 배포하는 방법에 대한 추가 정보를 제공합니다.

Simulink 모델 설정하기

Model Configuration Parameters for PX4 Flight Controller

Parameter and configuration options for creating and running applications on PX4® flight controller

Set COM Port for Upload and Communication in Simulink

Set COM port for Upload and Communication in Simulink models.

Deployment on Cube Orange Autopilot from Simulink

Deploy Simulink generated code to Cube Orange Autopilot.

Deployment on Cube Blue H7 Autopilot from Simulink

Deploy Simulink generated code to Cube Blue H7 Autopilot.

Deployment on Unsupported PX4 Autopilots from Simulink

Deploy Simulink generated code to unsupported PX4 Autopilot.

블록

PX4 uORB ReadRead uORB data for the specified uORB topic
PX4 uORB WriteWrite uORB data for the specified uORB topic
PX4 uORB MessageCreate a blank message using specified uORB topic
PX4 Analog InputMeasure analog voltage applied to an ADC channel
PX4 PWM OutputConfigure PWM outputs for servo motors and ESC control
PX4 Read Position SetpointRead the position setpoints published by the PX4 Navigator module in the uORB topic position_setpoint_triplet (R2021b 이후)
Serial ReceiveRead data from UART or USART port on PX4 flight controller
Serial TransmitSend serial data to UART or USART port
Vehicle AttitudeRead vehicle_odometry uORB topic and obtain attitude measurements
AccelerometerRead sensor_accel uORB topic and obtain three dimensional linear acceleration
GyroscopeRead sensor_gyro uORB topic and obtain three dimensional rate of rotation
MagnetometerRead sensor_mag uORB topic and obtain three dimensional magnetic field
Radio Control TransmitterRead input_rc uORB topic to obtain data from Radio Control Transmitter
Read ParameterRead PX4 system parameters
BatteryRead battery_status uORB topic and obtain details about the battery's state
I2C Controller WriteWrite data to I2C peripheral device or I2C peripheral device register
I2C Controller ReadRead data from I2C peripheral device or I2C peripheral device register
GPSRead vehicle_gps_position uORB topic and obtain GPS coordinates
PX4 CAN ReceiveReceive message from CAN network (R2022b 이후)
PX4 CAN Transmit Transmit message to CAN network (R2022b 이후)
MAVLink Bridge SourceRead MAVLink data from the Pixhawk board (R2022a 이후)
MAVLink Bridge SinkWrite MAVLink data to the Pixhawk board (R2022a 이후)
PX4 ULogLog Simulink signals to an SD card in ULog format (R2023b 이후)
PX4 TimestampOutput absolute timestamp from the PX4 Autopilot to a Simulink model (R2023b 이후)
PX4 Actuator WriteSet actuator values for motors and servos (R2024b 이후)
PX4 Write Thrust & Torque SetpointPublish the thrust and torque setpoints to uORB topics (R2025a 이후)
PX4 Write ParameterWrite PX4 system parameters (R2025a 이후)

함수

getMATFilesFromPixhawkRetrieve MAT-files from SD card inserted on Pixhawk hardware board
px4MATFilestitcherCombine multiple MAT-files retrieved from SD card into a single MAT-file
createPX4uORBMessageCreate custom uORB topic for logging in a Simulink model (R2023b 이후)
createCustomPX4ParameterCreate custom PX4 parameter for writing to the PX4 system parameter (R2025a 이후)

PX4 Autopilot 주변기기 정보

Index Numbers for Analog Channels on Pixhawk Series Controller Boards

Identify the index numbers for signals from analog channels.

Serial Port Names and Corresponding Labels on PX4 Flight Controller Boards

Identify the UART/USART port number for the labels seen on PX4 flight controller boards

I2C Bus Port Numbers for Labels on PX4 Autopilots

Identify the bus port number for the labels seen on PX4 flight controller boards

PX4 Autopilot에서 MAVLink 통신 사용

Enabling MAVLink in PX4 Over USB

Enable MAVLink protocol for PX4 Autopilots over USB.

Connecting to NSH Terminal for Debugging

Connect to the NSH terminal of Pixhawk® Series controller for debugging.

추가 정보

Migrating from Pixhawk Pilot Support Package to UAV Toolbox Support Package for PX4 Autopilots

Migrate from existing Pixhawk Pilot Support Package to the new UAV Toolbox Support Package for PX4 Autopilots.

Plant and Attitude Controller Model for Hexacopter

The UAV Toolbox Support Package for PX4® Autopilots contains a plant and an attitude controller model to fly a hexacopter drone that uses a Pixhawk® Series flight controller.

문제 해결

Troubleshooting Deploy to Hardware Issues

Solve the problems when you try to deploy the Simulink model to Pixhawk Series flight controllers.

Troubleshooting PX4 Firmware Build Failure Due to Flash Memory Overflow on the Hardware

Solve the flash memory overflow on the hardware issues while using the default px4 board build target file.

Troubleshooting Running Out of File Descriptor Issues

Solve the running out of file descriptor issues.

Troubleshooting USB Issues with Cube Orange on Windows

Solve the USB issues with Cube Orange.

추천 예제