Canonical Graphs

try tab-completion in the REPL:

IncrementalInference.generateGraph_LineStepFunction
generateGraph_LineStep(
    lineLength;
    poseEvery,
    landmarkEvery,
    posePriorsAt,
    landmarkPriorsAt,
    sightDistance,
    vardims,
    noisy,
    graphinit,
    σ_pose_prior,
    σ_lm_prior,
    σ_pose_pose,
    σ_pose_lm,
    solverParams
)

Continuous, linear scalar and multivariate test graph generation. Follows a line with the pose id equal to the ground truth.

source
RoME.generateGraph_CircleFunction
generateGraph_Circle(; ...)
generateGraph_Circle(
    poses;
    fg,
    offsetPoses,
    autoinit,
    graphinit,
    landmark,
    loopClosure,
    stopEarly,
    biasTurn,
    kappaOdo,
    cyclePoses
)

Generate a canonical factor graph: driving in a circular pattern with one landmark.

Notes

  • Poses, :x0, :x1,... Pose2,
  • Odometry, :x0x1f1, etc., Pose2Pose2 (Gaussian)
  • OPTIONAL: 1 Landmark, :l1, Point2,
  • 2 Sightings, :x0l1f1, :x6l1f1, RangeBearing (Gaussian)

Example

using RoME

fg = generateGraph_Hexagonal()
drawGraph(fg, show=true)

DevNotes

  • TODO refactor to use new calcHelix_T.

Related

generateGraph_Circle, generateGraph_Kaess, generateGraph_TwoPoseOdo

source
RoME.generateGraph_ZeroPoseFunction
generateGraph_ZeroPose(
;
    varType,
    graphinit,
    solverParams,
    dfg,
    doRef,
    useMsgLikelihoods,
    label,
    priorType,
    μ0,
    Σ0,
    priorArgs,
    solvable,
    variableTags,
    factorTags,
    postpose_cb
)

Generate a canonical factor graph with a Pose2 :x0 and MvNormal with covariance P0.

Notes

  • Use e.g. varType=Point2 to change from the default variable type Pose2.
  • Use priorArgs::Tuple to override the default input arguments to priorType.
  • Use callback postpose_cb(g::AbstractDFG,lastpose::Symbol) to call user operations after each pose step.
source
RoME.generateGraph_HexagonalFunction
generateGraph_Hexagonal(
;
    fg,
    landmark,
    loopClosure,
    N,
    autoinit,
    graphinit
)

Generate a canonical factor graph: driving in a hexagonal circular pattern with one landmark.

Notes

  • 7 Poses, :x0-:x6, Pose2,
  • 1 Landmark, :l1, Point2,
  • 6 Odometry, :x0x1f1, etc., Pose2Pose2 (Gaussian)
  • 2 Sightings, :x0l1f1, :x6l1f1, RangeBearing (Gaussian)

Example

using RoME

fg = generateGraph_Hexagonal()
drawGraph(fg, show=true)

Related

generateGraph_Circle, generateGraph_Kaess, generateGraph_TwoPoseOdo, generateGraph_Boxes2D!

source
RoME.generateGraph_Beehive!Function
generateGraph_Beehive!(; ...)
generateGraph_Beehive!(
    poseCountTarget;
    graphinit,
    dfg,
    useMsgLikelihoods,
    solvable,
    refKey,
    addLandmarks,
    landmarkSolvable,
    poseRegex,
    pose0,
    yaw0,
    μ0,
    postpose_cb,
    locality,
    atol
)

Pretend a bee is walking in a hive where each step (pose) follows one edge of an imaginary honeycomb lattice, and at after each step a new direction left or right is stochastically chosen and the process repeats.

Notes

  • The keyword locality=1 is a positive ::Real ∈ [0,∞) value, where higher numbers imply direction decisions are more sticky for multiple steps.
  • Use keyword callback function postpose_cb = (fg, lastpose) -> ... to hook in your own features right after each new pose step.

DevNotes

  • TODO rewrite as a recursive generator function instead.

See also: generateGraph_Honeycomb!, generateGraph_Hexagonal, generateGraph_ZeroPose

source
RoME.generateGraph_Helix2D!Function
generateGraph_Helix2D!(; ...)
generateGraph_Helix2D!(
    numposes;
    posesperturn,
    graphinit,
    useMsgLikelihoods,
    solverParams,
    dfg,
    radius,
    spine_t,
    xr_t,
    yr_t,
    poseRegex,
    μ0,
    refKey,
    Qd,
    postpose_cb
)

Generalized canonical graph generator function for helix patterns.

Notes

  • assumes poses are labeled according to r"x\d+"
  • Gradient (i.e. angle) calculations are on the order of 1e-8.
  • Use callback spine_t(t)::Complex to modify how the helix pattern is moved in x, y along the progression of t,
    • See related wrapper functions for convenient generators of helix patterns in 2D,
    • Real valued xr_t(t) and yr_t(t) can be modified (and will override) complex valued spine_t instead.
  • use postpose_cb = (fg_, lastestpose) -> ... for additional user features after each new pose
  • can be used to grow a graph with repeated calls, but keyword parameters are assumed identical between calls.

See also: generateGraph_Helix2DSlew!, generateGraph_Helix2DSpiral!, generateGraph_Beehive!

source
RoME.generateGraph_Helix2DSlew!Function
generateGraph_Helix2DSlew!(; ...)
generateGraph_Helix2DSlew!(
    numposes;
    slew_x,
    slew_y,
    spine_t,
    kwargs...
)

Generate canonical slewed helix graph (like a flattened slinky).

Notes

  • Use slew_x and slew_y to pull the "slinky" out in different directions at constant rate.
  • See generalized helix generator for more details.
  • Defaults are choosen to slew along x and have multple trajectory intersects between consecutive loops of the helix.

Related

generateGraph_Helix2D!, generateGraph_Helix2DSpiral!

source
RoME.generateGraph_Helix2DSpiral!Function
generateGraph_Helix2DSpiral!(; ...)
generateGraph_Helix2DSpiral!(
    numposes;
    rate_r,
    rate_a,
    spine_t,
    kwargs...
)

Generate canonical helix graph that expands along a spiral pattern, analogous flower petals.

Notes

  • This function wraps the complex spine_t(t) function to generate the spiral pattern.
    • rate_a and rate_r can be varied for different spiral behavior.
  • See generalized helix generator for more details.
  • Defaults are choosen to slewto have multple trajectory intersects between consecutive loops of the helix and do a decent job of moving around coverage area with a relative balance of encircled area sizes.

Related

generateGraph_Helix2D!, generateGraph_Helix2DSlew!

source

<!– RoME.generateGraph_Honeycomb! –>