Skip to main content
Version: 2.0.0
warning

This page is describing the upcoming ROS2 version of the MRS UAV System (however, it may be still outdated). If you are looking for ROS1 version of the docs, follow to https://ctu-mrs.github.io/docs/1.5.0/introduction/.

High-level manager nodes within the MRS

ControlManager​

  • integrates the control and tracking part of the MRS UAV pipeline
  • dynamically loads feedback controllers and reference trackers plugins
  • subscribes to the estimated UAV state and provides it to all loaded trackers and controllers
  • runs the iteration of the currently active controller and tracker with every received state estimator message
  • outputs the attitude control command to the HW API
  • provides constraints to trackers through a common interface
  • allows in-mid-air switching of feedback controllers and reference trackers
  • provides common services for
    • setting a reference
    • setting a trajectory reference
    • human-callable goto, goto relative, goto altitude, set heading and set relative heading
    • hover
    • emergency hover after which most of the provided services are disabled
    • emergency landing - switches to emergency controller and tracker and lands as fast as possible
    • failsafe landing - feedforward landing, only effective in small heights and low speeds
    • escalating failsafe - the measures escalate when calling it repeatedly
      1. emergency hover
      2. emergency landing
      3. failsafe landing
      4. disarm
    • transforming references and vectors between frames
    • verifying that references are inside of the allowed safety area
  • provides safety routines for checking
    • position control error
    • tilt control error
    • yaw control error
    • estimator innovation error
    • missing estimator data
    • the validity of desired references
  • allows controlling the UAV using a ROS-compatible joystick
  • allows controlling the UAV using RC through our pipeline
    • the RC channels are picked up from HW API
    • a relative reference is generated for the active tracker
    • escalating failsafe can be triggered by a dedicated switch
  • provides an obstacle bumper feature
    • has priority over user-provided references
    • for slow-flight only

UavManager​

  • handles takeoff from the high-level
    • checks for pre-condition which might result in takeoff failure
    • switches to the right tracker and controller for the takeoff
    • triggers takeoff
    • switches to the right tracker and controller after the takeoff
  • handles a regular landing from the high-level
    • descends to a landing height (~2.0 m) using the currently active tracker and controller, given the current constraints
    • switches to the right tracker and controller for the landing
    • triggers the landing
    • monitors the thrust output and decides when the UAV touched the ground
  • provides a land home feature
    • the UAV flies in the current altitude to its takeoff location and lands
  • provides a land there feature
    • the UAV flies to the desired position at which it lands
  • monitors exceeding the maximum altitude
    • triggers a priority descend if it exceeds the safety area ceiling
  • monitors exceeding the maximum thrust
    • triggers a landing if it exceeds a limit
  • provides a flight timer
    • triggers a landing if it exceeds a limit

ConstraintManager​

  • stores and provides sets of dynamics constraints for the trackers
  • allows mapping each set of constraints to only some state estimators
  • automatically switches to a fallback set of constraints if the current ones are not allowed
  • provides a service for switching to a desired set of constraints

GainManager​

  • stores and provides sets of gains for the Se3Controller
  • allows mapping each set of gains to only some state estimators
  • automatically switches to a fallback set of gains if the current ones are not allowed
  • provides a service for switching to a desired set of gains

EstimationManager​

  • provides the state estimation of the UAV
  • dynamically loads default state estimator or custom user-made plugins
  • publishes following topics:
    • the uav_state topic that is used for feedback control in ControlManager
      • velocities in uav_state are in the headed/frame_id frame!!
    • visualizable odom topic
      • velocities in odom are in the child_frame_id frame!! (follows the ROS convention for nav_msgs/Odometry msg)
    • current UAV height above terrain on topic height_agl (if available)
    • maximum height above terrain that the UAV can fly in (based on the current estimator used for control)
  • provides common services for
    • switching of state estimator currently used in control feedback
  • checks health of current state estimator and switches to a healthy one in case current estimator becomes unhealthy
  • if no estimator is healthy, calls failsafe landing

TransformManager​

  • provides the following default TFs from the fcu frame (can be turned off/on or renamed by custom configs):
    • fcu_untilted_origin, world_origin, local_origin, stable_origin, fixed_origin, utm_origin, mapping_origin_tf (if a SLAM algorithm is running)
  • publishes the delay of odometry produced by a SLAM algorithm (if available) on topic map_delay
  • additionally can provide custom TFs from nav_msgs/Odometry topics by adding them to the tf_sources array in custom config
    • the msg can also be republished in another frame by adding the frame_id to the republish_in_frames array

DiagnosticsManager​

  • collects the state of the MRS UAV System into a few summary topics, e.g. for the Status TUI
  • started by core.launch.py in its own process, so it keeps reporting when the core container crashes
  • configured through the custom config under mrs_uav_managers/diagnostics_manager/
  • publishes the following topics in /$UAV_NAME/diagnostics_manager/:
    • uav_state (mrs_msgs/State): one UAV state derived from the HW API status and the ControlManager diagnostics:
      • UNKNOWN, NO_LINK, DISARMED, ARMED, OFFBOARD (on the ground),
      • MANUAL (not offboard and the HW API reports the UAV airborne: a pilot or the autopilot flies, not the MRS UAV System),
      • TAKEOFF, HOVER, GOTO, TRAJECTORY, LAND, RC_MODE, MIDAIR (mid-air activation),
      • EHOVER, ELAND, FAILSAFE (emergencies),
      • the rules are described in the DiagnosticsManager README
    • general_robot_info: results of the preflight checks, ready_for_automatic_takeoff, missing_for_automatic_takeoff, errors and the battery state
    • uav_info: flight state, flight duration, armed, offboard, nominal and estimated mass
    • control_info: active and available controllers, trackers, gains and constraints
    • state_estimation_info: local and global pose, velocity, active and available estimators
    • system_health_info: CPU, RAM and disk of the onboard computer, rates of the HW API, ControlManager and state estimation, and the status of the sensors
    • collision_avoidance_info: state of the collision avoidance and the bumper
  • preflight checks (the same as in the Autostart):
    • mandatory: the UAV position is inside the safety area,
    • optional: maximum speed, maximum height above the ground, maximum gyro rates, data on given topics,
    • configured in preflight_check.yaml
  • sensor status from sensor handler plugins (mrs_uav_diagnostics_sensors): the rate of the sensor topic and sensor-specific checks
    • the monitored sensors are listed in sensor_handlers/active_sensor_handlers, see sensor_handlers.yaml
    • to monitor your own sensor, define a handler instance and add it to active_sensor_handlers in the custom config (the list replaces the default one, so keep the default sensors in it):
mrs_uav_managers:
diagnostics_manager:
sensor_handlers:
active_sensor_handlers: [
"PX4",
"Rangefinder",
"GNSS",
"Magnetometer",
"RemoteController",
# your sensor handler instances
]
# define your instances here, see the TEMPLATE in sensor_handlers.yaml