Robot-Aided Gait Assessment And Rehabilitation: An Assist-As-Needed Approach