nclt2ros/transformer/hokuyo_data.py
def read_next_hokuyo_4m_packet(self):
        """reads the hokuyo 4m packets from binary file

        :return: utime: time in microseconds
                     r: np array containing one observation
        """

        try:
            num_hits = 726

            utime_str = self.f_bin_hokuyo_4m.read(8)
            if utime_str == '':  # EOF reached
                return -1, None

            utime = struct.unpack('<Q', utime_str)[0]

            r = np.zeros(num_hits)
            for i in range(num_hits):
                s = struct.unpack('<H', self.f_bin_hokuyo_4m.read(2))[0]
                r[i] = self.convert_hokuyo(s)

            return utime, r

        except Exception as e:
            print(e)
reads the hokuyo 4m packets from binary file

        :return: utime: time in microseconds
                     r: np array containing one observation
        
reads the hokuyo 4m packets from binary file
reads the hokuyo 4m packets from binary file
def read_next_hokuyo_4m_packet(self):
        try:
            num_hits = 726
            utime_str = self.f_bin_hokuyo_4m.read(8)
            if utime_str == '':  
                return -1, None
            utime = struct.unpack('<Q', utime_str)[0]
            r = np.zeros(num_hits)
            for i in range(num_hits):
                s = struct.unpack('<H', self.f_bin_hokuyo_4m.read(2))[0]
                r[i] = self.convert_hokuyo(s)
            return utime, r
        except Exception as e:
            print(e)
def read_next_hokuyo_4m_packet ( self ) : try : num_hits = 726 utime_str = self . f_bin_hokuyo_4m . read ( 8 ) if utime_str == '' : return - 1 , None utime = struct . unpack ( '<Q' , utime_str ) [ 0 ] r = np . zeros ( num_hits ) for i in range ( num_hits ) : s = struct . unpack ( '<H' , self . f_bin_hokuyo_4m . read ( 2 ) ) [ 0 ] r [ i ] = self . convert_hokuyo ( s ) return utime , r except Exception as e : print ( e )
reads the hokuyo 4m packets from binary file
reads the hokuyo 4m packets from binary file
"""reads the hokuyo 4m packets from binary file

        :return: utime: time in microseconds
                     r: np array containing one observation
        """ # EOF reached
time in microseconds
r: np array containing one observation
time in microseconds r : np array containing one observation
self