The main goal of this paper is developing the method of discrete approximations to derive necessary optimality conditions for a class of constrained sweeping processes with nonsmooth perturbations. Optimal control problems for sweeping processes have been recently recognized among the most interesting and challenging problems in modern control theory for discontinuous differential inclusions with irregular dynamics and implicit state constrained, while deriving necessary optimality conditions for their local minimizers have been significantly based on the smoothness of controlled dynamic perturbations. To overcome these difficulties, we use the method of discrete approximations and employ advanced tools of second-order variational analysis. This approach allows us to obtain new necessary optimality conditions for nonsmooth and nonconvex discrete-time problems of the sweeping type. Then we employ the obtained conditions and the strong convergence of discrete approximations to establish novel results for original nonsmooth sweeping control problems that include extended Euler-Lagrange and maximization conditions for local minimizers. Finally, we present applications of the obtained results to solving a controlled mobile robot model with a nonsmooth sweeping dynamics that is of some practical interest.