迁移分支
This commit is contained in:
93
missions/s1_alpha/alpha.bhv
Normal file
93
missions/s1_alpha/alpha.bhv
Normal file
@@ -0,0 +1,93 @@
|
||||
//-------- FILE: alpha.bhv -------------
|
||||
|
||||
initialize DEPLOY = false
|
||||
initialize RETURN = false
|
||||
|
||||
//----------------------------------------------
|
||||
Behavior = BHV_Waypoint
|
||||
{
|
||||
name = waypt_survey
|
||||
pwt = 100
|
||||
condition = RETURN = false
|
||||
condition = DEPLOY = true
|
||||
endflag = RETURN = true
|
||||
|
||||
configflag = CRUISE_SPD = $[SPEED]
|
||||
//configflag = OSPOS = $[OSX],$[OSY]
|
||||
|
||||
activeflag = INFO=$[OWNSHIP]
|
||||
activeflag = INFO=$[BHVNAME]
|
||||
activeflag = INFO=$[BHVTYPE]
|
||||
|
||||
cycleflag = CINFO=$[OSX],$[OSY]
|
||||
|
||||
wptflag = PREV=$(PX),$(PY)
|
||||
wptflag = NEXT=$(NX),$(NY)
|
||||
wptflag = TEST=$(X),$(Y)
|
||||
wptflag = OSPOS=$(OSX),$(OSY)
|
||||
wptflag_on_start = true
|
||||
|
||||
updates = WPT_UPDATE
|
||||
perpetual = true
|
||||
|
||||
speed_alt = 1.2
|
||||
use_alt_speed = true
|
||||
lead = 8
|
||||
lead_damper = 1
|
||||
lead_to_start = true
|
||||
speed = 12 // meters per second
|
||||
capture_line = true
|
||||
capture_radius = 5.0
|
||||
slip_radius = 15.0
|
||||
efficiency_measure = all
|
||||
|
||||
// points = pts={107.5,-53.5:112,-43.8:112,-46.1:111.7,-49.3:108.3,-52.7:107.7,-53.3}
|
||||
polygon = 60,-40 : 60,-160 : 150,-160 : 180,-100 : 150,-40
|
||||
|
||||
order = normal
|
||||
//repeat = 100000
|
||||
repeat = 3
|
||||
|
||||
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 = RETURN = true
|
||||
condition = DEPLOY = true
|
||||
perpetual = true
|
||||
updates = RETURN_UPDATE
|
||||
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_ConstantSpeed
|
||||
{
|
||||
name = const_speed
|
||||
pwt = 200
|
||||
condition = SPD=true
|
||||
condition = DEPLOY = true
|
||||
perpetual = true
|
||||
updates = SPEED_UPDATE
|
||||
endflag = SPD = false
|
||||
|
||||
speed = 0.5
|
||||
duration = 10
|
||||
duration_reset = CONST_SPD_RESET=true
|
||||
|
||||
}
|
||||
|
||||
218
missions/s1_alpha/alpha.moos
Normal file
218
missions/s1_alpha/alpha.moos
Normal file
@@ -0,0 +1,218 @@
|
||||
//-------------------------------------------------
|
||||
// NAME: M. Benjamin, MIT CSAIL
|
||||
// FILE: alpha.moos
|
||||
//-------------------------------------------------
|
||||
|
||||
ServerHost = localhost
|
||||
ServerPort = 9000
|
||||
Community = alpha
|
||||
MOOSTimeWarp = 1
|
||||
|
||||
// Forest Lake
|
||||
LatOrigin = 43.825300
|
||||
LongOrigin = -70.330400
|
||||
|
||||
// MIT Sailing Pavilion (use this one)
|
||||
// LatOrigin = 42.358456
|
||||
// LongOrigin = -71.087589
|
||||
|
||||
//------------------------------------------
|
||||
// Antler configuration block
|
||||
ProcessConfig = ANTLER
|
||||
{
|
||||
MSBetweenLaunches = 200
|
||||
|
||||
Run = MOOSDB @ NewConsole = false
|
||||
Run = pLogger @ NewConsole = false
|
||||
Run = uSimMarineV22 @ NewConsole = false
|
||||
Run = pMarinePIDV22 @ NewConsole = false
|
||||
Run = pHelmIvP @ NewConsole = false
|
||||
Run = pMarineViewer @ NewConsole = false
|
||||
Run = uProcessWatch @ NewConsole = false
|
||||
Run = pNodeReporter @ NewConsole = false
|
||||
Run = pRealm @ NewConsole = false
|
||||
}
|
||||
|
||||
//------------------------------------------
|
||||
// pLogger config block
|
||||
|
||||
ProcessConfig = pLogger
|
||||
{
|
||||
AppTick = 8
|
||||
CommsTick = 8
|
||||
|
||||
AsyncLog = true
|
||||
|
||||
// For variables that are published in a bundle on their first post,
|
||||
// explicitly declare their logging request
|
||||
Log = IVPHELM_LIFE_EVENT @ 0 NOSYNC
|
||||
Log = REPORT @ 0 NOSYNC
|
||||
Log = BHV_SETTINGS @ 0 NOSYNC
|
||||
|
||||
LogAuxSrc = true
|
||||
WildCardLogging = true
|
||||
WildCardOmitPattern = *_STATUS
|
||||
WildCardOmitPattern = DB_VARSUMMARY
|
||||
WildCardOmitPattern = DB_RWSUMMARY
|
||||
WildCardExclusionLog = true
|
||||
}
|
||||
|
||||
//------------------------------------------
|
||||
// uProcessWatch config block
|
||||
|
||||
ProcessConfig = uProcessWatch
|
||||
{
|
||||
AppTick = 4
|
||||
CommsTick = 4
|
||||
|
||||
watch_all = true
|
||||
nowatch = uPokeDB*
|
||||
nowatch = uQueryDB*
|
||||
nowatch = uXMS*
|
||||
nowatch = uMAC*
|
||||
}
|
||||
|
||||
//------------------------------------------
|
||||
// uSimMarineV22 config block
|
||||
|
||||
ProcessConfig = uSimMarineV22
|
||||
{
|
||||
AppTick = 4
|
||||
CommsTick = 4
|
||||
|
||||
start_pos = x=0, y=-20, heading=180, speed=0
|
||||
|
||||
prefix = NAV
|
||||
|
||||
turn_rate = 40
|
||||
thrust_map = 0:0, 20:1, 40:2, 60:3, 80:4, 100:5
|
||||
//thrust_reflect = true
|
||||
}
|
||||
|
||||
//------------------------------------------
|
||||
// pHelmIvP config block
|
||||
|
||||
ProcessConfig = pHelmIvP
|
||||
{
|
||||
AppTick = 4
|
||||
CommsTick = 4
|
||||
|
||||
behaviors = alpha.bhv
|
||||
domain = course:0:359:360
|
||||
domain = speed:0:4:41
|
||||
}
|
||||
|
||||
//------------------------------------------
|
||||
// pMarinePID config block
|
||||
|
||||
ProcessConfig = pMarinePIDV22
|
||||
{
|
||||
AppTick = 20
|
||||
CommsTick = 20
|
||||
|
||||
verbose = true
|
||||
depth_control = false
|
||||
|
||||
// SIM_INSTABILITY = 20
|
||||
|
||||
// Yaw PID controller
|
||||
yaw_pid_kp = 1.2
|
||||
yaw_pid_kd = 0.0
|
||||
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
|
||||
}
|
||||
|
||||
//------------------------------------------
|
||||
// pMarineViewer config block
|
||||
|
||||
ProcessConfig = pMarineViewer
|
||||
{
|
||||
AppTick = 4
|
||||
CommsTick = 4
|
||||
|
||||
tiff_file = forrest19.tif
|
||||
//tiff_file = MIT_SP.tif
|
||||
|
||||
set_pan_x = -90
|
||||
set_pan_y = -280
|
||||
zoom = 0.65
|
||||
vehicle_shape_scale = 1.5
|
||||
hash_delta = 50
|
||||
hash_shade = 0.22
|
||||
hash_viewable = true
|
||||
|
||||
trails_point_size = 1
|
||||
|
||||
//op_vertex = x=-83, y=-47, lwidth=1,lcolor=yellow,looped=true,group=moa
|
||||
//op_vertex = x=-46.4, y=-129.2, lwidth=1,lcolor=yellow,looped=true,group=moa
|
||||
//op_vertex = x=94.6, y=-62.2, lwidth=1,lcolor=yellow,looped=true,group=moa
|
||||
//op_vertex = x=58, y=20, lwidth=1,lcolor=yellow,looped=true,group=moa
|
||||
|
||||
// Appcast configuration
|
||||
appcast_height = 75
|
||||
appcast_width = 30
|
||||
appcast_viewable = true
|
||||
appcast_color_scheme = indigo
|
||||
nodes_font_size = xlarge
|
||||
procs_font_size = xlarge
|
||||
appcast_font_size = large
|
||||
|
||||
// datum_viewable = true
|
||||
// datum_size = 18
|
||||
// gui_size = small
|
||||
|
||||
// left_context[survey-point] = DEPLOY=true
|
||||
// left_context[survey-point] = MOOS_MANUAL_OVERRIDE=false
|
||||
// left_context[survey-point] = RETURN=false
|
||||
|
||||
right_context[return] = DEPLOY=true
|
||||
right_context[return] = MOOS_MANUAL_OVERRIDE=false
|
||||
right_context[return] = RETURN=false
|
||||
|
||||
scope = RETURN
|
||||
scope = WPT_STAT
|
||||
scope = VIEW_SEGLIST
|
||||
scope = VIEW_POINT
|
||||
scope = VIEW_POLYGON
|
||||
scope = MVIEWER_LCLICK
|
||||
scope = MVIEWER_RCLICK
|
||||
|
||||
button_one = DEPLOY # DEPLOY=true
|
||||
button_one = MOOS_MANUAL_OVERRIDE=false # RETURN=false
|
||||
button_two = RETURN # RETURN=true
|
||||
button_three = SLOWER # WPT_UPDATE=speed=1.5
|
||||
button_four = FASTER # WPT_UPDATE=speed=3.5
|
||||
|
||||
action = MENU_KEY=deploy # DEPLOY = true # RETURN = false
|
||||
action+ = MENU_KEY=deploy # MOOS_MANUAL_OVERRIDE=false
|
||||
action = RETURN=true
|
||||
action = UPDATES_RETURN=speed=1.4
|
||||
}
|
||||
|
||||
//------------------------------------------
|
||||
// pNodeReporter config block
|
||||
|
||||
ProcessConfig = pNodeReporter
|
||||
{
|
||||
AppTick = 2
|
||||
CommsTick = 2
|
||||
|
||||
platform_type = kayak
|
||||
platform_color = yellow
|
||||
platform_length = 4
|
||||
}
|
||||
|
||||
37
missions/s1_alpha/clean.sh
Executable file
37
missions/s1_alpha/clean.sh
Executable file
@@ -0,0 +1,37 @@
|
||||
#!/bin/bash
|
||||
#--------------------------------------------------------------
|
||||
# Script: clean.sh
|
||||
# Author: Michael Benjamin
|
||||
# Date: June 2020
|
||||
#----------------------------------------------------------
|
||||
# Part 1: Declare global var defaults
|
||||
#----------------------------------------------------------
|
||||
VERBOSE=""
|
||||
|
||||
#-------------------------------------------------------
|
||||
# Part 2: Check for and handle command-line arguments
|
||||
#-------------------------------------------------------
|
||||
for ARGI; do
|
||||
if [ "${ARGI}" = "--help" -o "${ARGI}" = "-h" ] ; then
|
||||
echo "clean.sh [SWITCHES] "
|
||||
echo " --verbose "
|
||||
echo " --help, -h "
|
||||
exit 0;
|
||||
elif [ "${ARGI}" = "--verbose" -o "${ARGI}" = "-v" ] ; then
|
||||
VERBOSE="-v"
|
||||
else
|
||||
echo "clean.sh: Bad Arg:" $ARGI
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
#-------------------------------------------------------
|
||||
# Part 2: Do the cleaning!
|
||||
#-------------------------------------------------------
|
||||
if [ "${VERBOSE}" = "-v" ]; then
|
||||
echo "Cleaning: $PWD"
|
||||
fi
|
||||
rm -rf $VERBOSE MOOSLog_* XLOG_* LOG_*
|
||||
rm -f $VERBOSE *~ *.moos++
|
||||
rm -f $VERBOSE targ_*
|
||||
rm -f $VERBOSE .LastOpenedMOOSLogDirectory
|
||||
39
missions/s1_alpha/launch.sh
Executable file
39
missions/s1_alpha/launch.sh
Executable file
@@ -0,0 +1,39 @@
|
||||
#!/bin/bash -e
|
||||
#----------------------------------------------------------
|
||||
# Script: launch.sh
|
||||
# Author: Michael Benjamin
|
||||
# LastEd: May 20th 2019
|
||||
#----------------------------------------------------------
|
||||
# Part 1: Set Exit actions and declare global var defaults
|
||||
#----------------------------------------------------------
|
||||
TIME_WARP=1
|
||||
COMMUNITY="alpha"
|
||||
GUI="yes"
|
||||
|
||||
#----------------------------------------------------------
|
||||
# Part 2: Check for and handle command-line arguments
|
||||
#----------------------------------------------------------
|
||||
for ARGI; do
|
||||
if [ "${ARGI}" = "--help" -o "${ARGI}" = "-h" ] ; then
|
||||
echo "launch.sh [SWITCHES] [time_warp] "
|
||||
echo " --help, -h Show this help message "
|
||||
exit 0;
|
||||
elif [ "${ARGI}" = "--nogui" ] ; then
|
||||
GUI="no"
|
||||
elif [ "${ARGI//[^0-9]/}" = "$ARGI" -a "$TIME_WARP" = 1 ]; then
|
||||
TIME_WARP=$ARGI
|
||||
else
|
||||
echo "launch.sh Bad arg:" $ARGI " Exiting with code: 1"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
#----------------------------------------------------------
|
||||
# Part 3: Launch the processes
|
||||
#----------------------------------------------------------
|
||||
echo "Launching $COMMUNITY MOOS Community with WARP:" $TIME_WARP
|
||||
pAntler $COMMUNITY.moos --MOOSTimeWarp=$TIME_WARP >& /dev/null &
|
||||
|
||||
uMAC -t $COMMUNITY.moos
|
||||
kill -- -$$
|
||||
Reference in New Issue
Block a user