def getPoints(self): shape = [] for th, d, _ in self.pattern.points_pol: shape.append([np.cos(th) * d, np.sin(th) * d, 1]) shape.append(shape[0]) return matrix_utils.tfPoints(np.array(shape), self.getFrame())
def getPoints(self): return mu.tfPoints(shape, self.getFrame())
def getPoints(self): return matrix_utils.tfPoints(robShape, self.frame)
def getPoints(self): tf = matrix_utils.rotation2d(self.lastReading[1]) @ matrix_utils.scale2d(self.lastReading[0], 0) return matrix_utils.tfPoints(cameraShape, self.parentFrame() @ tf)
def getPoints(self): tf = matrix_utils.translation2d(self.bX, self.bY) return matrix_utils.tfPoints(shape, tf)
def __init__(self, x, y): trans = matrix_utils.translation2d(x, y) self.points = matrix_utils.tfPoints(bshape, trans) self.color = (128, 255, 0)
def getPoints(self): return matrix_utils.tfPoints(shape, self.getFrame())
def __init__(self, x, y): trans = matrix_utils.translation2d(x, y) self.posn = np.array([x, y]) self.points = matrix_utils.tfPoints(bshape, trans) self.colorClass = np.random.random_integers(0, nClasses-1) self.color = colors[self.colorClass]
def setState(self, x, y, t): trans = matrix_utils.translation2d(x, y) rot = matrix_utils.rotation2d(t) scl = matrix_utils.scale2d(0.7, 0.7) self.points = matrix_utils.tfPoints(robot.robot_shape, trans @ rot @ scl)
def setOffscreen(self): trans = matrix_utils.translation2d(30, 30) self.points = matrix_utils.tfPoints(cameraPtShape, trans)
def setLocation(self, d, th, cFrame): trans = matrix_utils.translation2d(d, 0) rot = matrix_utils.rotation2d(th) self.points = matrix_utils.tfPoints(cameraPtShape, cFrame @ rot @ trans)
def getPoints(self): cov_truncated = np.copy(self.cov) cov_truncated[2] = np.array([0, 0, 1]) trans = matrix_utils.translation2d(self.mu[0], self.mu[1]) rot = matrix_utils.rotation2d(self.mu[2]) return matrix_utils.tfPoints(shape, trans @ cov_truncated @ rot)
def getPoints(self): trans = matrix_utils.translation2d(self.est[0], self.est[1]) covTf = np.block([[self.cov, np.zeros(1, 3)], [np.zeros(3, 1), [1]]]) return matrix_utils.tfPoints(featureShape, trans @ covTf)