Home Questions How do I create a Cursor-in-Target or VCODE-in-Target block, analogous to the KINARMHandInTarget block?

How do I create a Cursor-in-Target or VCODE-in-Target block, analogous to the KINARMHandInTarget block?

DWQA QuestionsCategory: Custom Task DevelopmentHow do I create a Cursor-in-Target or VCODE-in-Target block, analogous to the KINARMHandInTarget block?
Ian Brown Staff asked 8 years ago
I want to know if an object is inside one of the targets in the target table. The functionality I am looking for is similar to the existing KINARMHandInTarget block from the TDK. For example, if I were to be showing the subject an object that is controlled by some other input (e.g. gaze, an analog signal, or a transformed version of the robot position), how do I know if that object is in one of the object of the Target Table?
1 Answers
Ian Brown Staff answered 8 years ago
Custom code like this can be created by unlinking the KINARMHandInTarget block from the TDK and modifying the underlying code. An example of this can be found in the Visuomotor rotation task, which is one of the sample tasks in our Sample Custom Task forum in which the hand feedback is transformed from the true position to a rotated position. Another example can be found in the Bimanual task which includes a hand feedback object that is the mean of the two hand/finger-tip positions. Please download either of these tasks and look at the code.