webots
                                
                                 webots copied to clipboard
                                
                                    webots copied to clipboard
                            
                            
                            
                        Occuppied or empty
How can I check if position (x, y, z) is occupied or empty in webots?
I'm not sure if it's the best way to do it, but you can place a little sphere where your need to check for occupation, and make it a TouchSensor (a bumper). When it will be in a part, it will trigger ON. However it work only with bounding object, AFAIK, so that might not be the most efficient way to do it. Moreover if you need to check multiple places at once, having many Sensor could cause performance issue, idk...
I have imported OSM map with the importer and it imported buildings as the SimpleBuilding object. Also, if I place the little sphere in this SimpleBuilding object it does not detect it. Even if I try to set the lidar sensor it detects only from outside. From inside it does not detect SimpleBuilding object even if the rays of the lidar intersects the corners of the SimpleBuildings. Also, I have tried to place a big sphere and added a touch sensor, it detects the SimpleBuilding object only when the center of this sphere is outside.
Could you please share a world with one sphere (the size you like), plus only one SimpleBuilding (not a full OSM map), that show the behavior you describe.
Also Touch sensor can be a bit tricky to use, depending on the Shape of the bounding object...
I don't understand why you speak about Lidar. Could you elaborate ?