robot_localisation/grid.py
def pose_to_index(self, pose):
        """
        Translate a pose of type (x, y, Heading) to a numerical index that can
        be used with the transition matrix.

        E.g. pose_to_index((0,1,N)) = 5 where N is a Heading
        """
        # compute square_nbr as row-major on the grid, first grid is nbr 0
        cols = self.shape[1]
        x, y, h = pose
        square_nbr = x * cols + y
        return square_nbr * 4 + int(h)

        Translate a pose of type (x, y, Heading) to a numerical index that can
        be used with the transition matrix.

        E.g. pose_to_index((0,1,N)) = 5 where N is a Heading
        
Translate a pose of type (x, y, Heading) to a numerical index that can
be used with the transition matrix.


Translate a pose of type ( x y Heading ) to a numerical index that can be used with the transition matrix .
def pose_to_index(self, pose):
        cols = self.shape[1]
        x, y, h = pose
        square_nbr = x * cols + y
        return square_nbr * 4 + int(h)
def pose_to_index ( self , pose ) : cols = self . shape [ 1 ] x , y , h = pose square_nbr = x * cols + y return square_nbr * 4 + int ( h )
Translate a pose of type (x, y, Heading) to a numerical index that can
be used with the transition matrix.
Translate a pose of type ( x y Heading ) to a numerical index that can be used with the transition matrix .
"""
        Translate a pose of type (x, y, Heading) to a numerical index that can
        be used with the transition matrix.

        E.g. pose_to_index((0,1,N)) = 5 where N is a Heading
        """ # compute square_nbr as row-major on the grid, first grid is nbr 0
self
pose