A device for controlling a robotic system for assisting the mobility of a user, said robotic system comprising at least one active mobility assistance element capable of assisting a given mobility action of the user, characterized in that the device comprises a detection system capable of detecting a compensatory movement of the user associated with the mobility action, said compensatory movement being a movement made by a user who is disabled, or able-bodied but locally and/or temporarily constrained, in order to perform at least part of the mobility action, and which at least partially substitutes the normal movement an unconstrained, able-bodied user would make in order to perform this mobility action, and a control system capable of controlling the at least one active element when the compensatory movement is detected.