//-------- FILE: alpha.bhv ------------- initialize DEPLOY = false initialize RETURN = false initialize OBSTACLE_HIT = 0 set MODE = ACTIVE { DEPLOY = true OBSTACLE_HIT = 0 } INACTIVE set MODE = SURVEYING { MODE = ACTIVE RETURN != true } RETURNING //---------------------------------------------- Behavior = BHV_Waypoint { name = waypt_survey pwt = 100 condition = MODE == SURVEYING endflag = RETURN = true idleflag = WPTING = idle runflag = WPTING = running endflag = WPTING = end inactiveflag = WPTING = inactive UPDATES = WPT_UPDATE perpetual = true // lead = 8 // lead_damper = 1 speed = 2 // meters per second capture_line = true capture_radius = 5.0 slip_radius = 8.0 points = 60,-50 : 60,-160 : 150,-160 : 180,-100 : 150,-40 repeat = 5 visual_hints = nextpt_color=yellow visual_hints = nextpt_vertex_size=8 visual_hints = nextpt_lcolor=gray70 visual_hints = vertex_color=dodger_blue, edge_color=white visual_hints = vertex_size=5, edge_size=1 } //---------------------------------------------- Behavior = BHV_Waypoint { name = waypt_return pwt = 100 condition = MODE == RETURNING perpetual = true endflag = RETURN = false endflag = DEPLOY = false endflag = MISSION = complete speed = 2.0 capture_radius = 2.0 slip_radius = 8.0 points = 0,-20 } //---------------------------------------------- // Behavior=BHV_AvoidObstacleX { name = avd_obstacles pwt = 425 condition = MODE == ACTIVE // poly = pts={40,-100:40,-120:80,-120:80,-100}, label=one poly = label=golf,format=ellipse,x=60, y=-105, degs=90, pts=200, snap=1, major=50, minor=10 allowable_ttc = 60 pwt_outer_dist = 35 pwt_inner_dist = 15 completed_dist = 500 visual_hints = obstacle_edge_color = white visual_hints = obstacle_vertex_color = gray60 visual_hints = obstacle_fill_color = gray60 visual_hints = obstacle_fill_transparency = 0.7 visual_hints = buffer_min_edge_color = gray60 visual_hints = buffer_min_vertex_color = dodger_blue visual_hints = buffer_min_vertex_size = 1 visual_hints = buffer_min_fill_color = gray70 visual_hints = buffer_min_fill_transparency = 0.25 visual_hints = buffer_max_edge_color = gray60 visual_hints = buffer_max_vertex_color = dodger_blue visual_hints = buffer_max_vertex_size = 0 visual_hints = buffer_max_fill_color = gray80 visual_hints = buffer_max_fill_transparency = 0.1 use_refinery = true min_util_cpa_dist = 10 max_util_cpa_dist = 25 } //---------------------------------------------- Behavior = BHV_AvoidObstacleV21 { name = avd_obstacles pwt = 425 condition = MODE == ACTIVE //poly = pts={40,-100:40,-120:80,-120:80,-100}, label=one poly = label=golf,format=ellipse,x=60, y=-105, degs=90, pts=20, snap=1, major=50, minor=10 use_refinery = true allowable_ttc = 60 pwt_outer_dist = 35 pwt_inner_dist = 15 completed_dist = 200 buffer_dist = 10 }