Touch pads on jibo's head - setting up an event listener

I’m wondering how I can listen for touch events on jibo’s head pads.
In the api, I see jibo.body.getTouchState().touch = true or false. I can setup a watcher on that value, though I’d rather listen for a jibo touch event.

The jibo.body.getTouchState().touch is fine for a conditional in a behaviour decorator, however, I’d like to interpret the user’s “tapping” on jibo’s head, and setup and event listener.

The other issue is how to test touch/head events - in the simulator docs, I don’t see anything about touch/head features, just touch/face.

Thanks for any pointers!

Using a watcher for getTouchState is the best way to accomplish what you are looking to do, there is not a way to do this via listening for a jibo touch event.

As for the simulator, Jibo’s head sensors are currently one of the few things that cannot be simulated but that will be part of the simulator in the future.

1 Like