This task demonstrates how to move the subject’s arm smoothly while using the Position Controller block. It will move the subject’s arm alternatively between 4 target locations.
Forces/torques will be commanded to the Kinarm as soon as the task starts, and will continue throughout the entire task (i.e. the Position Controller is always on). There is a different sample task “Position controller enable/disable” which demonstrates how to turn the Position Controller on/off smoothly within a trial, for tasks that need to alternate between free movement and positioning the arm.
In the Trajectory subsystem/Create_Trajectory subsystem, a bell-shaped velocity profile is calculated between where the hand was at the start of the trial and the destination target. Using Stateflow, the virtual trajectory is sent point by point to the Position Controller block to create a smooth motion.
This task works on both Endpoint and Exoskeleton Kinarm labs.
Compiled for Dexterit-E 3.7, MATLAB 2013a.