This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef TIMER_H | |
#define TIMER_H | |
#include <ctime> | |
//link with rt (-lrt) | |
class timer { | |
public: | |
timer() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np,numpy.linalg | |
def _getAplus(A): | |
eigval, eigvec = np.linalg.eig(A) | |
Q = np.matrix(eigvec) | |
xdiag = np.matrix(np.diag(np.maximum(eigval, 0))) | |
return Q*xdiag*Q.T | |
def _getPs(A, W=None): | |
W05 = np.matrix(W**.5) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import inspect | |
import sys | |
import os | |
class DebugPrint(object): | |
def __init__(self, f): | |
self.f = f | |
def write(self, text): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as n | |
import scipy.interpolate | |
import scipy.ndimage | |
def congrid(a, newdims, method='linear', centre=False, minusone=False): | |
'''Arbitrary resampling of source array to new dimension sizes. | |
Currently only supports maintaining the same number of dimensions. | |
To use 1-D arrays, first promote them to shape (x,1). | |
Uses the same parameters and creates the same co-ordinate lookup points |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
rospkgs = sys.argv[1:] | |
import roslib | |
for rospkg in rospkgs: | |
roslib.load_manifest(rospkg) | |
paths = [path for path in sys.path if not path.startswith('/usr')] | |
#create a set to remove repetitions |
NewerOlder