Idle API¶
NAOqi Motion - Overview | API
Method list¶
-
class
ALMotionProxy
¶
ALMotionProxy::setIdlePostureEnabled
ALMotionProxy::getIdlePostureEnabled
ALMotionProxy::setBreathEnabled
ALMotionProxy::getBreathEnabled
ALMotionProxy::setBreathConfig
(deprecated)ALMotionProxy::getBreathConfig
(deprecated)
-
void
ALMotionProxy::
setIdlePostureEnabled
(const std::string& pChainName, const bool& pEnable)¶ Starts or stops idle posture control on a chain.
Parameters: - pChainName – The chain name {“Body”, “Legs”, “Arms”, “LArm”, “RArm” or “Head”}.
- pEnable – Activate or deactivate idle posture control on the desired Chain.
-
bool
ALMotionProxy::
getIdlePostureEnabled
(const std::string& pChainName)¶ Gets the status of idle posture control on a chain.
Parameters: - pChainName – The chain name {“Body”, “Legs”, “Arms”, “LArm”, “RArm” or “Head”}.
Returns: true if idle posture control is active on the chain, false otherwise.
-
void
ALMotionProxy::
setBreathEnabled
(const std::string& pChainName, const bool& pEnable)¶ Starts or stops breathing animation on a chain.
Parameters: - pChainName – The chain name {“Body”, “Legs”, “Arms”, “LArm”, “RArm” or “Head”}.
- pEnable – Activate or deactivate breathing animation on the desired Chain.
-
bool
ALMotionProxy::
getBreathEnabled
(const std::string& pChainName)¶ Gets the status of breathing animation on a chain.
Parameters: - pChainName – The chain name {“Body”, “Legs”, “Arms”, “LArm”, “RArm” or “Head”}.
Returns: true if breathing is started on the chain, false otherwise.
-
void
ALMotionProxy::
setBreathConfig
(const AL::ALValue& pConfig)¶ Deprecated since version 2.5: ALBackgroundMovement now configures the breathing animation automatically.
Configures the breathing animation.
Parameters: - pConfig – An ALValue of the form
[["Bpm", pBpm], ["Amplitude", pAmplitude]]
. pBpm is a float between 5 and 30 setting the breathing frequency in beats per minute. pAmplitude is a float between 0 and 1 setting the amplitude of the breathing animation. At high frequencies, only low amplitudes are allowed. Input amplitude may be clipped.
- pConfig – An ALValue of the form
-
AL::ALValue
ALMotionProxy::
getBreathConfig
()¶ Deprecated since version 2.5: ALBackgroundMovement now configures the breathing animation automatically.
This function gets the current breathing configuration.
Returns: An ALValue of the form [["Bpm", bpm], ["Amplitude", amplitude]]
. bpm is the breathing frequency in beats per minute. amplitude is the normalized amplitude of the breathing animation, between 0 and 1.