//******************************************************* // Vehicle behavior configuration file //#define REGION1 -300,-250:-28.9,-121.5:121,-437.8:-171.5,-566.3 //#define REGION2 125,-50:394.1,78.5:546,-237.8:253.5,-366.3 //#define REGION1 -321.4,-204.8:-50.3,-76.3:99.6,-392.6:-192.9,-521.1 #define REGION2 114.3,-27.4:383.4,101.1:535.3,-214.4:242.8,-343.7 //#define REGION1 -274,-127:286,-127:286,-447:-274,-447 #define REGION1 -274,-127:6,-127:6,-287:-274,-287 initialize DEPLOY = false initialize RETURN = false initialize COVER = true initialize STATION_KEEP = false initialize OPTION = EXPLORE //initialize RESCUE_REGION = pts={-262,-182:-82,-537:465,-310:251,37} initialize WAIT_TO_SAMPLE=false initialize VORONOI_CAPTURED = false initialize MIGRATION_TRANSIT_DONE = false initialize PROX_UP_REGION = pts={$(REGION1)},label=one initialize MIGRATE_REGION = "$(REGION1)" set MODE = ACTIVE { DEPLOY = true } INACTIVE set MODE = STATION-KEEPING { MODE = ACTIVE STATION_KEEP = true RETURN = false } set MODE = RETURNING { MODE = ACTIVE RETURN = true } set MODE = EXPLOITING { MODE = ACTIVE OPTION = EXPLOIT RETURN = false } set MODE = EXPLORING { MODE = ACTIVE OPTION = EXPLORE RETURN = false } set MODE = MIGRATING { MODE = ACTIVE OPTION = MIGRATE RETURN = false NEVER = always } DEFAULT //--------------------------------------------- // Simple Explore behavior(s) //---------------------------------------------- Behavior = BHV_Voronoi2 { name = voronoi_cover pwt = 1.0 condition = MODE==EXPLORING idleflag = PROX_POLY_VIEW = false activeflag = PROX_POLY_VIEW = true UPDATES = VCOVER_UPDATE perpetual = true // Parameters specific to this behavior // ------------------------------------ capture_radius = 30 activate_radius = 100 //turn_radius = 500 //op_region= pts={-262,-182:-82,-537:465,-310:251,37} speed = 1.0 stale_nav_thresh = 1 stale_poly_thresh = 2 allow_slipping = true setpt_method = center visual_hints = setpt_size = 4 visual_hints = setpt_color = dodger_blue visual_hints = vertex_color = yellow // default visual_hints = vertex_lcolor = aqua // default visual_hints = label = zone3 // example } Behavior = BHV_Waypoint { // General Behavior Parameters // --------------------------- name = voronoi_grid_search pwt = 100 condition = MODE==EXPLORING //condition = (VOI_STATE="slipping") or (VOI_STATE="captured") UPDATES = PATH_UPDATES perpetual = true duration_idle_decay = false cycleflag = FINISHED_WAYPOINTS = true // to trigger a replan // Parameters specific to this behavior // ------------------------------------ capture_radius = 10 order = normal points = pts={-100,-300} // Single agent scripted mission //points = format=lawnmower, label=foxtrot, x=6, y=-287, height=300, width=540, lane_width=30, rows=east-west, startx=$[X], starty=$[Y], degs=0 //lead=8 slip_radius = 20 speed = 1.00 visual_hints = setpt_color = off visual_hints = edge_color = gray // off visual_hints = vertex_color = gray // off } //---------------------------------------------- //Behavior = BHV_RegionSearchControl { name = regionsearch pwt = 100 condition = MODE==EXPLORING condition = (VOI_STATE="slipping") or (VOI_STATE="captured") UPDATES = VECTOR_UPDATE perpetual = true // Parameters specific to this behavior // ------------------------------------ speed = 0.5 spin_rad = 120 op_region = pts={$(REGION1)},label=one //op_region = pts={$(REGION2)},label=two //mode = stochastic mode = rotate random_number = $(MOOS_PORT) } //---------------------------------------------- // Simple Migrate Behavior(s) //--------------------------------------------- Behavior = BHV_Waypoint { // General Behavior Parameters // --------------------------- name = transit_migrate pwt = 100 condition = MODE==MIGRATING condition = MIGRATION_TRANSIT_DONE = false endflag = MIGRATION_TRANSIT_DONE = true updates = TRANSIT_UPDATES duration = 60 perpetual = true duration_idle_decay = false duration_reset = MIGRATION_TRANSIT_DONE = false // Parameters specific to this behavior // ------------------------------------ capture_radius = 3 order = normal points = pts={100,-200} repeat = 0 slip_radius = 15 speed = 1.00 } //---------------------------------------------- Behavior = BHV_MoveToRegion { name = migrating pwt = 100 condition = MODE==MIGRATING condition = MIGRATION_TRANSIT_DONE = true updates = UP_MOVE perpetual = true runflag = MIGRATION_DONE = false endflag = MIGRATION_DONE = true endflag = MIGRATION_TRANSIT_DONE = false speed = 1.00 stale_nav_thresh = 5 region = pts={$(REGION1)},label=one //region = pts={$(REGION2)},label=two patience = 70 visual_hints = setpt_size = 5 visual_hints = setpt_color = dodger_blue visual_hints = setpt_label_color = off } //---------------------------------------------- // Simple Exploit behavior(s) //---------------------------------------------- Behavior=BHV_Waypoint { name = travel_to_sample pwt = 100 condition = MODE==EXPLOITING condition = WAIT_TO_SAMPLE=false perpetual = true updates = SAMPLE_TRAVEL_UPDATE endflag = WAIT_TO_SAMPLE=true speed = 1.5 capture_radius = 5.0 slip_radius = 5.0 point = 100,-100 } //---------------------------------------------- //Behavior = BHV_StationKeep { name = sampling pwt = 100 condition = MODE==EXPLOITING condition = WAIT_TO_SAMPLE=true perpetual = true updates = SAMPLE_UPDATE runflag = NODE_MESSAGE_LOCAL=src_node=$(VNAME),dest_node=all,var_name=SAMPLE_STARTING,string_val=$(VNAME) runflag = SAMPLE_STARTING=$(VNAME) station_pt = 100,-100 inner_radius = 5 outer_radius = 8 outer_speed = 1.0 transit_speed = 1.0 swing_time = 7 visual_hints = vertex_size=0, edge_color=gray50 } //---------------------------------------------- Behavior = BHV_Timer { name = sample_timer condition = MODE==EXPLOITING condition = WAIT_TO_SAMPLE=true duration = 10 runflag = NODE_MESSAGE_LOCAL=src_node=$(VNAME),dest_node=all,var_name=SAMPLE_STARTING,string_val=$(VNAME),color=limegreen runflag = SAMPLE_STARTING=$(VNAME) endflag = WAIT_TO_SAMPLE=false endflag = NODE_MESSAGE_LOCAL=src_node=$(VNAME),dest_node=all,var_name=SAMPLE_FINISHING,string_val=$(VNAME),color=limegreen endflag = SAMPLE_FINISHING=$(VNAME) endflag = SAMPLE_FINISHED_LOG=$(VNAME) perpetual = true duration_idle_decay = false } //---------------------------------------------- Behavior=BHV_Waypoint { name = waypt_return pwt = 100 condition = MODE==RETURNING perpetual = true updates = RETURN_UPDATE endflag = RETURN = false endflag = DEPLOY = false endflag = MISSION = complete speed = 1.5 capture_radius = 2.0 slip_radius = 8.0 #ifdef VNAME abe point = 52,9 #elseifdef VNAME ben point = 39,4 #elseifdef VNAME cal point = 29,0 #elseifdef VNAME deb point = 16,-6 #elseifdef VNAME eve point = 4,-11 #elseifdef VNAME fin point = 2,-15 #elseifdef VNAME max point = 26,-2 #elseifdef VNAME ned point = 12,-8 #elseifdef VNAME oak point = 40,-8 #else point = 0,-10 #endif } //---------------------------------------------- Behavior = BHV_StationKeep { name = station-keep pwt = 100 condition = MODE==STATION-KEEPING center_activate = true inner_radius = 5 outer_radius = 10 outer_speed = 1.0 transit_speed = 0.5 swing_time = 7 visual_hints = vertex_size=0, edge_color=gray50 } //---------------------------------------------- Behavior = BHV_AvoidCollision { name = avdcol_ pwt = 350 condition = MODE==ACTIVE condition = MODE!=ACTIVE:STATION-KEEPING condition = WAIT_TO_SAMPLE=false updates = CONTACT_INFO endflag = CONTACT_RESOLVED = $[CONTACT] templating = spawn contact = to-be-set on_no_contact_ok = true extrapolate = true decay = 30,60 use_refinery = true pwt_outer_dist = 20 pwt_inner_dist = 15 completed_dist = 25 min_util_cpa_dist = 5 max_util_cpa_dist = 10 pwt_grade = linear // bearing_line_config = white:0, green:0.65, yellow:0.8, red:1.0 } //---------------------------------------------- //Behavior = BHV_OpRegionRecover { name = recover pwt = 300 condition = MODE==ACTIVE condition = RETURN=false updates = RECOVER_UPDATES activeflag = RECOVER = true inactiveflag = RECOVER = false // Prefer to get the rescue region from uFldRescuMgr dynamic_region_var = CURR_REGION reset_var = OP_REGION_RESET polygon = $(REGION1) //polygon = $(REGION2) buffer_dist = 15 trigger_entry_time = 1 trigger_exit_time = 1 visual_hints = edge_size = 2 visual_hints = edge_color = gray30 }