示例#1
0
    def test_create_bag(self):
        try:
            launch = launchROS()
            time.sleep(3)
            img_converter("Test.mp4")
            create_bag()
            time.sleep(5)

        except:
            self.fail(" create_bag failed to create bag")
示例#2
0
 def test_create_bag(self):
     try:
         launch = launchROS()
         time.sleep(3)
         img_converter("Test.mp4")
         create_bag()
         time.sleep(5)
         
     except:
         self.fail(" create_bag failed to create bag")
示例#3
0
f = open('stored.mp4','wb')
s.listen(5)
while True:
	print 'waiting'
	c, addr = s.accept()
	print 'Connected to', addr
	f = open('stored.mp4','wb')
	packet = c.recv(1024)
	print 'receiving video ...'
	while(packet):
		f.write(packet)
		packet = c.recv(1024)
	f.close()
	print 'Video Received'
	print 'purge old images...'
	purge('images')
	img_converter('stored.mp4')
	check that ROS is running on the server
	print 'checking ROS...'
	checkROS()
	time.sleep(20)
	create_bag()
	play_bag() 
	print 'making stl' 
	#time.sleep(60)
	buffer = "Read buffer:\n"
	buffer += open('Nuke-Cola.SLDASM', 'rU').read()
	print 'sending stl man'	
	c.sendall(buffer)	
	c.close()