Skip to content

Instantly share code, notes, and snippets.

import matplotlib.pyplot as plt
import numpy as np
import time
def twod(xs, xf, cb, overlay_polytope = False, show_box = False):
pts = []
for i in range(10000):
x = (np.random.rand(2)-0.5) * 10
import filterpy
from filterpy import kalman
import numpy as np
def fx(x, dt):
# state transition function - predict next state based
# on constant velocity model x = vt + x_0
F = np.array([[1.]], dtype=np.float32)
return np.dot(F, x)