Skip to content

Instantly share code, notes, and snippets.

View bdholt1's full-sized avatar

Brian Holt bdholt1

View GitHub Profile
@bdholt1
bdholt1 / robotics_path_planning.py
Created September 5, 2017 13:02
Path planning using A*
# -----------
# User Instructions
#
# Familiarize yourself with the code below. Most of it
# reproduces results that you have obtained at some
# point in this class. Once you understand the code,
# write a function, cte, in the run class that
# computes the crosstrack
# error for the case of a segmented path. You will
# need to include the equations shown in the video.
@bdholt1
bdholt1 / anneal.py
Created September 5, 2017 12:57
Simulated Annealing solution to the travelling salesman problem
import random
import copy
import numpy as np
class City():
def __init__(self, x, y):
self.x_ = x
self.y_ = y
@bdholt1
bdholt1 / test_mmap.py
Created September 11, 2012 07:49
Test for memory mapping
import numpy as np
from sklearn.tree import DecisionTreeRegressor
from sklearn.ensemble import ExtraTreesRegressor
from sklearn import datasets
from sklearn.externals import joblib
from sklearn.externals.joblib import Parallel, delayed, cpu_count
@bdholt1
bdholt1 / camera.py
Created August 14, 2012 10:18
Camera class
import numpy as np
from scipy import linalg
def RawDepthToMeters(depthValue):
"""
Convert a kinect depth value to meters
"""
if (depthValue < 2047):
return float(1.0 / (float(depthValue) * -0.0030711016 + 3.3309495161))