text: (window.webpackJsonp=window.webpackJsonp||[]).push([[818],{1710:function(t,a,e){"use strict";e.r(a);var r=e(18),s=Object(r.a)({},(function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"modules-reference-controller"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#modules-reference-controller"}},[t._v("#")]),t._v(" Modules Reference: Controller")]),t._v(" "),e("h2",{attrs:{id:"airship-att-control"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#airship-att-control"}},[t._v("#")]),t._v(" airship_att_control")]),t._v(" "),e("p",[t._v("Source: "),e("a",{attrs:{href:"https://github.com/PX4/Firmware/tree/master/src/modules/airship_att_control",target:"_blank",rel:"noopener noreferrer"}},[t._v("modules/airship_att_control"),e("OutboundLink")],1)]),t._v(" "),e("h3",{attrs:{id:"description"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#description"}},[t._v("#")]),t._v(" Description")]),t._v(" "),e("p",[t._v("This implements the airship attitude and rate controller. Ideally it would\ntake attitude setpoints ("),e("code",[t._v("vehicle_attitude_setpoint")]),t._v(") or rate setpoints (in acro mode\nvia "),e("code",[t._v("manual_control_setpoint")]),t._v(" topic) as inputs and outputs actuator control messages.")]),t._v(" "),e("p",[t._v("Currently it is feeding the "),e("code",[t._v("manual_control_setpoint")]),t._v(" topic directly to the actuators.")]),t._v(" "),e("h3",{attrs:{id:"implementation"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#implementation"}},[t._v("#")]),t._v(" Implementation")]),t._v(" "),e("p",[t._v("To reduce control latency, the module directly polls on the gyro topic published by the IMU driver.")]),t._v(" "),e("p",[e("a",{attrs:{id:"airship_att_control_usage"}})]),t._v(" "),e("h3",{attrs:{id:"usage"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#usage"}},[t._v("#")]),t._v(" Usage")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("airship_att_control <command> [arguments...]\n Commands:\n   start\n\n   stop\n\n   status        print status info\n")])])]),e("h2",{attrs:{id:"fw-att-control"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#fw-att-control"}},[t._v("#")]),t._v(" fw_att_control")]),t._v(" "),e("p",[t._v("Source: "),e("a",{attrs:{href:"https://github.com/PX4/Firmware/tree/master/src/modules/fw_att_control",target:"_blank",rel:"noopener noreferrer"}},[t._v("modules/fw_att_control"),e("OutboundLink")],1)]),t._v(" "),e("h3",{attrs:{id:"description-2"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#description-2"}},[t._v("#")]),t._v(" Description")]),t._v(" "),e("p",[t._v("fw_att_control is the fixed wing attitude controller.")]),t._v(" "),e("p",[e("a",{attrs:{id:"fw_att_control_usage"}})]),t._v(" "),e("h3",{attrs:{id:"usage-2"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#usage-2"}},[t._v("#")]),t._v(" Usage")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("fw_att_control <command> [arguments...]\n Commands:\n   start\n     [vtol]      VTOL mode\n\n   stop\n\n   status        print status info\n")])])]),e("h2",{attrs:{id:"fw-pos-control-l1"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#fw-pos-control-l1"}},[t._v("#")]),t._v(" fw_pos_control_l1")]),t._v(" "),e("p",[t._v("Source: "),e("a",{attrs:{href:"https://github.com/PX4/Firmware/tree/master/src/modules/fw_pos_control_l1",target:"_blank",rel:"noopener noreferrer"}},[t._v("modules/fw_pos_control_l1"),e("OutboundLink")],1)]),t._v(" "),e("h3",{attrs:{id:"description-3"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#description-3"}},[t._v("#")]),t._v(" Description")]),t._v(" "),e("p",[t._v("fw_pos_control_l1 is the fixed wing position controller.")]),t._v(" "),e("p",[e("a",{attrs:{id:"fw_pos_control_l1_usage"}})]),t._v(" "),e("h3",{attrs:{id:"usage-3"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#usage-3"}},[t._v("#")]),t._v(" Usage")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("fw_pos_control_l1 <command> [arguments...]\n Commands:\n   start\n     [vtol]      VTOL mode\n\n   stop\n\n   status        print status info\n")])])]),e("h2",{attrs:{id:"mc-att-control"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#mc-att-control"}},[t._v("#")]),t._v(" mc_att_control")]),t._v(" "),e("p",[t._v("Source: "),e("a",{attrs:{href:"https://github.com/PX4/Firmware/tree/master/src/modules/mc_att_control",target:"_blank",rel:"noopener noreferrer"}},[t._v("modules/mc_att_control"),e("OutboundLink")],1)]),t._v(" "),e("h3",{attrs:{id:"description-4"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#description-4"}},[t._v("#")]),t._v(" Description")]),t._v(" "),e("p",[t._v("This implements the multicopter attitude controller. It takes attitude\nsetpoints ("),e("code",[t._v("vehicle_attitude_setpoint")]),t._v(") as inputs and outputs a rate setpoint.")]),t._v(" "),e("p",[t._v("The controller has a P loop for angular error")]),t._v(" "),e("p",[t._v("Publication documenting the implemented Quaternion Attitude Control:\nNonlinear Quadrocopter Attitude Control (2013)\nby Dario Brescianini, Markus Hehn and Raffaello D'Andrea\nInstitute for Dynamic Systems and Control (IDSC), ETH Zurich")]),t._v(" "),e("p",[t._v("https://www.research-collection.ethz.ch/bitstream/handle/20.500.11850/154099/eth-7387-01.pdf")]),t._v(" "),e("p",[e("a",{attrs:{id:"mc_att_control_usage"}})]),t._v(" "),e("h3",{attrs:{id:"usage-4"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#usage-4"}},[t._v("#")]),t._v(" Usage")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("mc_att_control <command> [arguments...]\n Commands:\n   start\n     [vtol]      VTOL mode\n\n   stop\n\n   status        print status info\n")])])]),e("h2",{attrs:{id:"mc-pos-control"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#mc-pos-control"}},[t._v("#")]),t._v(" mc_pos_control")]),t._v(" "),e("p",[t._v("Source: "),e("a",{attrs:{href:"https://github.com/PX4/Firmware/tree/master/src/modules/mc_pos_control",target:"_blank",rel:"noopener noreferrer"}},[t._v("modules/mc_pos_control"),e("OutboundLink")],1)]),t._v(" "),e("h3",{attrs:{id:"description-5"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#description-5"}},[t._v("#")]),t._v(" Description")]),t._v(" "),e("p",[t._v("The controller has two loops: a P loop for position error and a PID loop for velocity error.\nOutput of the velocity controller is thrust vector that is split to thrust direction\n(i.e. rotation matrix for multicopter orientation) and thrust scalar (i.e. multicopter thrust itself).")]),t._v(" "),e("p",[t._v("The controller doesn't use Euler angles for its work, they are generated only for more human-friendly control and\nlogging.")]),t._v(" "),e("p",[e("a",{attrs:{id:"mc_pos_control_usage"}})]),t._v(" "),e("h3",{attrs:{id:"usage-5"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#usage-5"}},[t._v("#")]),t._v(" Usage")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("mc_pos_control <command> [arguments...]\n Commands:\n   start\n     [vtol]      VTOL mode\n\n   stop\n\n   status        print status info\n")])])]),e("h2",{attrs:{id:"mc-rate-control"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#mc-rate-control"}},[t._v("#")]),t._v(" mc_rate_control")]),t._v(" "),e("p",[t._v("Source: "),e("a",{attrs:{href:"https://github.com/PX4/Firmware/tree/master/src/modules/mc_rate_control",target:"_blank",rel:"noopener noreferrer"}},[t._v("modules/mc_rate_control"),e("OutboundLink")],1)]),t._v(" "),e("h3",{attrs:{id:"description-6"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#description-6"}},[t._v("#")]),t._v(" Description")]),t._v(" "),e("p",[t._v("This implements the multicopter rate controller. It takes rate setpoints (in acro mode\nvia "),e("code",[t._v("manual_control_setpoint")]),t._v(" topic) as inputs and outputs actuator control messages.")]),t._v(" "),e("p",[t._v("The controller has a PID loop for angular rate error.")]),t._v(" "),e("p",[e("a",{attrs:{id:"mc_rate_control_usage"}})]),t._v(" "),e("h3",{attrs:{id:"usage-6"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#usage-6"}},[t._v("#")]),t._v(" Usage")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("mc_rate_control <command> [arguments...]\n Commands:\n   start\n     [vtol]      VTOL mode\n\n   stop\n\n   status        print status info\n")])])]),e("h2",{attrs:{id:"navigator"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#navigator"}},[t._v("#")]),t._v(" navigator")]),t._v(" "),e("p",[t._v("Source: "),e("a",{attrs:{href:"https://github.com/PX4/Firmware/tree/master/src/modules/navigator",target:"_blank",rel:"noopener noreferrer"}},[t._v("modules/navigator"),e("OutboundLink")],1)]),t._v(" "),e("h3",{attrs:{id:"description-7"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#description-7"}},[t._v("#")]),t._v(" Description")]),t._v(" "),e("p",[t._v("Module that is responsible for autonomous flight modes. This includes missions (read from dataman),\ntakeoff and RTL.\nIt is also responsible for geofence violation checking.")]),t._v(" "),e("h3",{attrs:{id:"implementation-2"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#implementation-2"}},[t._v("#")]),t._v(" Implementation")]),t._v(" "),e("p",[t._v("The different internal modes are implemented as separate classes that inherit from a common base class "),e("code",[t._v("NavigatorMode")]),t._v(".\nThe member "),e("code",[t._v("_navigation_mode")]),t._v(" contains the current active mode.")]),t._v(" "),e("p",[t._v("Navigator publishes position setpoint triplets ("),e("code",[t._v("position_setpoint_triplet_s")]),t._v("), which are then used by the position\ncontroller.")]),t._v(" "),e("p",[e("a",{attrs:{id:"navigator_usage"}})]),t._v(" "),e("h3",{attrs:{id:"usage-7"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#usage-7"}},[t._v("#")]),t._v(" Usage")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("navigator <command> [arguments...]\n Commands:\n   start\n\n   fencefile     load a geofence file from SD card, stored at etc/geofence.txt\n\n   fake_traffic  publishes 4 fake transponder_report_s uORB messages\n\n   stop\n\n   status        print status info\n")])])]),e("h2",{attrs:{id:"rover-pos-control"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#rover-pos-control"}},[t._v("#")]),t._v(" rover_pos_control")]),t._v(" "),e("p",[t._v("Source: "),e("a",{attrs:{href:"https://github.com/PX4/Firmware/tree/master/src/modules/rover_pos_control",target:"_blank",rel:"noopener noreferrer"}},[t._v("modules/rover_pos_control"),e("OutboundLink")],1)]),t._v(" "),e("h3",{attrs:{id:"description-8"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#description-8"}},[t._v("#")]),t._v(" Description")]),t._v(" "),e("p",[t._v("Controls the position of a ground rover using an L1 controller.")]),t._v(" "),e("p",[t._v("Publishes "),e("code",[t._v("actuator_controls_0")]),t._v(" messages at a constant 250Hz.")]),t._v(" "),e("h3",{attrs:{id:"implementation-3"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#implementation-3"}},[t._v("#")]),t._v(" Implementation")]),t._v(" "),e("p",[t._v("Currently, this implementation supports only a few modes:")]),t._v(" "),e("ul",[e("li",[t._v("Full manual: Throttle and yaw controls are passed directly through to the actuators")]),t._v(" "),e("li",[t._v("Auto mission: The rover runs missions")]),t._v(" "),e("li",[t._v("Loiter: The rover will navigate to within the loiter radius, then stop the motors")])]),t._v(" "),e("h3",{attrs:{id:"examples"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#examples"}},[t._v("#")]),t._v(" Examples")]),t._v(" "),e("p",[t._v("CLI usage example:")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("rover_pos_control start\nrover_pos_control status\nrover_pos_control stop\n")])])]),e("p",[e("a",{attrs:{id:"rover_pos_control_usage"}})]),t._v(" "),e("h3",{attrs:{id:"usage-8"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#usage-8"}},[t._v("#")]),t._v(" Usage")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("rover_pos_control <command> [arguments...]\n Commands:\n   start\n\n   stop\n\n   status        print status info\n")])])]),e("h2",{attrs:{id:"uuv-att-control"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#uuv-att-control"}},[t._v("#")]),t._v(" uuv_att_control")]),t._v(" "),e("p",[t._v("Source: "),e("a",{attrs:{href:"https://github.com/PX4/Firmware/tree/master/src/modules/uuv_att_control",target:"_blank",rel:"noopener noreferrer"}},[t._v("modules/uuv_att_control"),e("OutboundLink")],1)]),t._v(" "),e("h3",{attrs:{id:"description-9"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#description-9"}},[t._v("#")]),t._v(" Description")]),t._v(" "),e("p",[t._v("Controls the attitude of an unmanned underwater vehicle (UUV).")]),t._v(" "),e("p",[t._v("Publishes "),e("code",[t._v("actuator_controls_0")]),t._v(" messages at a constant 250Hz.")]),t._v(" "),e("h3",{attrs:{id:"implementation-4"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#implementation-4"}},[t._v("#")]),t._v(" Implementation")]),t._v(" "),e("p",[t._v("Currently, this implementation supports only a few modes:")]),t._v(" "),e("ul",[e("li",[t._v("Full manual: Roll, pitch, yaw, and throttle controls are passed directly through to the actuators")]),t._v(" "),e("li",[t._v("Auto mission: The uuv runs missions")])]),t._v(" "),e("h3",{attrs:{id:"examples-2"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#examples-2"}},[t._v("#")]),t._v(" Examples")]),t._v(" "),e("p",[t._v("CLI usage example:")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("uuv_att_control start\nuuv_att_control status\nuuv_att_control stop\n")])])]),e("p",[e("a",{attrs:{id:"uuv_att_control_usage"}})]),t._v(" "),e("h3",{attrs:{id:"usage-9"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#usage-9"}},[t._v("#")]),t._v(" Usage")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("uuv_att_control <command> [arguments...]\n Commands:\n   start\n\n   stop\n\n   status        print status info\n")])])]),e("h2",{attrs:{id:"vtol-att-control"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#vtol-att-control"}},[t._v("#")]),t._v(" vtol_att_control")]),t._v(" "),e("p",[t._v("Source: "),e("a",{attrs:{href:"https://github.com/PX4/Firmware/tree/master/src/modules/vtol_att_control",target:"_blank",rel:"noopener noreferrer"}},[t._v("modules/vtol_att_control"),e("OutboundLink")],1)]),t._v(" "),e("h3",{attrs:{id:"description-10"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#description-10"}},[t._v("#")]),t._v(" Description")]),t._v(" "),e("p",[t._v("fw_att_control is the fixed wing attitude controller.")]),t._v(" "),e("p",[e("a",{attrs:{id:"vtol_att_control_usage"}})]),t._v(" "),e("h3",{attrs:{id:"usage-10"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#usage-10"}},[t._v("#")]),t._v(" Usage")]),t._v(" "),e("div",{staticClass:"language- extra-class"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v("vtol_att_control <command> [arguments...]\n Commands:\n\n   stop\n\n   status        print status info\n")])])])])}),[],!1,null,null,null);a.default=s.exports}}]);