Simox
2.3.74.0
|
Public Member Functions | |
EIGEN_MAKE_ALIGNED_OPERATOR_NEW | GazeIK (RobotNodeSetPtr rns, RobotNodePrismaticPtr virtualTranslationJoint) |
void | setup (float maxPosError, int maxLoops, int maxGradientDecentSteps) |
void | enableJointLimitAvoidance (bool enable) |
Eigen::VectorXf | computeStep (const Eigen::Vector3f &goal, float stepSize=0.6f) |
bool | solve (const Eigen::Vector3f &goal, float stepSize=0.6f) |
float | getMaxPosError () |
void | setVerbose (bool v) |
Protected Member Functions | |
void | setupIK () |
void | setJointsRandom () |
void | setJointsRandom (const Eigen::Vector3f &goal, int bestOfTries) |
bool | trySolve (const Eigen::Vector3f &goal, float stepSize) |
float | getCurrentError (const Eigen::Vector3f &goal) |
void | applyJLA (const Eigen::Vector3f &goal, int steps, float stepSize) |
bool | checkTolerances (const Eigen::Vector3f &goal) |
Protected Attributes | |
std::vector< RobotNodePtr > | nodes |
RobotNodeSetPtr | rns |
RobotNodePrismaticPtr | virtualTranslationJoint |
HierarchicalIKPtr | ikSolver |
DifferentialIKPtr | ikGaze |
JointLimitAvoidanceJacobiPtr | ikJointLimits |
bool | enableJLA |
int | maxLoops |
int | maxGradientDecentSteps |
float | maxPosError |
int | randomTriesToGetBestConfig |
bool | verbose |
A specialized IK solver for gaze related tasks. The gaze is represented by a virtual translational joint and the IK problem is solved by searching a solution for the head joints and the virtual gaze joint so that the position of the end point is at the requested gaze position. By default joint limit avoidance is considered as secondary task in order to generate more naturally looking configurations.
VirtualRobot::GazeIK::GazeIK | ( | RobotNodeSetPtr | rns, |
RobotNodePrismaticPtr | virtualTranslationJoint | ||
) |
Constructor
rns | The RobotNodeSet containing the neck (optionally a common eye tilt joint) and the virtual translational joint that represents the gaze. The TCP of the RNS is tried to position at the goal pose. |
virtualTranslationJoint | A prismatic joint (usually without any models and physics properties) that represents the gaze |
|
protected |
|
protected |
Eigen::VectorXf VirtualRobot::GazeIK::computeStep | ( | const Eigen::Vector3f & | goal, |
float | stepSize = 0.6f |
||
) |
Compute a gradient descent step.
goal | The goal position of the gaze in global coordinate system. |
stepSize | Can be used to limit the error step. |
void VirtualRobot::GazeIK::enableJointLimitAvoidance | ( | bool | enable | ) |
Joint Limit Avoidance is considered as secondary task.
enable | The joint limit avoidance can be enabled (standard) or disabled. |
|
protected |
float VirtualRobot::GazeIK::getMaxPosError | ( | ) |
|
protected |
|
protected |
void VirtualRobot::GazeIK::setup | ( | float | maxPosError, |
int | maxLoops, | ||
int | maxGradientDecentSteps | ||
) |
The standard setup can be changed with this method.
maxPosError | Specifies how exact the target should be reached (standard 5mm). |
maxLoops | Specifies how many seeds should be generate for starting a gradient descent search (standard 30) |
maxGradientDecentSteps | The maximum number of steps that should be taken to decent the gradient |
|
protected |
void VirtualRobot::GazeIK::setVerbose | ( | bool | v | ) |
bool VirtualRobot::GazeIK::solve | ( | const Eigen::Vector3f & | goal, |
float | stepSize = 0.6f |
||
) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |