In the paper, an approach to numerical integration of equations governing motion
of constrained mechanical systems is suggested. In the framework of this approach, unknown
reaction forces acting on the system are treated as controls, and the algebraic equations that
these reactions satisfy, as control goals. On the basis of the suggested approach, a technique for
numerical solving equations of rolling is developed. The discussion is illustrated by the example
of application of the algorithm to solving the problem of a heavy wheel with a pendulum (a
prototype of a ball-shaped robot) rolling along a curvilinear profile without slippage.