Skip to content

Commit

Permalink
add a service to set the flight mode
Browse files Browse the repository at this point in the history
  • Loading branch information
tfoote committed Jul 8, 2015
1 parent 1836d7f commit ad0cae6
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
7 changes: 7 additions & 0 deletions mav_msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ find_package(Eigen REQUIRED)
include_directories(${EIGEN_INCLUDE_DIRS})

add_message_files(
DIRECTORY msg
FILES
CommandAttitudeThrust.msg
CommandMotorSpeed.msg
Expand All @@ -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(
Expand Down
19 changes: 19 additions & 0 deletions mav_msgs/srv/SetFlightMode.srv
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit ad0cae6

Please sign in to comment.