A method of controlling an industrial robot, which is movable on a substrate, comprising: initializing an occupancy grid of cells which each represents a portion of the substrate and is associated with an occupancy probability that some physical object is present in the cell; obtaining an elevation map and a chromaticity map of the substrate; computing, on the basis of the elevation map, a mean elevation of each cell and deriving a first partial occupancy probability, wherein a relatively higher value of the first partial occupancy probability corresponds to a relatively greater mean elevation and a relatively lower value of the first partial occupancy probability corresponds to a relatively smaller mean elevation; on the basis of the chromaticity map, - estimating a distribution of the chromaticity, - identifying dominant chromaticity values, and - computing, on the basis of a chromaticity of each cell, a second partial occupancy probability, wherein a relatively lower value of the second partial occupancy probability is assigned to the cell if its chromaticity is one of the dominant chromaticity values and a relatively higher value of the second partial occupancy probability is assigned to the cell if its chromaticity is not one of the dominant chromaticity values; merging, for each cell, the first and second partial occupancy probabilities into an occupancy probability for the cell; and controlling the industrial robot on the basis of the occupancy grid. initializing an occupancy grid of cells which each represents a portion of the substrate and is associated with an occupancy probability that some physical object is present in the cell; obtaining an elevation map and a chromaticity map of the substrate; computing, on the basis of the elevation map, a mean elevation of each cell and deriving a first partial occupancy probability, wherein a relatively higher value of the first partial occupancy probability corresponds to a relatively greater mean elevation and a relatively lower value of the first partial occupancy probability corresponds to a relatively smaller mean elevation; on the basis of the chromaticity map, - estimating a distribution of the chromaticity, - identifying dominant chromaticity values, and - computing, on the basis of a chromaticity of each cell, a second partial occupancy probability, wherein a relatively lower value of the second partial occupancy probability is assigned to the cell if its chromaticity is one of the dominant chromaticity values and a relatively higher value of the second partial occupancy probability is assigned to the cell if its chromaticity is not one of the dominant chromaticity values; - estimating a distribution of the chromaticity, - identifying dominant chromaticity values, and - computing, on the basis of a chromaticity of each cell, a second partial occupancy probability, wherein a relatively lower value of the second partial occupancy probability is assigned to the cell if its chromaticity is one of the dominant chromaticity values and a relatively higher value of the second partial occupancy probability is assigned to the cell if its chromaticity is not one of the dominant chromaticity values; merging, for each cell, the first and second partial occupancy probabilities into an occupancy probability for the cell; and controlling the industrial robot on the basis of the occupancy grid.