The flow of complex fluids – polymers, emulsions, granular materials, bubbly liquids, foams – near a solid surface displays different behaviors depending on the surface properties, which makes the prediction of flow characteristics particularly challenging. Often, these systems exhibit a slippage on smooth surfaces whereas the materials deform and flow on rough surfaces. Therefore, to measure the bulk material properties, wall slippage must be avoided and asperities are commonly added on the measurement apparatus to suppress the interfacial dissipation. In the specific case of foams, a commonly adopted rule-of-thumb is to choose the size of the asperities larger than the bubble size. We combine direct visualizations and force measurements on the motion of a solid surface of controlled roughness in foams at different humidities. We observed that the foam flow near surfaces exhibits three distinct behaviors: slippage, stick-slip, and anchored regimes. Our study reveals a transition criterion between wall and bulk flow regimes that compares the roughness size to the size of the cross section of the liquid channels between the bubbles, which depends on the humidity of the foam and on the bubble radius. Also, we identified that this is interesting for edible foams as the given size of the papillae can lead to different mouthfeel according to the liquid/gas composition ratio or the bubble size. Edible foams are known to improve digestibility and to aid mastication, which is important for certain subjects.