===================================================== Build System ===================================================== MOOS Build In MOOS/MOOSToolsUI/Tools/Graphical/Thirdparty/libFLTKVW/CMakeLists.txt commented out: #FIND_LIBRARY(GLUT REQUIRED ) #FIND_LIBRARY(OpenGL REQUIRED ) ===================================================== Core Helm ===================================================== o New method for handling deprecated apps pHelmIvP (IvPCore) o All behaviors may now designate themselves optionally as a "constraint" behavior, through the virtual function IvPBehavior::isConstraint() which by default returns false. Many of built-in helm behaviors are constraint behaviors, e.g., AvoidCollision, AvoidObstacle, MaxDepth. When the Helm detects a collection of IvP Functions consisting solely of a group of constraint behaviors, i.e., no goal behaviors like Waypoint, it will NOT publish any of the DESIRED_* values. If this happens only for one iteration, it will just quietly not post anything. If it persists for more than one iteration, it will produce an allstop. This was to handle cases where a mission would transition from one state to another via endflags/conditions, but during one transition iteration there would only be constraint behavior(s), which could produce a non-deterministic desired_* posting for one iteration. TODO: make this an optional but highly recommended configuration with "goal_mandatory=true" o When behaviors post to BHV_EVENT, this is posted as any other variable, but now also will be posted in the AppCasting events of the pHelmIvP AppCast output. Behavior authors can use postEventMessage() or postRepeatableEventMessage(). Each function simply accepts a string but will also append on the beginning the behavior instance name. o Behaviors have a new virtual function checkParamCollective() which is called upon helm launch for each new behavior as it is built, including template behaviors. It allows the behavior author to have a function where the overall set of parameters is validated for correctness. Some behaviors have parameters that may each individually be OK, but taken together may be invalid. An example is say, min_range and max_range. In this function we can check that min_range is not more than max_range for example. lib_ivpcore (IvPCore) --------------------------------------------------- o IvPBox class: Added "plat" field to the IvPBox class to allow instances to be tagged upon creation in an IvP function as either plateau or basin pieces. This allows the IvPBuild Reflector tool to accept plateaus and basins from Refineries, and ensure that these pieces are not evaluated using the Regressor, but instead are just set to the min (basin) or max (plateau) values if the AOF is defined to support known min/max values. o IvPDomain class: Added a few utility functions for finding closest domain values given another domain value. lib_ivpbuild (IvPBuild) --------------------------------------------------- o Regressor: The regressor now looks for IvP pieces that were tagged as plateaus or basins and sets their weight directly if applicable. o OF_Reflector: The reflector, when accepting plateaus and basins from refineries, will now tag them as such, to allow the Regressor to handle them by setting their weights directly (instead of sampling) o BuildUtils: Added two useful utilities. The first, testRegionsApart() will test whether any pair of boxes, in a give vector of boxes, intersects one another. The second, makeRegionsApart() will take a given set of boxes and return a new set where any pair of boxes that intersected is replace by a set of non-intersecing boxes. Boxes of lower "plat magnitude" will be subtracted from boxes of higher plat magnitude. This a useful utility for designers of behavior refineries. o RT_UniformX: The UniformX regression tool has been augmented to check basins and plateaus, if they exist, to ensure they do not overlap. This should not really be the case if the users of the RT_UniformX tool have done their job correctly, but it is checked for here anyway and dealt with if need be, to ensure that a valid IPF is generated by this tool. An IPF is valid if each point in the decision space is contained by one and only one piece. lib_contacts --------------------------------------------------- o Added utility functions to the NodeRecord class to check determine if certain member variables have been set by the user. aloggrep --------------------------------------------------- o Added the --final option, to output only the final line of the grep output, to the terminal. This allows aloggrep to be used testing/eval scripts. o Added the --finalx option, similar to --final, but it only outputs the value field of the log entry line. o Added the --finalz option, similar to --final, but it only outputs the timestamp field of the log entry line. o Added the -tvo options, similar to the --values_only option except that it will include the timestamp for each line, separated by a comma o Added the --format set of command-line options for converting alog data into Matlab or similar plottable format. This also includes calling out data embedded in a string such as INFO=speed=2.4,heading=128. The speed info for example can be extracted with the --subpat command line option. alogtest --------------------------------------------------- o TODO: Document alogtest utility!! uPokeDB --------------------------------------------------- o Bug fix in constructor (uninitialized state variable) that may result in un-poked value under some circumstances. uSimMarine --------------------------------------------------- o Subscribes now to USM_TURN_RATE to dynamically change the vehicle turn rate mid-mission. This is to support simulations where a vehicle receives an aft connected vehicle to tow o Subscribes now to USM_ENABLED to disable the simulator mid-mission to allow another simulator to temporarily take over. This is to support simulations where a vehicle trasitions into being towed by another vehicle nsplug --------------------------------------------------- o added support. A #include directive can specify a and only the portion of the file labeled with the will be included. uQueryDB --------------------------------------------------- o Added ability to configure the condition and timeout from the mission file o Added Appcasting ability. o Both mods allow query configuration to be in the mission file rather than in the shell script invoking uQueryDB uLoadWatch --------------------------------------------------- o Added further output: ULW_BREACH=bool indicating if any breach of any type at all occurred. ULW_BREACH_COUNT=uint indicating total breaches of any type. ULW_BREACH_LIST=apps indicating the apps that have experienced a breach at any time. pBasicContactMgr --------------------------------------------------- pBasicContactMgrV20 --------------------------------------------------- o A substantially improved contact manager has been given a new name to reflect its introduction with the 20.x release. It is designed to be backward compatible to the previous contact manager but with enough changes that it deserves its own tag. And for V&V purposes it allows users upgrading to have the former contact manager while they verify a smooth transition o Rendering of range circles has been made more efficient. In the mode where rendering is turned off, the contact manager was posting invisible circles on each iteration. This inefficiency has been fixed. o No longer registers and acts on CONTACT_RESOLVED mail. Previously this needed to be posted by an alert consumer, like a collision avoidance behavior, to tell the contact manager that, should the contact come back in range, another alert needs to be generated. The contact manager now notes when a contact has gone out of cpa_range, and if it ever satisfies the alert criteria again, it posts a new alert. Typically a collision avoidance behavior is also configured to complete/die when the range is greater than the cpa_range. This is automatically tied, in the behavior startup, to post o contact_max_age default has been changed from 600 to 60 seconds o A new max_contacts parameter, set to 500 contacts o Added a general Exclusion Filter attached to alerts. The ExFilter class is part of bhvutil library and allows alerts to be configured to match or ignore based on contact group, name, type or position in a defined region. o An inclusion or exclusion region can now be associated per alert, or globally for the contact manager. o Documentation for this contact manager has been augmented and improved. o Improved support for getting information about the closest contact, how long it has been the closest contact and full ordered range report for all contacts. o Improved memory management and documentation. Ensures against unbounded growth of contacts and policy for dropping contacts is clarified. o Changed the option for visualizing alert ranges, to only publish range circles associate with one alert. This can be chosen by the user at startup, or dynamically switched at run time. pObstacleMgr --------------------------------------------------- o Minor mod in how to-be-erased obstacles are published to improve efficiency and robustness. o Changed how and whether the distances to obstacles are published. Previously a dedicated MOOS variable was published for each obstacle with simply the numeric distance. And this distance was published perpetually, regardless of the distance to the obstacle. The change now posts all object distances in a single OBM_DIST_TO_OBJ posting. Each posting is now a string, of the form "ob_key,dist". This avoids unlimited growth of MOOS variables if a sensor is assigning a new object id/key for each newly sensed object. The user can now also control when this information is published through the post_dist_to_polys configuration parameter. When set to "true", it will publish the distance to all know obstacles regardless of distance. When set to "false" it will not publish anything. When set to "close", the object distance will only posted if within the alert range. The default is "close". o Now accepts given obstacles with a duration. If no new reports of the an obstacle are received after the duration window, the obstacle will be dropped by the obstacle manager. An obstacle received with a duration of zero is essentially an indication to drop the obstacle immediately. This is useful in sensor apps feeding the obstacle manager, when the app determines that an sensed obstacle was a false alarm. pNodeReporter --------------------------------------------------- o Added alt_nav_group parameter to allow a distinct group name to be published when in dual-nav mode. This alt_nav_group name will be associated with the NODE_REPORT_LOCAL publication associated with the alt nav. o Added NODE_GROUP_UPDATE mail to allow a dynamic changing of the group name during run-time o Added a new cross_fill_policy option, "global", to always fill in the X-Y components from the Lat-Lon components. o Added nav_grace_period param, default 40 secs. pNodeReporter will delay publishing NODE_REPORT postings devoid of NAV info. Such postings may trigger unretractable run warnings in other apps and may be simply due to a need to wait a hair longer for uSimMarine or the GPS device to connect and start publishing Nav info. Setting to -1 will cause pNodeReport to wait indefinitely for Nav info before ever publhsing a node report. o Added ability to add "rider" fields, a configured MOOS variable that will be included in NODE_REPORT messages. gen_obstacles --------------------------------------------------- o Added the ability to produce obstacle vertex locations rounded to the nearest integer. uFldNodeComms --------------------------------------------------- o Added ability to control the node report share rate between vehicles, and thus also the rate of node pulses generated. o Added the node report share feature which will re-post node reports to NODE_REPORT_UNC, which allows pMarineViewer to ingest a filtered stream of node reports. This enables pMarineViewer to perform better in missions with very high number of vehicles and very high time warp. o Added config param to set pulse duration. o Added config param, ignore_group, to allow node reports to be ignored that match the specified group. o Added config param, msg_groups. If true, then messages between vehicles from different groups will be blocked. o Updated documentation pMissionEval (New App) --------------------------------------------------- The pMissionEval app is used for determining if a mission has succeeded. A set of Pass/Fail logic conditions are specified and at the right point in time, these conditions are evaluated with results posted in user-configurable flags. The point in time when evaluation is done is also determined by user configurable logic conditions. The goal is to have a succinct result (one or two variables) that can be easily checked by log tools for evualtion, or uQueryDB for mission stopping criteria. pRealm (New App) --------------------------------------------------- The pRealm application is used for shadowing the local MOOSDB and generating on-demand RealmCast reports. These reports are requested and consumed by pMarineViewer or similar app configured to interact with pRealm. Typically pRealm is run on both the shoreside and vehicle communities. This is a major new tool to support large multi-vehicle swarm simulations and in-field deployments. uFldCollObDetect (New App) --------------------------------------------------- uFldObstacleSim (Virtually New App) --------------------------------------------------- o Added support for decaying obstacles to test downstream, in the obstacle manager, the proper handling of reported obstacles ceasing to be reported. In this case the obstacles should be dropped after the obstacle duration has been exceeded. uFldContactRangeSensor --------------------------------------------------- o Added config param, ignore_group, to allow node reports to be ignored that match the specified group. lib_behaviors-marine (BHV_Waypoint) --------------------------------------------------- o Augmented the Waypoint behavior to support an update to the set of waypoints while holding the "current" waypoint index constant. This was motivated by a mission where the set of points are on a moving ice mass in the arctic. o Added the wptflag_on_start configurable flag, by default false. When set to true, it will post a normal wptflag when the behavior starts, as if its origin point is a waypoint. o TODO!! Document the lead_condition parameter!! uFldCollisionDetect --------------------------------------------------- o Added COLLISION_TOTAL and NEAR_MISS_TOTAL as standard output o Added ignore_group and reject_group options. Vehicles in a reject_group will have their node reports rejected on arrival. For vehicles in an ignore_group, encounters will be ignored if the both vehicles are in an ignore_group. Encounters where only one vehicle is in an ignore_group will be treated normally. The group of a vehicle is a field inside a NodeReport, and can be configured per vehicle inside pNodeReporter for a given vehicle. lib_behaviors-marine (BHV_AvoidObstacleV21) --------------------------------------------------- o Modified the AvoidObstacle behavior to use the XYPolyExpander class to build the buffer regions around the base obstacle o Modified the AOF_AvoidObstacle class to evaluate maneuvers that intersect the obstacle, but do not intersect until after the allowable time to collision (allowable_ttc). The modification uses the overall min distance to the polygon, for any maneuver, and not the maneuver being evaluated. This creates a slightly more conservative evaluation and avoids the problem where a maneuver more toward the middle of the obstacle can be evaluated with a slightly higher utility. o Now supports the rng_flag and cpa_flag feature. The rng_flag is posted either continuously or only when ownship is within a specified range to the obstacle. The cpa_flag is posted upon each CPA encounter with the obstacle. This behavior also now supports a number of macros that may be expanded in these flags or all IvPBehavior flags. uMACView --------------------------------------------------- o Augmented to support realmcasting, to match the functionality of pMarineViewer. uProcessWatch --------------------------------------------------- o Added summary var PROC_WATCH_ALL_OK always set to either true/false pMarineViewer --------------------------------------------------- o Major new augmentation to support RealmCasting, a powerful new tool for scoping on any app in a multi-vehicle mission. Clusters of variables can be configured to scope across multiple vehicles in a single table. This works in conjunction with a new app called pRealm, which requires no configuration and runs in each MOOS community. Toggling between appcasting and realmcasting is done with the 'a' key. o Augmented the GUI to accept up to twenty buttons for command poking, up from the previous limit of four buttons. Buttons and info fields will automatically resize to accommodate however many buttons are used o Command buttons, when hovering with the mouse, will show what is being commanded upon a button click. o VPlug_GeoShapes class was modified to explicitly drop from memory shapes that arrive with active=false. Previously this would just result in the object being ignored, but not removed. This mod guards against unbounded memory growth in pMarineViewer in some longer missions. o VPlug_AppCastSettings in lib_geometry was replace with InfoCastSettings in lib_apputil. This class stores all the user preferences applicable to appcasting and realmcasting. The new class is also used by uMACView. o An additional variable, REGION_INFO, is published upon startup, and whenever a new vehicle has been detected. This info holds info about the background image, the zoom, the datum, and the pan x/y info. It is intended simply to be logged, and used by alogview upon startup to replicate the background image and orientation to be similar to how pMarineViewer was launched. o Points and circles now have support to publish with a duration, and once the duration has been exceeded with now new publication (keyed on label), the object will be dropped from memory. o Improved rapid drawing for large sets of Polygons o Fixed bug where text/labels for objects off screen would be rendered on screen, appended to other objects' text, rather than simply not being drawn. o New Option of ingesting NODE_REPORT info from uFldNodeComms as an intermediary. This enables smoother operation of pMarineViewer in missions with very high number of vehicles and very high time warp. Enabled with node_report_unc=true configuration. Of course must also be running uFldNodeComms. Unit testing --------------------------------------------------- o Added unit test harness and test cases for polyRayCPA() geometry util. o Added better --help output for the utest utility. lib_geometry --------------------------------------------------- o Added serialization to XYWedge Class, for rendering. o (GeomUtils) Added the polyRayCPA() function to support the new style of evaluating maneuvers in the obstacle avoidance behavior. o (GeomUtils) Fixed bug in bearingMinMaxToPoly(). Erroneous results from certain cases have been fixed. o (GeomUtils) Added bearingMinMaxToPolyX() function which also calculates the distance from the given point to the two tangent points on the poly. o (GeomUtils) Added randPointOnPoly() function to support simulated lidar returns on a polygon, given a point relative to the polygon. o (AngleUtils) Added function for calculating the cross product of three points, to determine colinearity, or left/right turn. o (VPlug_GeoShapes class) was modified to explicitly drop from memory shapes that arrive with active=false. Previously this would just result in the object being ignored, but not removed. This mod guards against unbounded memory growth in pMarineViewer in some longer missions. o (VPlug_GeoShapes class) modified to support generic memory management of objects with duration. o Added XYPolyExpander class. In support of new style of obstacle avoidance although expanded obstacle polys are really only used for visualization. o Added XYPolygon area calculation algorithm to support new Voronoi functions. o (XYSegList class) Added bearingMinMaxToPolyX() function which also calculates the distance from the given point to the two tangent points on the poly. o (XYCircle class) Fixed a bug in one of the constructors that failed to initialize the duration, which could result in a zero duration and non-rendering of circle postings in pMarineViewer. o (XYSegList class) Added get_spec_inactive() utility function. This returns a trivially small spec, with bogus points, with just the active=false,label=value portion. This is used in cases where the spec is just being used to "erase" a previously generated spec sent to a viewer like pMarineViewer or alogview. It was motivated by a problem where some perfectly ok convex polygons, which were to be erased, were being rejected by the receiver because the serialization of the polygon rounded the vertex values just so slightly that the polygon was no longer convex and it was thus rejected by the viewer. In these cases, when active=false, the poly is simply to be ignored (replacing a previously active poly). So the points are extra information anyway. o (XYPolygon class) Added add_vertex_delta() function which allows a new vertex addition to be rejected if the new vertex is with a given threshold of the previously added vertex. This is a utility used in the XYPolyExpander utility. Added a min_xproduct() function to identify a vertex with the minimum cross product w.r.t. the point on either side. This enables a heuristic for dropping colinear points in a polygon that may prevent the polygon from confirming convexity. o (XYObject class) duration for all geo shapes. With general support for an expiration test. This enables easy implementation in pMarineViewer to drop objects from memory after they expire. Makes memory management easier for apps publishing ephemeral artifacts since they don't have to reason about posting an erase (active=false) message. o (ConvexHullGenerator class) Substantial improvements in edge case handling especially on the issue of colinear points. It also will now generate a more reasonable response for cases with two vertices, or even one vertex. o Fixed a bug in the segRayCPA() function that didn't account for rays with an origin with the segment pointing away. o VPlug_AppCastSettings in lib_geometry was replace with InfoCastSettings in lib_apputil. lib_mbutil --------------------------------------------------- o Added an Odometer utility class lib_bhvutil (Behavior Utilities) --------------------------------------------------- o Added RefineryObAvoid in support of a new method for evaluating maneuvers in the obstacle avoidance behavior. o Added AOF_AvoidObstacleX class for evaluating maneuvers in the new AvoidObstacleX behavior that aren't covered by the refinery. lib_behaviors (IvPBehavior class) --------------------------------------------------- o Added member info on whether the behavior was dynamically spawned, and the spawn basename. The helm, if dynamically spawning a behavior, will mark it as such. This allows the behavior implementation to perhaps do some things differently if wanted. For example, the obstacle avoidance behavior may be working with static obstacles known a priori and it may be working with obstacles detected dynamically via sensors. o Added configflag parameter. These flags are posted upon startup, when the behavior is configured, and any time a behavior update has been successfully made. o Added the postEventMessage() and postRepeatableEventMessage() functions available to all behaviors. They will result in a posting to the MOOS variable BHV_EVENT. These messages will also show up in the events portion of the pHelmIvP AppCasting output. lib_behaviors (IvPContactBehavior class) --------------------------------------------------- o Expanded the number of match_groups and ignore_groups to be more than one. Now any arbitrary groups may be named. o Added a post_per_contact_info=true/false parameter that may generally used for any contact behavior. But in the case of AvoidCollision, AvdColregsV17, and AvdColregsV19, when false, it will disable per_contact info, such as posting RANGE_. This kind of posting will create an unbounded number of MOOS variables in the DB as the number of unique contact names grow. This new parameter is set to false by default. So users of the above three behaviors may find that certain postings no longer happen unless they set post_per_contact_info=true. o Added cnflag to all contact behaviors. This flag posted on user defined events, such as entering with a given range, opening to a given range, or hitting the CPA range. Other events may be added such crossing the contact bow or crossing the contact beam. o Along with the cnflag, a number of flag options are now available to all IvPContact behaviors for all flags. This include: CN_NAME: Name of the contact CN_VTYPE: Vehicle type of the contact CN_GROUP: Group name of the contact CN_STAR_OF_OS: Boolean true if the contact is on starboard side of ownship ROC", doubleToStringX(m_rate_of_closure,1)); RANGE", doubleToStringX(m_contact_range,1)); OS_CN_REL_BNG", doubleToStringX(m_os_cn_rel_bng,1)); CN_OS_REL_BNG", doubleToStringX(m_cn_os_rel_bng,1)); BNG_RATE", doubleToStringX(m_bearing_rate,1)); OS_FORE_OF_CN: Boolean true if ownship is fore of contact OS_AFT_OF_CN: Boolean true if ownship is aft of contact OS_PORT_OF_CN: Boolean true if ownship is on port side of contact OS_STAR_OF_CN: Boolean true if ownship is on starboard side of contact CN_FORE_OF_OS: Boolean true if contact is fore of ownship CN_AFT_OF_OS: Boolean true if contact is aft of ownship CN_PORT_OF_OS: Boolean true if contact is on port side of ownship CN_STAR_OF_OS: Boolean true if contact is on starboard side of ownship Helm updates matching --------------------------------------------------- o An update to a spawned behavior, named foo_bar can be done with either "name=foo_bar" or, if it was a dynamically spawned behavior, with "name="bar" TODO - When a behavior is spawned, note that it is spawned (done), but also note the behavior basename, e.d., "foo_" and enforce that only "bar" will match "foo_bar", not "ar" for example Removed devel notes from src/ --------------------------------------------------- o Accidentally left devel note .txt files in ivp/src/ o Removed from 19.8 release aloghelm (life events) --------------------------------------------------- o Noticed that the logger sometimes records dual entries for the same IVPHELM_LIFE_EVENT posting. This causes aloghelm -l foo.alog to report multiple entries. Modified the helm to include an index field in the IVPHELM_LIFE_EVENT, "posting_index=1" In aloghelm, the adding an event to the LifeEventHistory may only be done if the new event is not equivalent to a previous event. The issue of why pLogger posts two entries for the same Notification should still be resolved. alogview ---------------------------------------------------- o Addressed a bug that could occur if the number of unique MOOS variable names is very large. Alogview, during this initial startup, splits the alog file into a directory of .klog files, one for each variable. During this split stage, the splitter creates a cache of open file pointers to speed the file I/O. Each OS has a max limit on open file pointers, and there may be some number of file pointers otherwise open in other apps. When alogview hits this limit, it may fail. A fix has been made to limit the file pointer cache to 100 elements. Further file pointers will be opened/closed for each write. This may slow the initial launch of alogview for alog files with many unique varnames. o alogview now has the ability to automatically start with the (a) background image, (b) zoom, and (c) pan x/y values used when starting with pMarineViewer. (See pMarineViewer also for a note on the addition to that app to support this feature). pMarineViewer posts the variable REGION_INFO which will be logged and read by alogview. Normally this variable is only published in the shoreside mission where pMarineViewer is running. Our recommendation is to bridge this variable to the vehicles as well so it will be in the vehicle log files. This way alogview will have this info if launched only with a vehicle alog file with no shoreside alog file. o Added support for AppLogging. Any AppCastingMOOSApp with app_logging enabled, can redirect its terminal output to APP_LOG postings. The terminal output can be viewed alongside playback in alogview. mtop.sh ------------------------------------------------------ o This script is a convenience script for launching top for monitoring MOOS apps. The primary launch mode (no args, will look for all Antler processes, and find all child processes. It may also be configured to run on only a given set of apps named by the caller. It can be found in moos-ivp/scripts (which needs to be in the user's shell path).