mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-24 21:53:34 +08:00
Adding new follow target navigation and main states. New follow target
topic added. New follow fsm added to the navigator
This commit is contained in:
committed by
Lorenz Meier
parent
fc061ea94d
commit
bbc8eaefd7
@@ -148,6 +148,7 @@ Navigator::Navigator() :
|
||||
_dataLinkLoss(this, "DLL"),
|
||||
_engineFailure(this, "EF"),
|
||||
_gpsFailure(this, "GPSF"),
|
||||
_follow_target(this, "TAR"),
|
||||
_param_loiter_radius(this, "LOITER_RAD"),
|
||||
_param_acceptance_radius(this, "ACC_RAD"),
|
||||
_param_datalinkloss_obc(this, "DLL_OBC"),
|
||||
@@ -166,6 +167,7 @@ Navigator::Navigator() :
|
||||
_navigation_mode_array[6] = &_rcLoss;
|
||||
_navigation_mode_array[7] = &_takeoff;
|
||||
_navigation_mode_array[8] = &_land;
|
||||
_navigation_mode_array[9] = &_follow_target;
|
||||
|
||||
updateParams();
|
||||
}
|
||||
@@ -499,6 +501,10 @@ Navigator::task_main()
|
||||
_pos_sp_triplet_published_invalid_once = false;
|
||||
_navigation_mode = &_gpsFailure;
|
||||
break;
|
||||
case vehicle_status_s::NAVIGATION_STATE_AUTO_FOLLOW_TARGET:
|
||||
_pos_sp_triplet_published_invalid_once = false;
|
||||
_navigation_mode = &_follow_target;
|
||||
break;
|
||||
default:
|
||||
_navigation_mode = nullptr;
|
||||
_can_loiter_at_sp = false;
|
||||
|
||||
Reference in New Issue
Block a user