Canonical Graphs
try tab-completion in the REPL:
IncrementalInference.generateGraph_Kaess
— FunctiongenerateGraph_Kaess(; graphinit)
Canonical example from literature, Kaess, et al.: ISAM2, IJRR, 2011.
Notes
- Paper variable ordering: p = [:l1;:l2;:x1;:x2;:x3]
IncrementalInference.generateGraph_TestSymbolic
— FunctiongenerateGraph_TestSymbolic(; graphinit)
Canonical example introduced by Borglab.
Notes
- Known variable ordering: p = [:x1; :l3; :l1; :x5; :x2; :l2; :x4; :x3]
IncrementalInference.generateGraph_CaesarRing1D
— FunctiongenerateGraph_CaesarRing1D(; graphinit)
Canonical example introduced originally as Caesar Hex Example.
Notes
- Paper variable ordering: p = [:x0;:x2;:x4;:x6;:x1;:l1;:x5;:x3;]
IncrementalInference.generateGraph_LineStep
— FunctiongenerateGraph_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.
IncrementalInference.generateGraph_EuclidDistance
— FunctiongenerateGraph_EuclidDistance(; ...)
generateGraph_EuclidDistance(
points;
dist,
σ_prior,
σ_dist,
N,
graphinit
)
Generate a EuclidDistance test graph where 1 landmark position is unknown.
RoME.generateGraph_Circle
— FunctiongenerateGraph_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
RoME.generateGraph_ZeroPose
— FunctiongenerateGraph_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 typePose2
. - Use
priorArgs::Tuple
to override the default input arguments topriorType
. - Use callback
postpose_cb(g::AbstractDFG,lastpose::Symbol)
to call user operations after each pose step.
RoME.generateGraph_Hexagonal
— FunctiongenerateGraph_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!
RoME.generateGraph_Beehive!
— FunctiongenerateGraph_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
RoME.generateGraph_Helix2D!
— FunctiongenerateGraph_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 oft
,- See related wrapper functions for convenient generators of helix patterns in 2D,
- Real valued
xr_t(t)
andyr_t(t)
can be modified (and will override) complex valuedspine_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!
RoME.generateGraph_Helix2DSlew!
— FunctiongenerateGraph_Helix2DSlew!(; ...)
generateGraph_Helix2DSlew!(
numposes;
slew_x,
slew_y,
spine_t,
kwargs...
)
Generate canonical slewed helix graph (like a flattened slinky).
Notes
- Use
slew_x
andslew_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
RoME.generateGraph_Helix2DSpiral!
— FunctiongenerateGraph_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
andrate_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
<!– RoME.generateGraph_Honeycomb! –>