nclt2ros/extractor/extract.py
def extract_data(self):
        """extracts the data from tar.gz format
        """

        # check hokuyo_data
        if self.hokuyo:
            if os.path.exists(self.hokuyo_data_dir):
                os.chdir(self.hokuyo_data_dir)
                files = os.listdir(self.hokuyo_data_dir)
                if not (self.date in files):
                    for file in files:
                        if file.endswith('tar.gz'):
                            rospy.loginfo("unpacking {}".format(file))
                            tar = tarfile.open(file, 'r:gz')
                            tar.extractall()
                            tar.close()
                            # remove tar.gz file
                            os.remove(file)
                else:
                    rospy.loginfo("hokuyo_data already exists")

        # check sensor_data
        if self.sen:
            if os.path.exists(self.sensor_data_dir):
                os.chdir(self.sensor_data_dir)
                files = os.listdir(self.sensor_data_dir)
                if not (self.date in files):
                    for file in files:
                        if file.endswith('tar.gz'):
                            rospy.loginfo("unpacking {}".format(file))
                            tar = tarfile.open(file, 'r:gz')
                            tar.extractall()
                            tar.close()
                            # remove tar.gz file
                            os.remove(file)

                else:
                    rospy.loginfo("sensor_data already exists")

        # check velodyne_data
        if self.vel:
            if os.path.exists(self.velodyne_data_dir):
                os.chdir(self.velodyne_data_dir)
                files = os.listdir(self.velodyne_data_dir)
                if not (self.date in files):
                    for file in files:
                        if file.endswith('tar.gz'):
                            rospy.loginfo("unpacking {}".format(file))
                            tar = tarfile.open(file, 'r:gz')
                            tar.extractall()
                            tar.close()
                            # remove tar.gz file
                            os.remove(file)
                else:
                    rospy.loginfo("velodyne_data already exists")

        # check image_data
        if self.lb3:
            if os.path.exists(self.images_dir):
                os.chdir(self.images_dir)
                files = os.listdir(self.images_dir)
                if not (self.date in files):
                    for file in files:
                        if file.endswith('tar.gz'):
                            rospy.loginfo("unpacking {}".format(file))
                            tar = tarfile.open(file, 'r:gz')
                            tar.extractall()
                            tar.close()
                            # remove tar.gz file
                            os.remove(file)
                else:
                    rospy.loginfo("image_data already exists")
extracts the data from tar.gz format
        
extracts the data from tar.gz format
extracts the data from tar . gz format
def extract_data(self):
        if self.hokuyo:
            if os.path.exists(self.hokuyo_data_dir):
                os.chdir(self.hokuyo_data_dir)
                files = os.listdir(self.hokuyo_data_dir)
                if not (self.date in files):
                    for file in files:
                        if file.endswith('tar.gz'):
                            rospy.loginfo("unpacking {}".format(file))
                            tar = tarfile.open(file, 'r:gz')
                            tar.extractall()
                            tar.close()
                            os.remove(file)
                else:
                    rospy.loginfo("hokuyo_data already exists")
        if self.sen:
            if os.path.exists(self.sensor_data_dir):
                os.chdir(self.sensor_data_dir)
                files = os.listdir(self.sensor_data_dir)
                if not (self.date in files):
                    for file in files:
                        if file.endswith('tar.gz'):
                            rospy.loginfo("unpacking {}".format(file))
                            tar = tarfile.open(file, 'r:gz')
                            tar.extractall()
                            tar.close()
                            os.remove(file)
                else:
                    rospy.loginfo("sensor_data already exists")
        if self.vel:
            if os.path.exists(self.velodyne_data_dir):
                os.chdir(self.velodyne_data_dir)
                files = os.listdir(self.velodyne_data_dir)
                if not (self.date in files):
                    for file in files:
                        if file.endswith('tar.gz'):
                            rospy.loginfo("unpacking {}".format(file))
                            tar = tarfile.open(file, 'r:gz')
                            tar.extractall()
                            tar.close()
                            os.remove(file)
                else:
                    rospy.loginfo("velodyne_data already exists")
        if self.lb3:
            if os.path.exists(self.images_dir):
                os.chdir(self.images_dir)
                files = os.listdir(self.images_dir)
                if not (self.date in files):
                    for file in files:
                        if file.endswith('tar.gz'):
                            rospy.loginfo("unpacking {}".format(file))
                            tar = tarfile.open(file, 'r:gz')
                            tar.extractall()
                            tar.close()
                            os.remove(file)
                else:
                    rospy.loginfo("image_data already exists")
def extract_data ( self ) : if self . hokuyo : if os . path . exists ( self . hokuyo_data_dir ) : os . chdir ( self . hokuyo_data_dir ) files = os . listdir ( self . hokuyo_data_dir ) if not ( self . date in files ) : for file in files : if file . endswith ( 'tar.gz' ) : rospy . loginfo ( "unpacking {}" . format ( file ) ) tar = tarfile . open ( file , 'r:gz' ) tar . extractall ( ) tar . close ( ) os . remove ( file ) else : rospy . loginfo ( "hokuyo_data already exists" ) if self . sen : if os . path . exists ( self . sensor_data_dir ) : os . chdir ( self . sensor_data_dir ) files = os . listdir ( self . sensor_data_dir ) if not ( self . date in files ) : for file in files : if file . endswith ( 'tar.gz' ) : rospy . loginfo ( "unpacking {}" . format ( file ) ) tar = tarfile . open ( file , 'r:gz' ) tar . extractall ( ) tar . close ( ) os . remove ( file ) else : rospy . loginfo ( "sensor_data already exists" ) if self . vel : if os . path . exists ( self . velodyne_data_dir ) : os . chdir ( self . velodyne_data_dir ) files = os . listdir ( self . velodyne_data_dir ) if not ( self . date in files ) : for file in files : if file . endswith ( 'tar.gz' ) : rospy . loginfo ( "unpacking {}" . format ( file ) ) tar = tarfile . open ( file , 'r:gz' ) tar . extractall ( ) tar . close ( ) os . remove ( file ) else : rospy . loginfo ( "velodyne_data already exists" ) if self . lb3 : if os . path . exists ( self . images_dir ) : os . chdir ( self . images_dir ) files = os . listdir ( self . images_dir ) if not ( self . date in files ) : for file in files : if file . endswith ( 'tar.gz' ) : rospy . loginfo ( "unpacking {}" . format ( file ) ) tar = tarfile . open ( file , 'r:gz' ) tar . extractall ( ) tar . close ( ) os . remove ( file ) else : rospy . loginfo ( "image_data already exists" )
extracts the data from tar.gz format
extracts the data from tar . gz format
"""extracts the data from tar.gz format
        """ # check hokuyo_data # remove tar.gz file # check sensor_data # remove tar.gz file # check velodyne_data # remove tar.gz file # check image_data # remove tar.gz file
self