diff --git a/mav_msgs/CMakeLists.txt b/mav_msgs/CMakeLists.txt index 7783849..66f3520 100644 --- a/mav_msgs/CMakeLists.txt +++ b/mav_msgs/CMakeLists.txt @@ -8,6 +8,7 @@ find_package(Eigen REQUIRED) include_directories(${EIGEN_INCLUDE_DIRS}) add_message_files( + DIRECTORY msg FILES CommandAttitudeThrust.msg CommandMotorSpeed.msg @@ -18,6 +19,12 @@ add_message_files( MotorSpeed.msg ) +add_service_files( + DIRECTORY srv + FILES + SetFlightMode.srv +) + generate_messages(DEPENDENCIES std_msgs geometry_msgs) catkin_package( diff --git a/mav_msgs/srv/SetFlightMode.srv b/mav_msgs/srv/SetFlightMode.srv new file mode 100644 index 0000000..e1d48b0 --- /dev/null +++ b/mav_msgs/srv/SetFlightMode.srv @@ -0,0 +1,19 @@ +# This service is used to switch the flight mode. + +uint8 MODE_INACTIVE=0 +uint8 MODE_PREARM=1 +uint8 MODE_MANUAL=2 +uint8 MODE_ATTITUDE=3 +uint8 MODE AUTO=4 +uint8 MODE_RTL=5 + +uint8 request_mode + +--- + +uint8 FAILURE_UNDEFINED=0 +uint8 FAILURE_LOCALIZATION_NOT_AVAILABLE=1 +# ... TODO fill the failure modes in + +uint8 resultant_mode +uint8[] failure_reasons # A list of reasons why the mode change failed.