Controller Architecture

原文地址: https://pixhawk.org/dev/controller_architecture

The PX4 middleware uses a set of standardized interfaces to read control inputs, to output control outputs and to mix those onto actuators.

The top-level inputs can be a number of things, typically its radio control values sent by a pilot flying in simple / assisted mode, a waypoint / setpoint or a velocity vector the system is trying to follow.

All names in capital letters, such as INPUT_RC, are uORB topics.

Overview

This diagram shows how input from the pilot or ground control station is processed in the onboard control architecture. Individual control blocks (in most cases tasks or threads) are colored, the involved uORB topics are white boxes. A list of all uORB topics is in the Doxygen uORB documentation and always up to date.

Manual Input Standard

Radio Control Parameters

The RAW PPM channels are scaled to a range of 0..1 for throttle and -1..1 for other control channels. To achieve this, a total of five parameters has to be set:

  • RC_X_MIN: Minimum value. Set to minimum value when the stick is at the bottom / left
  • RC_X_TRIM: Trim value. Set to the value the stick has in center position and  same as minimum for throttle.
  • RC_X_MAX: Maximum value. Set to maximum value when the stick is at the top / right
  • RC_X_REV: Channel reverse. If the stick value is at the bottom / left not 0 in RAW PWM units but at the maximum of around 1800-2000, set this parameter to -1 to reverse the channel. Keep at 1 else.
  • RC_X_DZ: Deadzone. In this value range (in raw PPM units) the stick input is set to zero. This is to prevent bad recentering on a remote control to give small inputs. Set to 30 for normal channels and 10 for throttle as default.

Radio Control Normalization

  • Left stick: Bottom left corner is -1 for X and 0 for Y, center is 0, 0.5, top right is 1, 1 (assuming that the Y axis is throttle, which ranges from 0 to 1 and not -1 to 1 as the other channels)
  • Right stick: Bottom left corner is -1 for X and -1 for Y, center is 0, 0, top right is 1, 1
  • Switches: All the way away from the pilot / down: -1, all the way towards the pilot: 1
  • Potentiometers: all the way to the left: -1, all the way turned to the right: 1

Manual Control Setpoints

  • x: roll
  • y: pitch
  • r: yaw
  • z: throttle

Waypoint Input Conventions

Controller Setpoint Conventions

  • control 0: roll
  • control 1: pitch
  • control 2: yaw
  • control 3: throttle

Actuator Output Standards

Validation / Debugging

In order to check that the system setup is valid, perform these steps. Make sure to have your radio control ready, QGroundControl connected and in Main Widget → Realtime Plot selected.

If it is a multirotor, unmount all props. If it is a fixed wing, unmount props or keep a safe clearance and make sure to not touch the throttle lever. If unsure, unmount the prop.

Manual Input Check

Place the airframe on a level surface (multirotor of fixed wing) and put it into manual mode (or stabilized, if a multirotor)

  1. Arm the system ( PROPS UNMOUNTED)
  2. Give positive pitch on the RC (pull the right lever on the remote down, assuming the setup is mode 2 (throttle/rudder on left stick, pitch/roll on right stick)
  3. Check that the MANUAL_CONTROL value in the line chart plot in the y dimension becomes positive (pitch up)
  4. Check that the output of “ctrl eff 1” becomes positive as well (it should 'try' to pitch up)
  5. If on an airplane: Check that the elevons also try to pitch up, on a multirotor check that the RPMs of the motors on the back increase
Stabilization Response Check
  1. Arm the system ( PROPS UNMOUNTED)
  2. Keep the remote control inputs at center (throttle at min), and pitch the nose of the plane / multicopter down
  3. Check that the output of “ctrl eff 1” becomes positive (it should 'try' to pitch up)
  4. If on an airplane: Check that the elevons also try to pitch up, on a multirotor check that the RPMs of the motors on the back increase
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值