Mobile robots are currently exploited in various applications to enhance efficiency and reduce risks in hard activities for humans. The high autonomy in those systems is strongly related to the path-planning task. The path-planning problem is complex and requires in its formulation the adjustment of path elements that take the mobile robot from a start point to a target one at the lowest cost. Nevertheless, the identity or the number of the path elements to be adjusted is unknown; therefore, the human decision is necessary to determine this information reducing autonomy. Due to the above, this work conceives the path-planning as a Variable-Length-Vector optimization problem (VLV-OP) where both the number of variables (path elements) and their values must be determined. For this, a novel variant of Differential Evolution for Variable-Length-Vector optimization named VLV-DE is proposed to handle the path-planning VLV-OP for mobile robots. VLV-DE uses a population with solution vectors of different sizes adapted through a normalization procedure to allow interactions and determine the alternatives that better fit the problem. The effectiveness of this proposal is shown through the solution of the path-planning problem in complex scenarios. The results are contrasted with the well-known A* and the RRT*-Smart path-planning methods.