Utilities –- Parts and Usage Overview

Modules for auxiliary functions used with the core informative sampling.

DataIO.jl

InformativeSamplingUtils.DataIO.GaussGroundTruthMethod

Produces ground-truth value(s) for a point or list of points. Accepts a single vector, a vector of vectors, or a matrix of column vectors.

Each probability distribution component is divided by its own peak height and the highest of all the peaks before being added into the total. This causes the entire ground truth map to have a max value of (about) 1.

source
InformativeSamplingUtils.DataIO.imgToMapMethod

Takes a matrix in the format created from an image, re-formats it, and returns a GridMap. Images view a matrix with its indexing top-down and left-right. GridMaps view a matrix with its indexing left-right and bottom-up.

Examples

using DelimitedFiles: readdlm

image = readdlm(file_name, ',')
bounds = (lower = [0.0, 0.0], upper = [1.0, 1.0])
map = imgToMap(image, bounds)
map = imgToMap(image) # or auto bounds
source
InformativeSamplingUtils.DataIO.produceMapMethod
produceMap(
    func,
    map::GridMaps.GridMap
) -> Union{GridMaps.GridMap{_A, _B, _C, Float64} where {_B, _C<:AbstractArray{_A, _B}}, GridMaps.GridMap{_A, N, _C, Float64} where {N, _C<:AbstractArray{_A, N}}} where _A

Generates a GridMap from a function for chosen bounds and dimensions. Can also pass in another GridMap in place of bounds and dims.

source
InformativeSamplingUtils.DataIO.produceMapsMethod
produceMaps(
    beliefModel::MultiQuantityGPs.MQGP,
    map::GridMaps.GridMap;
    quantity
) -> Tuple{Union{GridMaps.GridMap{_A, _B, _C, Float64} where {_B, _C<:AbstractArray{_A, _B}}, GridMaps.GridMap{_A, N, _C, Float64} where {N, _C<:AbstractArray{_A, N}}} where _A, Union{GridMaps.GridMap{_A, _B, _C, Float64} where {_B, _C<:AbstractArray{_A, _B}}, GridMaps.GridMap{_A, N, _C, Float64} where {N, _C<:AbstractArray{_A, N}}} where _A}

Generates belief and uncertainty GridMaps from a belief model for chosen bounds and dimensions. Can also pass in another GridMap in place of bounds and dims.

source
InformativeSamplingUtils.DataIO.saveMethod
save(
    mission,
    samples,
    beliefs,
    times;
    animation,
    sub_dir_name,
    file_name
) -> Union{Nothing, Plots.AnimatedGif}

A collection of methods for saving data from missions, metrics, and general julia objects.

source
InformativeSamplingUtils.DataIO.saveBeliefMapToPngFunction
saveBeliefMapToPng(beliefModel, occupancy) -> Any
saveBeliefMapToPng(beliefModel, occupancy, file_name) -> Any

This is really just to give something out to munch, so it needs to be an rgba png with the last channel as the amount.

source

Visualization.jl

InformativeSamplingUtils.Visualization.visualizeFunction
visualize(
    beliefModel::MultiQuantityGPs.MQGP,
    samples,
    occupancy;
    ...
) -> Any
visualize(
    beliefModel::MultiQuantityGPs.MQGP,
    samples,
    occupancy,
    new_loc;
    quantity
) -> Any

Method to show belief model values of mean and standard deviation and the sample locations that they were generated from. Shows two plots side-by-side.

source
InformativeSamplingUtils.Visualization.visualizeMethod
visualize(
    md,
    samples,
    beliefModel::MultiQuantityGPs.MQGP,
    sampleCost,
    new_loc;
    quantity
) -> Any

Main method to visualize the current state of a search. Generates all the other visuals through their respective methods and lays them out in a grid. Currently shows the belief model, the ground truth, and the obstacles.

Arguments pass through to the sub-methods that need them. res is the grid resolution when plotting continuous-valued functions and defaults to [0.01, 0.01].

If no ground truth is available, it is not plotted.

source

Metrics.jl