ALTactileGesture API¶
NAOqi Sensors & LEDs - Overview | API
Signals list¶
Methods¶
-
std::string
ALTactileGesture::
createGesture
(std::vector<std::string> sequence)¶ Create a tactile gesture.
Parameters: - sequence – Desired sequence of the tactile gesture.
Returns: The name of the gesture that’s associated with the sequence supplied. Throws RuntimeError if sequence is malformed.
-
std::vector<std::string>
ALTactileGesture::
getSequence
(std::string gestureName)¶ Get the sequence corresponding to the supplied gesture name.
Parameters: - gestureName – name of the gesture corresponding to the sequence
Returns: The sequence of the supplied gesture. Return None if gesture doesn’t exist.
-
std::string
ALTactileGesture::
getGesture
(std::vector<std::string> sequence)¶ Get the name of the gesture corresponding to the supplied sequence.
Parameters: - sequence – sequence corresponding to the gesture
Returns: The gesture name corresponding to the supplied sequence. None if the sequence doesn’t correspond to any gesture.
-
std::map<std::string, std::vector<std::string>>
ALTactileGesture::
getGestures
()¶ Get all gestures (including dynamically created gestures).
Returns: Dictionary (name: sequence) of all gestures
-
bool
ALTactileGesture::
setSettleTime
(float settleTime)¶ Change the settle time. See: ALTactileGesture.
Parameters: - settleTime – The desired settle time in seconds.
Returns: True on success, False otherwise. Throws RuntimeError if settleTime cannot be understood as a float.
-
bool
ALTactileGesture::
setHoldTime
(float holdTime)¶ Change the hold time. See: ALTactileGesture.
Parameters: - holdTime – The desired hold time in seconds.
Returns: True on success, False otherwise. Throws RuntimeError if holdTime cannot be understood as a float.
-
bool
ALTactileGesture::
setSequenceTime
(float sequenceTime)¶ Change the sequence time. See: ALTactileGesture.
Parameters: - sequenceTime – The desired sequence time in seconds.
Returns: True on success, False otherwise. Throws RuntimeError if sequenceTime cannot be understood as a float.
Signals¶
Signals are part of the qimessaging framework, see qimessaging-python.
-
ALTactileGesture::
onGesture
(std::String gestureName)¶ Triggered: When a valid tactile gesture has been detected.
Parameters: - gestureName – Name of the detected gesture.
-
ALTactileGesture::
onRelease
()¶ Triggered: When a tactile gesture has been released.
Events¶
-
Event:callback(std::string eventName, std::String gestureName, std::string subscriberIdentifier)¶
"ALTactileGesture/Gesture"
Raised when a valid tactile gesture has been detected
Parameters: - eventName (std::string) – “ALTactileGesture/Gesture”
- gestureName – Name of the detected gesture.
- subscriberIdentifier (std::string) –
-
Event:callback(std::string eventName, int gestureReleased, std::string subscriberIdentifier)¶
"ALTactileGesture/Release"
Raised when a valid tactile gesture has been released.
Parameters: - eventName (std::string) – “ALTactileGesture/Release”
- gestureReleased – State of release (as a integer boolean flag).
- subscriberIdentifier (std::string) –