Address review comments

release/4.3a0
Frank dellaert 2020-08-21 11:01:08 -04:00
parent 30ee2b9409
commit 12d8ae2f5f
2 changed files with 4 additions and 5 deletions

View File

@ -5,11 +5,10 @@ def _init():
"""This function is to add shims for the long-gone Point2 and Point3 types"""
import numpy as np
import math
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."""
if isinstance(x, np.ndarray):
assert x.shape == (2,), "Point2 takes 2-vector"
@ -18,7 +17,7 @@ def _init():
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."""
if isinstance(x, np.ndarray):
assert x.shape == (3,), "Point3 takes 3-vector"

View File

@ -309,11 +309,11 @@ def plot_pose3(fignum, pose, axis_length=0.1, P=None,
def plot_trajectory(fignum, values, scale=1, marginals=None,
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:
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.
marginals (gtsam.Marginals): Marginalized probability values of the estimation.
Used to plot uncertainty bounds.