Skip to main content
Version: 1.5.0

Trajectory input

Definitions

Path (mrs_msgs/Path.msg)

  • An ordered sequence of geometric poses without any notion of time.
  • Specifies what poses should the UAV fly through: no control over dynamics.
  • Has to be sampled first by sampling period T.
  • See below on how to generate dynamically feasible trajectories from paths.

Trajectory (mrs_msgs/TrajectoryReference.msg)

  • An ordered time-parametrized sequence of geometric poses.
  • Specifies what pose should the UAV be in at given time: more control over dynamics.
  • Can be input to the reference tracker.
PathTrajectory

Loading trajectories

The mrs-ctu/trajectory_loader package contains all information you need for loading a trajectory from a file: documentation, example trajectories, and launch files. It expects trajectory sampled with period of T = 0.2 s (can be modified in the message), in line-format x,y,z,heading, e.g.,:

0.0,0.0,1.0,0.0
0.2,0.2,1.2,0.1
0.3,0.1,1.4,0.15

The trajectory loaded with mrs-ctu/trajectory_loader will be input to the current reference tracker, which will generate all-state and feasible reference for the controller.

Generating trajectories from paths

You can generate your own trajectories and publish them to control_manager/trajectory_reference to fly them (see UAV-ROS interface). This pipeline follows the same scheme trajectory->tracker->controller as if the trajectory was loaded with mrs-ctu/trajectory_loader. If a trajectory is not feasible under dynamic constraints for the UAV, the resulting trajectory may be degraded.

To convert a desired waypoint path to a trajectory feasible under dynamic constraints of the UAV, you can use the mrs_uav_trajectory_generation package. See the package documentation for more information about generating trajectories under dynamic constraints and list of topics/services for using the mrs_uav_trajectory_generation package.