In this paper, we propose an algorithm for planning of 2D caging manipulation by robots and walls. Caging is a method to make an object inescapable from a closed region by rigid bodies. Previous studies use only robots for caging, while we use walls as well. In our previous study, we proposed a method to plan 2D caging manipulation of a circular object by circular robots and straight walls. We make some improvements to the previous planning method so that it can plan in a wide variety of environments.