//------------------------------------------------- // NAME: Tyler Paine adapted from M. Benjamin, MIT //------------------------------------------------- ServerHost = localhost ServerPort = $(MOOS_PORT) Community = $(VNAME) #define REGION1_COLOR blue #define REGION2_COLOR orange #define REGION3_COLOR yellow #define REGION4_COLOR orange #define REGION5_COLOR pink #define LOITER_ZONE pts={89208,-5645:87485,5075:89940,8258:92065,4392:92723,-5380} #include plugs.moos //------------------------------------------------------------ Processconfig = ANTLER { MSBetweenLaunches = 50 Run = MOOSDB @ NewConsole = false Run = pLogger @ NewConsole = false Run = pNodeReporter @ NewConsole = false Run = pMarinePIDV22 @ NewConsole = false Run = pHelmIvP @ NewConsole = false Run = uProcessWatch @ NewConsole = false Run = pContactMgrV20 @ NewConsole = false Run = pShare @ NewConsole = false Run = pHostInfo @ NewConsole = false Run = uFldMessageHandler @ NewConsole = false Run = uFldNodeBroker @ NewConsole = false Run = uLoadWatch @ NewConsole = false Run = pRealm @ NewConsole = false //Run = pOdometry @ NewConsole = false Run = pOpinionManager @ NewConsole = false Run = uTimerScript @ NewConsole = false Run = uOptionMarker @ NewConsole = false Run = pProxonoi2 @ NewConsole = false Run = pSonarSimDetect @ NewConsole = false Run = uTimerScript @ NewConsole = false ~OptionHoldTimer Run = uTimerScript @ NewConsole = false ~ScenarioResetTimer #ifdef XMODE SIM Run = uSimMarineV22 @ NewConsole = false #elseifdef XMODE M300 Run = iM300 @ NewConsole = false Run = iM300Health @ NewConsole = false #endif } #ifdef XMODE SIM #include plugs.moos #elseifdef XMODE M300 #include plugs.moos #include plugs.moos #endif #include plugs.moos #include plugs.moos #include plugs.moos #include plugs.moos //---------------------------------------------------- // pHelmIvP Config Block ProcessConfig = pHelmIvP { AppTick = 1 CommsTick = 1 ok_skew = any behaviors = targ_$(VNAME).bhv verbose = false domain = course:0:359:360 domain = speed:0:10:21 #ifdef VTYPE AUV domain = depth:0:100:101 #endif goals_mandatory = true hold_on_app = pContactMgrV20 } //-------------------------------------------------------- // pNodeReporter Config Block ProcessConfig = pNodeReporter { AppTick = 1 CommsTick = 1 #ifdef VTYPE AUV platform_type = glider #else platform_type = ship #endif platform_length = 300 platform_color = $(COLOR) group = blue } //-------------------------------------------------------- // pContactMgrV20 Config Block ProcessConfig = pContactMgrV20 { AppTick = 2 CommsTick = 2 decay = 10,20 //decay = 30,60 alert_verbose = true contact_max_age = 35 display_radii = true display_radii_id = avd post_closest_range = true display_radii = true alert_range_color = gray70 cpa_range_color = gray30 hold_alerts_for_helm = true } //-------------------------------------------------- // uFldNodeBroker Config Block ProcessConfig = uFldNodeBroker { AppTick = 1 CommsTick = 1 try_shore_host = pshare_route=$(SHORE_IP):$(SHORE_PSHARE) //try_shore_host = pshare_route=128.30.24.232:9200 bridge = src=ARRIVAL bridge = src=COLREGS_AVOID_MODE bridge = src=AVDCOL_MODE bridge = src=VIEW_POLYGON bridge = src=VIEW_POINT bridge = src=VIEW_CIRCLE bridge = src=VIEW_SEGLIST bridge = src=VIEW_RANGE_PULSE bridge = src=VEHICLE_CONNECT bridge = src=APPCAST bridge = src=BCM_DETECTION_DIST bridge = src=READY_HOLD bridge = src=NODE_REPORT_LOCAL, alias=NODE_REPORT bridge = src=NODE_MESSAGE_LOCAL, alias=NODE_MESSAGE } //-------------------------------------------------- // uFldMessageHandler Config Block ProcessConfig = uFldMessageHandler { AppTick = 3 CommsTick = 3 strict_addressing = false } //----------------------------------------------------- // pMarinePIDV22 Config Block ProcessConfig = pMarinePIDV22 { AppTick = 2 CommsTick = 2 verbose = true #ifdef VTYPE AUV depth_control = true #else depth_control = false #endif active_start = true // Yaw PID controller yaw_pid_kp = 1.2 yaw_pid_kd = 0.1 yaw_pid_ki = 0.3 yaw_pid_integral_limit = 0.07 // Speed PID controller speed_pid_kp = 1.0 speed_pid_kd = 0.0 speed_pid_ki = 0.0 speed_pid_integral_limit = 0.07 // Maximums maxrudder = 100 maxthrust = 100 // A non-zero SPEED_FACTOR overrides use of SPEED_PID // Will set DESIRED_THRUST = DESIRED_SPEED * SPEED_FACTOR //speed_factor = 20 } //-------------------------------------------------- // pLogger Config Block ProcessConfig = pLogger { AppTick = 1 CommsTick = 1 File = LOG_%(VNAME) PATH = ./ AsyncLog = true FileTimeStamp = true Log = IVPHELM_LIFE_EVENT @ 0 nosync // Log it all!!!!! LogAuxSrc = true WildCardLogging = true // Except these fellas WildCardOmitPattern = *_STATUS WildCardOmitPattern = APPCAST WildCardOmitPattern = *_ITER_GAP WildCardOmitPattern = *_ITER_LEN WildCardOmitPattern = PSHARE_OUTPUT_SUMMARY WildCardOmitPattern = DB_VARSUMMARY WildCardOmitPattern = DB_RWSUMMARY WildCardOmitPattern = NAV_SPEED_OVER_GROUND WildCardOmitPattern = SIMULATION_MODE WildCardOmitPattern = TRUE_X WildCardOmitPattern = TRUE_Y WildCardOmitPattern = NAV_PITCH WildCardOmitPattern = NAV_YAW WildCardOmitPattern = NAV_Z WildCardOmitPattern = NODE_PSHARE_VARS WildCardOmitPattern = NODE_BROKER_ACK CompressAlogs = false } //--------------------------------------------------------- // iM300 config block ProcessConfig = iM300 { AppTick = 10 CommsTick = 10 comms_type = client port = 29500 ip_addr = $(FSEAT_IP) stale_thresh = 15 max_rudder = 50 max_thrust = 100 drive_mode = normal ignore_msg = $GPGLL, $GPGSV, $GPVTG, $GPZDA, $CPALT, $CPIMU ignore_msg = $CPNVR, $GPGST, $CPRCM, $GNGLL, $GNGSV, $GNVTG, ignore_msg = $GNZDA, $GLGSV, $GNGSA, $GNTXT ignore_checksum_errors = true max_appcast_events = 8 // max_appcast_run_warnings = 10 // heading_source options are gps, imu, or auto where auto uses imu // when available and not timed out as defined in the stale_thresh // parameter heading_source = auto // threshold in seconds, default is 1.5 stale_thresh = 5 nav_prefix = NAV gps_prefix = GPS compass_prefix = COMPASS } //------------------------------------------------ // iM300Health config block ProcessConfig = iM300Health { AppTick = 4 CommsTick = 4 StaleTime = 3.0 // Time until messages are considered stale MaxHeadingDelta = 5.0 // Max Delta allowable between IMU and GPS LowBattThresh = 13.0 FullBattThresh = 14.4 } //------------------------------------------------ // pOdometry config block ProcessConfig = pOdometry { AppTick = 2 CommsTick = 2 } //---------Dissensus---------------------// #ifdef OPT_MODE dissensus pOpinionManager //------------------------------------------------ // pOpinionManager config block dissensus ProcessConfig = pOpinionManager { AppTick = 2 CommsTick = 2 SocialTick = 1 group = leader // leader, follower node_message_dest_group = blue //option_file = basic_census.opt option_file = basic_dissensus.opt satFunOrder = 2.0 u_th = 0.5 tau_u = 4.0 min_attention = 0.2 max_attention = 2.0 opinion_thresh = 0.2 node_message_color = black neighbor_msg_stale_thresh = 2.0 // seconds // set sensitivity_g and tau_u internally numerical_int_gain = 0.8 // should be less than 1.0 // Example messages: // OPINION_MESSAGE=VNAME,GROUP,OPTION1_NAME,OPTION1_OPINION,OPTION2_NAME,OPTION2_OPINION // PROPOSAL_MESSAGE=VNAME,OPTIONX_NAME,VALUE_PROPOSITION #ifdef VNAME abe // app_logging = log #endif } #endif //---------Consensus-------------------------// #ifdef OPT_MODE consensus pOpinionManager //------------------------------------------------ // pOpinionManager config block consensus ProcessConfig = pOpinionManager { AppTick = 2 CommsTick = 2 SocialTick = 1 group = leader // leader, follower option_file = basic_census.opt //option_file = basic_dissensus.opt satFunOrder = 2.0 u_th = 1.75 tau_u = 4.0 min_attention = 0.6 max_attention = 0.6 opinion_thresh = 0.4 node_message_color = black neighbor_msg_stale_thresh = 2.0 // seconds // set sensitivity_g and tau_u internally numerical_int_gain = 0.3 // should be less than 1.0 // Example messages: // OPINION_MESSAGE=VNAME,GROUP,OPTION1_NAME,OPTION1_OPINION,OPTION2_NAME,OPTION2_OPINION // PROPOSAL_MESSAGE=VNAME,OPTIONX_NAME,VALUE_PROPOSITION #ifdef VNAME abe // app_logging = log #endif } #endif //------------------------------------------ // uTimerScript configuration block ProcessConfig = uTimerScript { AppTick = 1 CommsTick = 1 paused = false reset_max = unlimited reset_time = end delay_reset = 600 script_name = RAND_OP script_atomic = true randvar = varname=LOITER_BIAS, min=-0.0050, max=0.0050, key=at_post randvar = varname=TRAIL_BIAS, min=-0.0050, max=0.0050, key=at_post event = var=LOITER_BIAS, val=$[LOITER_BIAS], time=0 event = var=TRAIL_BIAS, val=$[TRAIL_BIAS], time=0 } //------------------------------------------ // uOptionMarker configuration block ProcessConfig = uOptionMarker { AppTick = 0.2 CommsTick = 0.2 edge_size = 4.0 radius = 300.0 opinion_saturated_limit = 0.2 post_circ_with_stale_opinion = true color_set = LOITER:$(REGION1_COLOR) color_set = TRAIL:$(REGION2_COLOR) } //------------------------------------------------------------- ProcessConfig = pProxonoi2 { AppTick = 0.2 CommsTick = 0.2 region = $(LOITER_ZONE) ignore_list_update_var = TRAIL_LIST post_region = false post_poly = false always_ignore_name = intruder } //--------------------------------------------------------- ProcessConfig = pSonarSimDetect { AppTick = 0.1 CommsTick = 0.1 beam_angle = 170 target_name = intruder target_depth = 200 sonar_frequency = 0.01 detect_flag_double = TRAIL_BIAS=100.0 } //------------------------------------------ // OptionHoldTimer configuration block ProcessConfig = OptionHoldTimer { AppTick = 1 CommsTick = 1 paused = true pause_var = HOLD_OPTIONS reset_max = unlimited reset_time = end delay_reset = 1 script_name = HOLD_OPTIONS script_atomic = true event = var=OPTIONS_ACTIVE, val=false, time=30 //event = var=RESET_OPINIONS, val=true, time = 31 event = var=HOLD_OPTIONS, val=true, time=32 } //------------------------------------------ // OptionHoldTimer configuration block ProcessConfig = ScenarioResetTimer { AppTick = 1 CommsTick = 1 paused = false pause_var = SCENARIO_RESET_PAUSE reset_max = unlimited reset_time = end delay_reset = 1 script_name = SCENARIO_RESET script_atomic = true randvar = varname=RAND_TRAIL_ANGLE, min=100, max=260, key=at_post event = var=TRAIL_INFO, val="trail_angle=$[RAND_TRAIL_ANGLE]", time=10 event = var=LOITER_BIAS, val=0.0, time=2400 event = var=TRAIL_BIAS, val=0.0, time=2400 event = var=RESET_OPINIONS, val=true, time = 2401 event = var=OPTIONS_ACTIVE, val=true, time=2410 }