mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
Rover: removed closed loop nav
use a jump in the mission instead
This commit is contained in:
parent
220c357dcb
commit
8a42ceb63b
@ -10,7 +10,6 @@
|
|||||||
|
|
||||||
#define CLI_ENABLED ENABLED
|
#define CLI_ENABLED ENABLED
|
||||||
#define CLI_SLIDER_ENABLED DISABLED
|
#define CLI_SLIDER_ENABLED DISABLED
|
||||||
#define CLOSED_LOOP_NAV ENABLED
|
|
||||||
#define AUTO_WP_RADIUS DISABLED
|
#define AUTO_WP_RADIUS DISABLED
|
||||||
|
|
||||||
#define TRACE DISABLED
|
#define TRACE DISABLED
|
||||||
|
@ -46,8 +46,6 @@
|
|||||||
|
|
||||||
#define MANUAL_LEVEL DISABLED
|
#define MANUAL_LEVEL DISABLED
|
||||||
|
|
||||||
#define CLOSED_LOOP_NAV ENABLED // set to ENABLED if closed loop navigation else set to DISABLED (Return To Lauch)
|
|
||||||
|
|
||||||
#define MAX_DIST 50 //300 // max distance (in m) for the HEADALT mode
|
#define MAX_DIST 50 //300 // max distance (in m) for the HEADALT mode
|
||||||
#define SARSEC_BRANCH 50 // Long branch of the SARSEC pattern
|
#define SARSEC_BRANCH 50 // Long branch of the SARSEC pattern
|
||||||
|
|
||||||
|
@ -47,8 +47,6 @@
|
|||||||
|
|
||||||
#define TURN_GAIN 5
|
#define TURN_GAIN 5
|
||||||
|
|
||||||
#define CLOSED_LOOP_NAV ENABLED // set to ENABLED if closed loop navigation else set to DISABLED (Return To Lauch)
|
|
||||||
|
|
||||||
#define MAX_DIST 50 //300 // max distance (in m) for the HEADALT mode
|
#define MAX_DIST 50 //300 // max distance (in m) for the HEADALT mode
|
||||||
#define SARSEC_BRANCH 50 // Long branch of the SARSEC pattern
|
#define SARSEC_BRANCH 50 // Long branch of the SARSEC pattern
|
||||||
/*
|
/*
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
|
/// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
|
||||||
|
|
||||||
#define THISFIRMWARE "ArduRover v2.20b" //New version of the APMrover for the APM v1 or APM v2 and magnetometer + SONAR
|
#define THISFIRMWARE "ArduRover v2.30"
|
||||||
|
|
||||||
// This is the APMrover firmware derived from the Arduplane v2.32 by Jean-Louis Naudin (JLN)
|
// This is the APMrover firmware derived from the Arduplane v2.32 by Jean-Louis Naudin (JLN)
|
||||||
/*
|
/*
|
||||||
|
@ -122,13 +122,13 @@ public:
|
|||||||
|
|
||||||
k_param_short_fs_action,
|
k_param_short_fs_action,
|
||||||
k_param_long_fs_action,
|
k_param_long_fs_action,
|
||||||
k_param_gcs_heartbeat_fs_enabled,
|
k_param_gcs_heartbeat_fs_enabled,
|
||||||
k_param_throttle_slewrate,
|
k_param_throttle_slewrate,
|
||||||
|
|
||||||
// ************************************************************
|
// ************************************************************
|
||||||
// 180: APMrover parameters - JLN update
|
// 180: APMrover parameters - JLN update
|
||||||
|
|
||||||
k_param_closed_loop_nav,
|
k_param_closed_loop_nav, // unused
|
||||||
k_param_auto_wp_radius,
|
k_param_auto_wp_radius,
|
||||||
k_param_sonar_trigger,
|
k_param_sonar_trigger,
|
||||||
k_param_turn_gain,
|
k_param_turn_gain,
|
||||||
@ -332,7 +332,6 @@ public:
|
|||||||
// ************ ThermoPilot parameters ************************
|
// ************ ThermoPilot parameters ************************
|
||||||
// - JLN update
|
// - JLN update
|
||||||
|
|
||||||
AP_Int8 closed_loop_nav;
|
|
||||||
AP_Int8 auto_wp_radius;
|
AP_Int8 auto_wp_radius;
|
||||||
AP_Int16 sonar_trigger;
|
AP_Int16 sonar_trigger;
|
||||||
AP_Int16 turn_gain;
|
AP_Int16 turn_gain;
|
||||||
@ -387,21 +386,3 @@ extern const AP_Param::Info var_info[];
|
|||||||
|
|
||||||
#endif // PARAMETERS_H
|
#endif // PARAMETERS_H
|
||||||
|
|
||||||
/* ************ ThermoPilot parameters (old parameters setup ) ************************
|
|
||||||
|
|
||||||
low_rate_turn (LOW_RATE_TURN, k_param_low_rate_turn, PSTR("TP_LOWR_TURN")),
|
|
||||||
medium_rate_turn (MEDIUM_RATE_TURN, k_param_medium_rate_turn, PSTR("TP_MEDR_TURN")),
|
|
||||||
high_rate_turn (HIGH_RATE_TURN, k_param_high_rate_turn, PSTR("TP_HIGR_TURN")),
|
|
||||||
search_mode_turn (SEARCH_MODE_TURN, k_param_search_mode_turn, PSTR("TP_SRCM_TURN")),
|
|
||||||
slope_thermal (SLOPE_THERMAL, k_param_slope_thermal, PSTR("TP_SLOPE_THER")),
|
|
||||||
auto_thermal (AUTO_THERMAL, k_param_auto_thermal, PSTR("TP_AUTO_THER")),
|
|
||||||
stab_thermal (STAB_THERMAL, k_param_auto_thermal, PSTR("TP_STAB_THER")),
|
|
||||||
closed_loop_nav (CLOSED_LOOP_NAV, k_param_closed_loop_nav, PSTR("TP_CL_NAV")),
|
|
||||||
auto_wp_radius (AUTO_WP_RADIUS, k_param_closed_loop_nav, PSTR("TP_AWPR_NAV")),
|
|
||||||
min_alt (MIN_ALT, k_param_min_alt, PSTR("TP_MIN_ALT")),
|
|
||||||
max_alt (MAX_ALT, k_param_max_alt, PSTR("TP_MAX_ALT")),
|
|
||||||
max_dist (MAX_DIST, k_param_max_dist, PSTR("TP_MAX_DIST")),
|
|
||||||
sarsec_branch (SARSEC_BRANCH, k_param_sarsec_branch, PSTR("TP_SARSEC")),
|
|
||||||
|
|
||||||
************************************************************/
|
|
||||||
|
|
||||||
|
@ -86,8 +86,6 @@ const AP_Param::Info var_info[] PROGMEM = {
|
|||||||
|
|
||||||
// ************************************************************
|
// ************************************************************
|
||||||
// APMrover parameters - JLN update
|
// APMrover parameters - JLN update
|
||||||
|
|
||||||
GSCALAR(closed_loop_nav, "ROV_CL_NAV", CLOSED_LOOP_NAV),
|
|
||||||
GSCALAR(auto_wp_radius, "ROV_AWPR_NAV", AUTO_WP_RADIUS),
|
GSCALAR(auto_wp_radius, "ROV_AWPR_NAV", AUTO_WP_RADIUS),
|
||||||
GSCALAR(sonar_trigger, "ROV_SONAR_TRIG", SONAR_TRIGGER),
|
GSCALAR(sonar_trigger, "ROV_SONAR_TRIG", SONAR_TRIGGER),
|
||||||
GSCALAR(turn_gain, "ROV_GAIN", TURN_GAIN),
|
GSCALAR(turn_gain, "ROV_GAIN", TURN_GAIN),
|
||||||
|
@ -109,12 +109,8 @@ static void handle_process_do_command()
|
|||||||
|
|
||||||
static void handle_no_commands()
|
static void handle_no_commands()
|
||||||
{
|
{
|
||||||
gcs_send_text_fmt(PSTR("Returning to Home"));
|
gcs_send_text_fmt(PSTR("No commands - setting MANUAL"));
|
||||||
next_nav_command = home;
|
set_mode(MANUAL);
|
||||||
next_nav_command.id = MAV_CMD_NAV_LOITER_UNLIM;
|
|
||||||
nav_command_ID = MAV_CMD_NAV_LOITER_UNLIM;
|
|
||||||
non_nav_command_ID = WAIT_COMMAND;
|
|
||||||
handle_process_nav_cmd();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/********************************************************************************/
|
/********************************************************************************/
|
||||||
|
@ -65,15 +65,7 @@ static void process_next_command()
|
|||||||
gcs_send_text_fmt(PSTR("Nav command index updated to #%i"),nav_command_index);
|
gcs_send_text_fmt(PSTR("Nav command index updated to #%i"),nav_command_index);
|
||||||
|
|
||||||
if(nav_command_index > g.command_total){
|
if(nav_command_index > g.command_total){
|
||||||
// we are out of commands!
|
handle_no_commands();
|
||||||
gcs_send_text_P(SEVERITY_LOW,PSTR("out of commands!"));
|
|
||||||
|
|
||||||
if (g.closed_loop_nav) { // JLN update - replay the FPL (CLOSED_LOOP_NAV)
|
|
||||||
restart_nav();
|
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
handle_no_commands();
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
next_nav_command = temp;
|
next_nav_command = temp;
|
||||||
nav_command_ID = next_nav_command.id;
|
nav_command_ID = next_nav_command.id;
|
||||||
|
Loading…
Reference in New Issue
Block a user