//--------------------------------------------------- // Helm Behavior file initialize DEPLOY = false initialize MUSTER = false initialize RETURN = false initialize STATION = false initialize LOITER = false initialize AVOID = true initialize LEADER = false initialize COMMS_POLICY = lean set MODE = ACTIVE { DEPLOY = true } INACTIVE set MODE = STATIONING { // MODE = ACTIVE STATION = true } //set MODE = TRANSITING { // MODE = ACTIVE // LEADER = true //} set MODE = RETURNING { MODE = ACTIVE RETURN = true } set MODE = MUSTERING { MODE = ACTIVE MUSTER = true } set MODE = CONVOYING { MODE = ACTIVE CONVOY = true } #ifdef TASKBHV DUBINS //---------------------------------------------- Behavior = BHV_TaskWaypoint3 { name = circuit_leader updates = TASK_WPT templating = spawn condition = DEPLOY==true type = waypoint max_bid_wins = false // Typically set/overridden upon spawning event waypt = $(LEADIN_POS) turn_radius = 5 bidwonflag = TRANSIT = true bidwonflag = STATION = false bidwonflag = RETURN = false bidwonflag = CONVOY = true bidwonflag = LEADER = true bidwonflag = TASK_WPT = waypt=$(LEADIN_POS) xbidwonflag = MISSION_TASK = type=convoy,id=follow_$[OWNSHIP],contact=$[OWNSHIP],exempt=$[OWNSHIP],task_time=$[UTC] } //---------------------------------------------- Behavior = BHV_TaskConvoy3 { name = tconvoy_ updates = TASK_CONVOY templating = spawn type = convoy max_bid_wins = false team_range = 5000 team_by_group = true turn_radius = 5 bidwonflag = CONVOY = true bidwonflag = TRANSIT = false bidwonflag = STATION = false bidwonflag = UP_CONVOY = contact=$[CONTACT] xbidwonflag = MISSION_TASK = type=convoy,id=follow_$[OWNSHIP],contact=$[OWNSHIP], exempt=$[OWNSHIP]:$[EXEMPT] } #elseifdef TASKBHV SHALLOW Behavior = BHV_TaskWaypoint2 { name = circuit_leader updates = TASK_WPT templating = spawn condition = DEPLOY==true type = waypoint max_bid_wins = false // Typically set/overridden upon spawning event waypt = $(LEADIN_POS) bidwonflag = TRANSIT = true bidwonflag = STATION = false bidwonflag = RETURN = false bidwonflag = CONVOY = true bidwonflag = LEADER = true bidwonflag = TASK_WPT = waypt=$(LEADIN_POS) xbidwonflag = MISSION_TASK = type=convoy,id=follow_$[OWNSHIP],contact=$[OWNSHIP],exempt=$[OWNSHIP],task_time=$[UTC] } //---------------------------------------------- Behavior = BHV_TaskConvoy2 { name = tconvoy_ updates = TASK_CONVOY templating = spawn type = convoy max_bid_wins = false team_range = 5000 team_by_group = true bidwonflag = CONVOY = true bidwonflag = TRANSIT = false bidwonflag = STATION = false bidwonflag = UP_CONVOY = contact=$[CONTACT] xbidwonflag = MISSION_TASK = type=convoy,id=follow_$[OWNSHIP],contact=$[OWNSHIP], exempt=$[OWNSHIP]:$[EXEMPT] } #elseifdef TASKBHV DEF Behavior = BHV_TaskWaypoint1 { name = circuit_leader updates = TASK_WPT templating = spawn condition = DEPLOY==true type = waypoint max_bid_wins = false // Typically set/overridden upon spawning event waypt = $(LEADIN_POS) bidwonflag = TRANSIT = true bidwonflag = STATION = false bidwonflag = RETURN = false bidwonflag = CONVOY = true bidwonflag = LEADER = true bidwonflag = TASK_WPT = waypt=$(LEADIN_POS) xbidwonflag = MISSION_TASK = type=convoy,id=follow_$[OWNSHIP],contact=$[OWNSHIP],exempt=$[OWNSHIP],task_time=$[UTC] } Behavior = BHV_TaskConvoy1 { name = tconvoy_ updates = TASK_CONVOY templating = spawn type = convoy max_bid_wins = false team_range = 5000 team_by_group = true bidwonflag = CONVOY = true bidwonflag = TRANSIT = false bidwonflag = STATION = false bidwonflag = UP_CONVOY = contact=$[CONTACT] xbidwonflag = MISSION_TASK = type=convoy,id=follow_$[OWNSHIP],contact=$[OWNSHIP], exempt=$[OWNSHIP]:$[EXEMPT] } #endif #ifdef CONVOY_POLICY CONVOYPD //---------------------------------------------- Behavior = BHV_ConvoyPD { name = convoypd pwt = 200 condition = DEPLOY==true condition = RETURN==false condition = CONVOY==true type = convoy is_leader = false desired_speed = 1.2 point_update_distance = 0.5 ideal_follow_range = 10 max_lag_length = 50 max_speed = 1.6 full_stop_range = 2 capture_radius = 3 slip_radius = 20 kp_spd_1 = 0.5 kp_spd_2 = 0.2 kd_spd_1 = 0.5 kd_spd_2 = 0.2 ki_spd = 0 kp_hdg_1 = 1 kp_hdg_2 = 0 kd_hdg_1 = 1 kd_hdg_2 = 0 ki_hdg = 0 coupled = true kpc_spd = 0.25 kdc_spd = 0.1 } #elseifdef CONVOY_POLICY CONVOYC Behavior = BHV_ConvoyV21X { name = convoy pwt = 100 updates = UP_CONVOY condition = MODE==CONVOYING contact = unset_ok patience = 65 aft_patience = true holding_policy = curr_hdg active_convoying = false post_recap_verbose = true radius = 3 slip_radius = 15 inter_mark_range = 3 tail_length_max = 10 full_stop_convoy_range = 2 slower_convoy_range = 5 ideal_convoy_range = 8 faster_convoy_range = 12 full_lag_convoy_range = 16 // slower_convoy_range = 10 // ideal_convoy_range = 15 // faster_convoy_range = 25 // full_lag_convoy_range = 35 lag_speed_delta = 0.8 convoy_flag = CONVOY_RNG=$[CONVOY_RNG] convoy_flag = CONVOY_TAIL_RNG=$[TAIL_RNG] convoy_flag = CONVOY_TAIL_ANG=$[TAIL_ANG] convoy_flag = CONVOY_MARKER_BNG=$[MARKER_BNG] convoy_flag = CONVOY_ALIGNMENT=$[ALIGNMENT] convoy_flag = CONVOY_TRK_ERR=$[TRK_ERR] visual_hints = marker_color=$(COLOR) visual_hints = marker_size=3 } #endif Behavior = BHV_Waypoint { // General Behavior Parameters // --------------------------- name = circuit // example pwt = 100 // default condition = MODE==ACTIVE condition = DEPLOY==true condition = RETURN==false condition = LEADER==true // example updates = TRANSIT_UPDATES // example // Parameters specific to this behavior // ------------------------------------ capture_radius = 3 // default capture_line = false // default lead = 0 // default lead_to_start = false // default order = normal // default //Define polygon elsewhere #include plug_circuit.moos repeat = 3 slip_radius = 15 speed = 1.2 endflag = RETURN_ALL=true endflag = QUIT_MISSION=true visual_hints = vertex_size = 3 // default visual_hints = edge_size = 1 // default visual_hints = vertex_color = dodger_blue // default visual_hints = edge_color = white // default visual_hints = nextpt_color = yellow // default visual_hints = nextpt_lcolor = aqua // default visual_hints = nextpt_vertex_size = 5 // default } #include plugs/bhvs/std_bhvs/plug_stationkeep.bhv //#include plugs/bhvs/std_bhvs/plug_opregion.bhv #include plugs/bhvs/std_bhvs/plug_returnhome.bhv #include plugs/bhvs/std_bhvs/plug_colregs.bhv