Update CustomFactorExample.py with comments to explain typing

release/4.3a0
Clark Taylor 2023-09-01 14:18:45 -04:00 提交者 GitHub
父节点 8611aec3fb
当前提交 039f5cf711
找不到此签名对应的密钥
GPG 密钥 ID: 4AEE18F83AFDEB23
共有 1 个文件被更改,包括 2 次插入2 次删除

查看文件

@ -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,