A controller for a motion assisting apparatus for a wearer includes circuitry. The circuitry is configured to set switching points in a change in a turning angle of a drive mechanism driven by a drive motor and attached to an ankle joint of the wearer to assist a turning motion of the ankle joint, a ratio of the change in the turning angle being equal to zero at the switching points. The circuitry is configured to set a motion pattern such that the turning angle monotonically increases or monotonically decreases between the switching points. The circuitry is configured to control the drive motor to change the turning angle according to the motion pattern.