Navigation safety at sea is vital for each autonomous surface vehicle (ASV), which involves the problem of motion planning in dynamic environments and their robust tracking through feedback control. We present a practical path-planning method that generates smooth trajectories for a marine vehicle traveling in an unknown environment, where obstacles are detected in real time by millimetre wave (mmWave) radar. Our approach introduces a polynomial curve to describe the lateral and longitudinal trajectories in the Frenet frame, known as the ‘motion primitives’, whose combination ensures that the planning area is properly covered. In addition, we can select a feasible, optimal and collision-free trajectory from such a set of motion primitives that is generated by considering the vehicle dynamics and comfort. The capabilities of proposed algorithm are demonstrated in the experiment with static and dynamic obstacles.