In the recent years, wireless sensor networks (WSNs), have become essential part in a huge number of the modern applications. Researchers have developed a lot of work to improve their performance. But, practically WSNs still face with different kinds of obstacles those cause main challenges for their reliability. Therefore, finding an optimum obstacleavoiding route path for the WSNs is considered an important research problem. The present work introduces a new optimum routing algorithm based on the cluster-based method for the WSNs with obstacles. The proposed system uses the cluster-based method and the mobile sink to decrease the power consumptions and increase the lifetime of the WSNs. Besides, it uses the genetic algorithm to optimize the avoiding-obstacles routing path. Suggested system has been applied for a WSN used to communicate between a discoveryradiation robot and its operating system as a case of study. Simulation results for the tested WSN and their comparison with three other route algorithms have proved the effectiveness of the proposed novel method.