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 (240, 241, 242) is present in the cell; obtaining occupancy-related measurements using at least one measuring principle that includes sensing an incident electromagnetic wave at an elevated point on the robot, the measuring principle including RGB-D sensing and/or radar; assigning an occupancy probability on the basis of an obtained occupancy-related measurement at an angle of incidence; and controlling the industrial robot on the basis of the occupancy grid, wherein the assigning of the occupancy probability includes: - evaluating whether the measurement indicates that some physical object is present in the angle of incidence, - selecting a first predetermined model if the evaluation is positive and selecting a second predetermined model if the evaluation is negative, and - determining a new occupancy probability for cells in the angle of incidence on the basis of the measurement and in accordance with the selected model wherein - the second predetermined model stipulates that the new occupancy probability in cells in a solid angle of incidence shall be in a positive relation to a local vertical thickness of the solid angle, and/or - the first predetermined model stipulates that o the new occupancy probability in cells where the measurement indicates presence of some physical object shall be constant when the measuring principle includes RGB-D sensing; and/or o the new occupancy probability in cells where the measurement indicates presence of some physical object shall be in a negative relation to a noisiness of the radar signal when the measuring principle includes radar. 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 (240, 241, 242) is present in the cell; obtaining occupancy-related measurements using at least one measuring principle that includes sensing an incident electromagnetic wave at an elevated point on the robot, the measuring principle including RGB-D sensing and/or radar; assigning an occupancy probability on the basis of an obtained occupancy-related measurement at an angle of incidence; and controlling the industrial robot on the basis of the occupancy grid, wherein the assigning of the occupancy probability includes: - evaluating whether the measurement indicates that some physical object is present in the angle of incidence, - selecting a first predetermined model if the evaluation is positive and selecting a second predetermined model if the evaluation is negative, and - determining a new occupancy probability for cells in the angle of incidence on the basis of the measurement and in accordance with the selected model - evaluating whether the measurement indicates that some physical object is present in the angle of incidence, - selecting a first predetermined model if the evaluation is positive and selecting a second predetermined model if the evaluation is negative, and - determining a new occupancy probability for cells in the angle of incidence on the basis of the measurement and in accordance with the selected model wherein - the second predetermined model stipulates that the new occupancy probability in cells in a solid angle of incidence shall be in a positive relation to a local vertical thickness of the solid angle, and/or - the first predetermined model stipulates that o the new occupancy probability in cells where the measurement indicates presence of some physical object shall be constant when the measuring principle includes RGB-D sensing; and/or o the new occupancy probability in cells where the measurement indicates presence of some physical object shall be in a negative relation to a noisiness of the radar signal when the measuring principle includes radar. - the second predetermined model stipulates that the new occupancy probability in cells in a solid angle of incidence shall be in a positive relation to a local vertical thickness of the solid angle, and/or - the first predetermined model stipulates that o the new occupancy probability in cells where the measurement indicates presence of some physical object shall be constant when the measuring principle includes RGB-D sensing; and/or o the new occupancy probability in cells where the measurement indicates presence of some physical object shall be in a negative relation to a noisiness of the radar signal when the measuring principle includes radar. o the new occupancy probability in cells where the measurement indicates presence of some physical object shall be constant when the measuring principle includes RGB-D sensing; and/or o the new occupancy probability in cells where the measurement indicates presence of some physical object shall be in a negative relation to a noisiness of the radar signal when the measuring principle includes radar.