Exoskeleton controlled by a brain-machine interface