Autonomous robots have been actively involved in visible and invisible aspects of our daily lives for several years. These robots can perform various tasks and roles in different locations, such as functioning as waiters in restaurants, serving as housekeepers in hotels, or transporting goods as attendants in warehouses. Autonomous robots rely on local planners to navigate in their environment. However , selecting the most suitable local planner for a given task can be a challenge. Despite extensive research in areas such as autonomous navigation, human-robot interaction, and robot localization, there has been no study to determine the optimal local planner for the given environments. In this study, we propose a machine learning solution that, for the first time in the literature, selects the optimal local planner before initiating navigation. Our approach involves using environmental metrics as inputs for a machine learning model, with the output being the name of the local planner. To create a dataset, 1280 tests were conducted within a simulation environment. The results demonstrate that the proposed solution achieves a success rate of up to 91% has been achieved in recommending the appropriate local planners based on the desired criteria.