Interaction of a granular stream with an obstacle