Address review comments
parent
30ee2b9409
commit
12d8ae2f5f
|
@ -5,11 +5,10 @@ def _init():
|
||||||
"""This function is to add shims for the long-gone Point2 and Point3 types"""
|
"""This function is to add shims for the long-gone Point2 and Point3 types"""
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import math
|
|
||||||
|
|
||||||
global Point2 # export function
|
global Point2 # export function
|
||||||
|
|
||||||
def Point2(x=math.nan, y=math.nan):
|
def Point2(x=np.nan, y=np.nan):
|
||||||
"""Shim for the deleted Point2 type."""
|
"""Shim for the deleted Point2 type."""
|
||||||
if isinstance(x, np.ndarray):
|
if isinstance(x, np.ndarray):
|
||||||
assert x.shape == (2,), "Point2 takes 2-vector"
|
assert x.shape == (2,), "Point2 takes 2-vector"
|
||||||
|
@ -18,7 +17,7 @@ def _init():
|
||||||
|
|
||||||
global Point3 # export function
|
global Point3 # export function
|
||||||
|
|
||||||
def Point3(x=math.nan, y=math.nan, z=math.nan):
|
def Point3(x=np.nan, y=np.nan, z=np.nan):
|
||||||
"""Shim for the deleted Point3 type."""
|
"""Shim for the deleted Point3 type."""
|
||||||
if isinstance(x, np.ndarray):
|
if isinstance(x, np.ndarray):
|
||||||
assert x.shape == (3,), "Point3 takes 3-vector"
|
assert x.shape == (3,), "Point3 takes 3-vector"
|
||||||
|
|
|
@ -309,11 +309,11 @@ def plot_pose3(fignum, pose, axis_length=0.1, P=None,
|
||||||
def plot_trajectory(fignum, values, scale=1, marginals=None,
|
def plot_trajectory(fignum, values, scale=1, marginals=None,
|
||||||
title="Plot Trajectory", axis_labels=('X axis', 'Y axis', 'Z axis')):
|
title="Plot Trajectory", axis_labels=('X axis', 'Y axis', 'Z axis')):
|
||||||
"""
|
"""
|
||||||
Plot a complete 3D trajectory using poses in `values`.
|
Plot a complete 2D/3D trajectory using poses in `values`.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
fignum (int): Integer representing the figure number to use for plotting.
|
fignum (int): Integer representing the figure number to use for plotting.
|
||||||
values (gtsam.Values): Values dict containing the poses.
|
values (gtsam.Values): Values containing some Pose2 and/or Pose3 values.
|
||||||
scale (float): Value to scale the poses by.
|
scale (float): Value to scale the poses by.
|
||||||
marginals (gtsam.Marginals): Marginalized probability values of the estimation.
|
marginals (gtsam.Marginals): Marginalized probability values of the estimation.
|
||||||
Used to plot uncertainty bounds.
|
Used to plot uncertainty bounds.
|
||||||
|
|
Loading…
Reference in New Issue