ALRobotPosture API

Overview | API


Namespace : AL

#include <alproxies/alrobotpostureproxy.h>

Methods

std::vector<std::string> ALRobotPosture::getPostureList()

Returns a vector with all predefined postures.

Returns:A vector with all predefined postures.
bool ALRobotPosture::goToPosture(const std::string postureName, const float speed)

Makes the robot go to the predefined posture asked in parameter. It is possible to modify the speed of the move. The move is “intelligent”: it will start from beginning posture of the robot, and choose all the steps to reach the asked posture.

This is a blocking call. Use a post if you want to make it non-blocking.

Parameters:
  • postureName – Name of the predefined posture to be reached. See: Predefined postures.
  • speed – Relative speed between 0.0 and 1.0.
Returns:

Returns if the predefined posture was reached.

bool ALRobotPosture::applyPosture(const std::string& postureName, const float& speed)

Set all the joints of the robot in the configuration of the asked predefined posture.

Use applyPosture for animation purposes when manipulating the robot. Consider it has a shortcut, in case you want to reach quickly a posture. The robot will need user’s help to reach the posture.

The effect is immediate and there is no intelligence in it so be careful when using set posture. For example if the robot is sitting and you ask for setPosture(“StandInit”, 1.0) it can be dangerous for the robot, it will fall if you do not help it to stand up.

If you want the robot to stand up alone, use ALRobotPosture::goToPosture().

This is a blocking call. Please use a post if you want to make it non-blocking.

Parameters:
  • postureName – Name of the predefined posture to be reached. See: Predefined postures.
  • speed – Relative speed between 0.0 and 1.0.
Returns:

Returns if the predefined posture was reached.

void ALRobotPosture::stopMove()

Stop the current posture interpolation.

std::string ALRobotPosture::getPostureFamily()

Returns the Posture family. For further details, see: Posture family.

Returns:Returns the name of the current posture family.
std::vector<std::string> ALRobotPosture::getPostureFamilyList()

Returns a vector with all predefined postures families.

Returns:A vector with all predefined postures families.
void ALRobotPosture::setMaxTryNumber(const int& maxTryNumber)

Sets the maximum number of tries performed by ALRobotPosture::goToPosture() before returning a fail.

Parameters:
  • maxTryNumber – number of tries, default value: 3.