Update CustomFactorExample.py with comments to explain typing

release/4.3a0
Clark Taylor 2023-09-01 14:18:45 -04:00 committed by GitHub
parent 8611aec3fb
commit 039f5cf711
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -15,7 +15,7 @@ from typing import List, Optional
import gtsam
import numpy as np
I = np.eye(1)
I = np.eye(1) # Creates a 1-element, 2D array
def simulate_car() -> List[float]:
@ -44,7 +44,7 @@ def error_gps(measurement: np.ndarray, this: gtsam.CustomFactor,
if jacobians is not None:
jacobians[0] = I
return error
return error # with input types this is a 1D np.ndarray
def error_odom(measurement: np.ndarray, this: gtsam.CustomFactor,