To be able to implement the rehabilitation scheme envisioned in this project, we needed to transfer the controller from simulation to the real robot. We chose to do this implementation using ROS, an open-source and community driven robot framework. With ROS, we can developrobot-agnostic applications which are modular and can be easily transferred to different typesof robots. This is important for the current project, as we are trying to develop a rehabilitationscheme that could be used with different types of manipulators.Within the ROS community, there are existing packages for working with the UR5. Startingfrom those, we developed our own controller using the ros_control package, which communicatesdirectly with the robot.
Since the internal controller of the robot is accepting joint velocities asinput, our Sliding Mode Controller was designed so that it outputs a velocity reference.We performed several tests, further tuning the controller to adjust for the differences betweensimulation and real robot, and we performed a validation test on a trajectory that is relevant forpossible rehabilitation tasks. The performance of the sliding mode controller in cooperation withthe internal controller of the robot showed remarkable results, following the desired trajectoryand being robust to external disturbances. This means that we are able to use it safely while performing rehabilitation tasks.