Skip to content

Commit

Permalink
Merge pull request mavlink#221 from TSC21/pr-add_hold_action
Browse files Browse the repository at this point in the history
action: add request for vehicle to hold position (loiter)
  • Loading branch information
JonasVautherin authored Mar 30, 2021
2 parents 3d35a8f + 7d0abe7 commit d937b2b
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions protos/action/action.proto
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,16 @@ service ActionService {
* This will run the orbit routine with the given parameters.
*/
rpc DoOrbit(DoOrbitRequest) returns(DoOrbitResponse) {}
/*
* Send command to hold position (a.k.a. "Loiter").
*
* Sends a command to drone to change to Hold flight mode, causing the
* vehicle to stop and maintain its current GPS position and altitude.
*
* Note: this command is specific to the PX4 Autopilot flight stack as
* it implies a change to a PX4-specific mode.
*/
rpc Hold(HoldRequest) returns(HoldResponse) {}
/*
* Send command to transition the drone to fixedwing.
*
Expand Down Expand Up @@ -193,8 +203,8 @@ enum OrbitYawBehavior {
ORBIT_YAW_BEHAVIOR_HOLD_FRONT_TANGENT_TO_CIRCLE = 3; // Vehicle front follows flight path (tangential to circle)
ORBIT_YAW_BEHAVIOR_RC_CONTROLLED = 4; // Yaw controlled by RC input
}
message DoOrbitRequest {

message DoOrbitRequest {
float radius_m = 1; // Radius of circle (in meters)
float velocity_ms = 2; // Tangential velocity (in m/s)
OrbitYawBehavior yaw_behavior = 3; // Yaw behavior of vehicle (ORBIT_YAW_BEHAVIOUR)
Expand All @@ -206,6 +216,11 @@ message DoOrbitResponse {
ActionResult action_result = 1;
}

message HoldRequest {}
message HoldResponse {
ActionResult action_result = 1;
}

message TransitionToFixedwingRequest {}
message TransitionToFixedwingResponse {
ActionResult action_result = 1;
Expand Down

0 comments on commit d937b2b

Please sign in to comment.