コード例 #1
0
ファイル: keyboard.py プロジェクト: anujgtm1/Minor-SLAM
                        if flag == True:
				xycor = np.append(xycor,np.array(corner3),axis=0)
                [flag1, corner4] = corner.corner(a.m[0],a.c[0],a.m[len(a.m)-1],a.c[len(a.m)-1])
                if flag1 == True:
                    xycor = np.append(xycor,np.array(corner4),axis=0)
                #xycor = np.append(xycor,np.array(corner4),axis=0)
		xycor = np.append(xycor,[xycor[0]],axis=0)

        elif char == ord('r'):
            a.reset()

        elif char == ord('p'):
            a.plot()
            
        elif char == ord('k'):
            pt.plotArray(xycor)

        elif char == ord('s'):
            np.savetxt('test.txt', a.Map, delimiter=',') 

        elif char == curses.KEY_RIGHT:
            # print doesn't work with curses, use addstr instead
            screen.addstr(0, 0, 'right')
            a.right()

        elif char == curses.KEY_LEFT:
            screen.addstr(0, 0, 'left')
            a.left()
            m,c = line.inter(a.Batch)
            d = line.perp(m, c, a.Pos[0][0], a.Pos[0][1])
            pf.duichoti()
コード例 #2
0
ファイル: plottest.py プロジェクト: anujgtm1/Minor-SLAM
import numpy as np
import toCart
import plot as pt
import Outlier as oo
import Sparser as SS
x = np.array([[  15.,109.],[  20. , 109.], [  25. , 105.],[  30. , 107.], [  35. , 105.], [  40. , 106.], [  45. , 102.], [  50. , 104.], [  55. , 102.], [  60.  ,101.] ,[  65.  ,100.],[  70.  ,114.],[  75. ,  99.],[  80.,   98.],[  85.  , 96.],[  90. ,  97.],[  95. ,  94.],[ 100.,  110.],[ 105.  , 91.],[ 110. ,  94.],[ 115.  , 94.],[ 120.  , 91.],[ 125.  , 93.],[ 130. ,  91.],[ 135.  , 89.],[ 140.  , 89.],[ 145. , 111.],[ 150.,  101.],[ 155.,   90.],[ 160.,   95.],[ 165. , 110.] ,[ 170.   ,92.],[ 165. ,  91.] ,[ 160.   ,90.], [ 155. ,  90.], [ 150. ,  91.], [ 145. , 110.], [ 140. ,  89.], [ 135. ,  92.], [ 130.,  109.], [ 125.  , 90.],[ 120.,   91.] ,[ 115.,   90.],[ 110.   ,91.],[ 105. , 112.],[ 100. ,  96.],[  95.  , 91.],[  90. , 110.] ,[  85.   ,93.],[  80.  , 93.] ,[  75. ,  93.],[  70. ,  94.], [  65. , 115.], [  60.  , 95.], [  55. ,  96.], [  50. ,  97.], [  45. ,  97.], [  40. ,  99.], [  35. , 100.], [  30. , 101.], [  25. , 118.], [  20. , 102.]],dtype = float)
toCart.toCartesian(x)

#SS.sparse(x,10)
#oo.clearOutlier(x,1,2,4)
pt.plotArray(x)
コード例 #3
0
ファイル: Bot.py プロジェクト: anujgtm1/Minor-SLAM
	def plot(self):
		#plot the map
		pt.plotArray(self.Map)
		return
コード例 #4
0
ファイル: plottest.py プロジェクト: anujgtm1/Minor-SLAM
import numpy as np
import toCart
import plot as pt
import Outlier as oo
import iqd 
import Sparser as SS
import RANSAC as rr
import time
x = np.array([[  15.,109.],[  20. , 109.], [  25. , 105.],[  30. , 107.], [  35. , 105.], [  40. , 106.], [  45. , 102.], [  50. , 104.], [  55. , 102.], [  60.  ,101.] ,[  65.  ,100.],[  70.  ,114.],[  75. ,  99.],[  80.,   98.],[  85.  , 96.],[  90. ,  97.],[  95. ,  94.],[ 100.,  110.],[ 105.  , 91.],[ 110. ,  94.],[ 115.  , 94.],[ 120.  , 91.],[ 125.  , 93.],[ 130. ,  91.],[ 135.  , 89.],[ 140.  , 89.],[ 145. , 111.],[ 150.,  101.],[ 155.,   90.],[ 160.,   95.],[ 165. , 110.] ,[ 170.   ,92.],[ 165. ,  91.] ,[ 160.   ,90.], [ 155. ,  90.], [ 150. ,  91.], [ 145. , 110.], [ 140. ,  89.], [ 135. ,  92.], [ 130.,  109.], [ 125.  , 90.],[ 120.,   91.] ,[ 115.,   90.],[ 110.   ,91.],[ 105. , 112.],[ 100. ,  96.],[  95.  , 91.],[  90. , 110.] ,[  85.   ,93.],[  80.  , 93.] ,[  75. ,  93.],[  70. ,  94.], [  65. , 115.], [  60.  , 95.], [  55. ,  96.], [  50. ,  97.], [  45. ,  97.], [  40. ,  99.], [  35. , 100.], [  30. , 101.], [  25. , 118.], [  20. , 102.]],dtype = float)
toCart.toCartesian(x)
#k = rr.nice(x)
#x = SS.sparse(x,20)
#oo.clearOutlier(x,1,2,4)
k = iqd.outlierRemoval(x,1)
pt.plotArray(k)
#pt.plotArray(x)