コード例 #1
0
    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())
コード例 #2
0
ファイル: robot.py プロジェクト: lessthantrue/RobotProjects
 def getPoints(self):
     return mu.tfPoints(shape, self.getFrame())
コード例 #3
0
 def getPoints(self):
     return matrix_utils.tfPoints(robShape, self.frame)
コード例 #4
0
ファイル: sensor.py プロジェクト: lessthantrue/RobotProjects
 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)
コード例 #5
0
 def getPoints(self):
     tf = matrix_utils.translation2d(self.bX, self.bY)
     return matrix_utils.tfPoints(shape, tf)
コード例 #6
0
 def __init__(self, x, y):
     trans = matrix_utils.translation2d(x, y)
     self.points = matrix_utils.tfPoints(bshape, trans)
     self.color = (128, 255, 0)
コード例 #7
0
ファイル: sensor.py プロジェクト: lessthantrue/RobotProjects
 def getPoints(self):
     return matrix_utils.tfPoints(shape, self.getFrame())
コード例 #8
0
 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]
コード例 #9
0
 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)
コード例 #10
0
 def setOffscreen(self):
     trans = matrix_utils.translation2d(30, 30)
     self.points = matrix_utils.tfPoints(cameraPtShape, trans)
コード例 #11
0
 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)
コード例 #12
0
 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)
コード例 #13
0
 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)