Consider the practically relevant situation in which a robotic system is assigned a task to be executed in an environment that contains moving obstacles. Generating collision-free motions that allow the robot to execute the task while complying with its control input limitations is a challenging problem, whose solution must be sought in the robot state space extended with time. We describe a general planning framework which can be tailored to robots described by either kinematic or dynamic models. The main component is a control-based scheme for producing configuration space subtrajectories along which the task constraint is continuously satisfied. The geometric motion and time history along each subtrajectory are generated separately in order to guarantee feasibility of the latter and at the same time make the scheme intrinsically more flexible. A randomized algorithm then explores the search space by repeatedly invoking the motion generation scheme and checking the produced subtrajectories for collisions. The proposed framework is shown to provide a probabilistically complete planner both in the kinematic and the dynamic case. Modified versions of the planners based on the exploration–exploitation approach are also devised to improve search efficiency or optimize a performance criterion along the solution. We present results in various scenarios involving non-holonomic mobile robots and fixed-based manipulators to show the performance of the planner.