Weakly electric fish have specialized sensory system to detect the electric field. They generate the electric field with the electric organ and sense the intensity change of the electric field with their electroreceptors. If there is a target object in the environment, the electric fish detect the distortion of electric field, caused by the target object. A set of sensor readings in the rostrocaudal line or the dorsoventral line provides the localization information of a target object as well as the object features such as the material and shape. We model the electrosensing mechanism of the weakly electric fish for possible application to the underwater robot. It will be shown how the electric pole distribution in electric organ affects the electrolocation mechanism. The agent can bend the tail for the body movement and a series of sensor readings in the temporal domain and spatial domain are observed. The temporal change with tail-bending movements can be used to estimate the accurate position of a target object. The relative slope with the bent tail is similar to the original relative slope when the fish body is in the neutral line. Regardless of the position, we can apply the same electrolocation rule. This study helps to develop the electrosensor system and the biomimetic sensory system can be applied to the underwater robotic fish.