In many manufacturing processes, sensor agents specifically adapt to explore pipes and other constrained environments filled with fluid are usually needed for monitoring purposes. However, in some of these environments only miniaturized agents can be used. Furthermore, these agents might be kinetically passive, due to limited resources and size. Therefore, designing and using these agents can be difficult. One possible solution to this problem is to change the agents’ morphology, such that optimally shaped agents reach target destinations simply by passively moving through the fluid. Here, we propose an evolutionary scheme for evolving the agent’s morphology to reach a predefined desired point in a fluid environment. This scheme includes a genotype-phenotype mapping based on Lindenmayer-Systems, as well as custom reproduction operators, selection criterion, and fitness function. In order to allow the simulation of irregularly shaped bodies underwater, we develop a simulation framework based on the Robot Operating System and the Unmanned Underwater Vehicle package. We test the proposed method on a set of 10 target points in a pipe inspection scenario. Results show that the evolved agents reach the target points with a distance error smaller than 5% in the worst case, and a standard deviation of 1.1% over 10 repeated experiments.