Skip to content

Configuration:Navigation

Martin Scheiber edited this page May 11, 2023 · 3 revisions

Navigation Configuration (Mission Sequencer)

The navigation node within the CNS Flight Stack refers to the waypoint parser, interpreter, and sequencer that forwards the next goal to the controller. We called it mission sequencer as its original design goal was to sequence multiple waypoint files (or missions) without user interaction.

A more detailed description of the mission sequencer can also be found in the module's README.

Configuration of Mission Sequencer

The mission sequencer is mainly configured in its own launchfile (fs_navigation.launch). There the user should set the following parameters

launch parameter description default value
threshold_position_m threshold for position upon which a WP is accepted 0.3
threshold_yaw_rad threshold for yaw upon which a WP is accepted 0.1
wp_max boundaries (max) for xyz values [100.0,100.0,10.0]
wp_min boundaries (min) for xyz values [-100.0,-100.0, -1.0]
boundary_reference reference frame for boundaries (LOCAL or GLOBAL) LOCAL
wp_are_relative general interpretation that waypoints are relative true

Individual Estimator

If your setup includes an individual estimator, please make sure that your estimator publishes the following two topics

  • /$(env FS_ESTIMATOR_NODE_NAME)/odom_state_out for the vehicle's current odometry
  • /$(env FS_ESTIMATOR_NODE_NAME)/pose_state_out for the vehicle's current pose
    • if only this pose topic is published make sure to set the parameter use_odom in the launch file to false

FS_ESTIMATOR_NODE_NAME is a global parameter set in the global configuration.

If you cannot publish the topics under the given names, please adapt the following two parameters accordingly

launch parameter description default value
topic_pose_in topic name for pose subscriber ref/pose
topic_odom_in topic name for odometry subscriber ref/odom
use_odom use odometry subscriber as reference true

Configuration of Mission Waypoints

Trajectories and thus waypoints should be placed within the trajectories folder in .csv file format:

x,y,z,yaw,holdtime
0.0,0.,1.0,0.0,1.0

x, y, and z refer to the position in meters, yaw to the orientation in degrees, and holdtime to the time to wait at the given waypoint in seconds.

These files are then included in the operator configuration where the path to the trajectory files needs to be included relative to the trajectories folder.

missions:

  mission_1:
    # [...]
    filepaths: # provide the system file path
      - "dh/test1.csv" 
      # - "dh/test1.csv" 
      # place path multiple times, if you want to fly the same trajectory multiple times

Interaction with External Waypoint Generator

By default, the Mission Sequencer gets the waypoints from the autonomy engine. However, any node can publish waypoints on the /mission_sequencer/waypoint_list topic (message definition msg/MissionWaypointArray.msg). This topic includes the same content as in the .csv file (x,y,z,yaw,holdtime) with the addition of a reference frame and list action.

For the reference frame the following can be chosen:

  • GLOBAL = 0 interpret the WPs from the list in the "global" navigation frame (i.e. estimator frame)
  • LOCAL = 1 interpret the WPS w.r.t. to the starting pose (when the vehicle was armed), i.e., "local frame"
  • CUR_POS = 2 interpret each WP w.r.t. to the current position of the vehicle, i.e. offsets to the current position or previous waypoints, excluding yaw
  • CUR_POSE = 3 same as CUR_POS with the addition of interpreting the yaw offset

For the action, the user has to choise to

  • CLEAR = 0 clear the current list of waypoints and only use the new ones
  • APPEND = 1 append the new waypoints to the stored list
  • INSERT = 2 insert the waypoints at index idx in the stored list (useful for obstacle avoidance)