CyberGlove Integration

Discussion in 'HAPTIX' started by Janell, Dec 2, 2016.

  1. How do I integrate CyberGlove control into the bake-off tasks? Can you provide an example as to how this is done? I have written a short calibration code and can get the model to move when I move my hand in a non-task environment. When I try to pull CyberGlove data into task 1.1 nothing happens. I have it set up so that calibration takes place at the start of the task. Once the task starts the hand moves to position based on the calibration, I am assuming, and then doesn't move again no matter how I move my hand.
  2. Emo Todorov

    Emo Todorov Administrator Staff Member

    The bake-off tasks are written in such a way that the experiment control script and the control signal generation are independent. In the script, there is the function UserUpdate which is supposed to return a 6-by-1 vector of joint velocities, which then become the control signals sent to the simulator. What you do in UserUpdate and how you generate those 6 numbers is entirely up to you. In this case, you should call whatever code you use to obtain CyberGlove data and convert it to desired joint velocities.

    Note that in some phases of the bake off tasks, the hand model is paused or reset automatically, and you cannot change this behavior from within UserUpdate. But I don't think this is the problem you are facing... unless your CyberGlove code assumes that UserUpdate will be called all the time at a fixed rate! This is not necessarily the case. So when reading the CyberGlove, make sure you always get the latest data even if UserUpdate was not called for a while.