Constraint to specify cartesian goal position (XYZ) More...
#include <goal_position.h>
Public Member Functions | |
virtual Eigen::VectorXd | calcError () |
Direction vector from current position to goal position Expressed in base coordinate system Each element is multiplied by corresponding element in weight_. | |
virtual Eigen::MatrixXd | calcJacobian () |
Jacobian is first three rows of standard jacobian (expressed in base frame). Equivalent to each axis of rotation crossed with vector from joint to chain tip. Each row is scaled by the corresponding element of weight_. | |
virtual bool | checkStatus () const |
Checks termination criteria Termination criteria for this constraint is that positional error is below threshold. | |
Eigen::Vector3d | getWeight () |
Getter for weight_. | |
GoalPosition () | |
virtual void | reset () |
Resets constraint. Use this before performing new IK request. | |
void | setWeight (const Eigen::Vector3d &weight) |
Setter for weight_. | |
virtual void | update (const SolverState &state) |
Update internal state of constraint (overrides constraint::update) Sets current positional error. | |
virtual | ~GoalPosition () |
Static Public Member Functions | |
static double | calcDistance (const Eigen::Affine3d &p1, const Eigen::Affine3d &p2) |
Calculates distance between two frames. | |
Protected Attributes | |
double | pos_err_ |
double | pos_err_tol_ |
Eigen::Vector3d | weight_ |
Constraint to specify cartesian goal position (XYZ)
Definition at line 33 of file goal_position.h.
Definition at line 31 of file goal_position.cpp.
virtual constrained_ik::constraints::GoalPosition::~GoalPosition | ( | ) | [inline, virtual] |
Definition at line 37 of file goal_position.h.
double constrained_ik::constraints::GoalPosition::calcDistance | ( | const Eigen::Affine3d & | p1, |
const Eigen::Affine3d & | p2 | ||
) | [static] |
Calculates distance between two frames.
p1 | Current frame |
p2 | Goal frame |
Definition at line 61 of file goal_position.cpp.
Eigen::VectorXd constrained_ik::constraints::GoalPosition::calcError | ( | ) | [virtual] |
Direction vector from current position to goal position Expressed in base coordinate system Each element is multiplied by corresponding element in weight_.
Implements constrained_ik::Constraint.
Reimplemented in constrained_ik::constraints::ToolPosition.
Definition at line 35 of file goal_position.cpp.
Eigen::MatrixXd constrained_ik::constraints::GoalPosition::calcJacobian | ( | ) | [virtual] |
Jacobian is first three rows of standard jacobian (expressed in base frame). Equivalent to each axis of rotation crossed with vector from joint to chain tip. Each row is scaled by the corresponding element of weight_.
Implements constrained_ik::Constraint.
Reimplemented in constrained_ik::constraints::ToolPosition.
Definition at line 46 of file goal_position.cpp.
bool constrained_ik::constraints::GoalPosition::checkStatus | ( | ) | const [virtual] |
Checks termination criteria Termination criteria for this constraint is that positional error is below threshold.
Reimplemented from constrained_ik::Constraint.
Definition at line 66 of file goal_position.cpp.
Eigen::Vector3d constrained_ik::constraints::GoalPosition::getWeight | ( | ) | [inline] |
void constrained_ik::constraints::GoalPosition::reset | ( | ) | [virtual] |
Resets constraint. Use this before performing new IK request.
Reimplemented from constrained_ik::Constraint.
Definition at line 75 of file goal_position.cpp.
void constrained_ik::constraints::GoalPosition::setWeight | ( | const Eigen::Vector3d & | weight | ) | [inline] |
Setter for weight_.
weight | Value to assign to weight_ |
Definition at line 84 of file goal_position.h.
void constrained_ik::constraints::GoalPosition::update | ( | const SolverState & | state | ) | [virtual] |
Update internal state of constraint (overrides constraint::update) Sets current positional error.
state | SolverState holding current state of IK solver |
Reimplemented from constrained_ik::Constraint.
Definition at line 81 of file goal_position.cpp.
double constrained_ik::constraints::GoalPosition::pos_err_ [protected] |
Definition at line 88 of file goal_position.h.
double constrained_ik::constraints::GoalPosition::pos_err_tol_ [protected] |
Definition at line 84 of file goal_position.h.
Eigen::Vector3d constrained_ik::constraints::GoalPosition::weight_ [protected] |
Definition at line 89 of file goal_position.h.