8 #include <kdl/tree.hpp> 9 #include <kdl/treefksolverpos_recursive.hpp> 10 #include <kdl/treeiksolverpos_nr_jl.hpp> 11 #include <kdl/treeiksolvervel_wdls.hpp> 47 POSITION = X_AXIS | Y_AXIS,
48 ALL = POSITION | ROTATION
52 IKSolver(
const IKSolver &) =
delete;
53 IKSolver(IKSolver &&) =
delete;
58 void setRestarts(
unsigned int restarts);
64 virtual void setJointWeight(
const std::string &frame,
const Eigen::VectorXd &weights);
69 virtual void setJointWeights(
const Eigen::VectorXd &weights);
74 virtual void setLambda(
double lambda);
91 IKSolver(
const RobotPtr &robot,
unsigned int frames);
97 void setRequest(
unsigned int task,
Request request);
104 void setTask(
unsigned int task,
Index index,
bool active);
109 void setRandom(KDL::JntArray &array)
const;
111 const unsigned int n_;
112 const unsigned int t_;
120 double lambda_{0.01};
122 unsigned int restarts_{10};
164 void setJointWeight(
const std::string &frame,
const Eigen::VectorXd &weights)
override;
169 void setJointWeights(
const Eigen::VectorXd &weights)
override;
174 void setLambda(
double lambda)
override;
192 virtual bool doIK(KDL::JntArray &in, KDL::JntArray &out,
const KDL::Frames &goals);
197 KDL::TreeFkSolverPos_recursive
fk_;
242 bool solve(
StatePtr state,
const Eigen::Isometry2d &frame,
Request request = ALL);
270 unsigned int iterations = 50,
double eps = 1e-4);
277 bool doIK(KDL::JntArray &in, KDL::JntArray &out,
const KDL::Frames &goals)
override;
322 bool solve(
StatePtr state,
const Eigen::Isometry2d &frame,
Request request = ALL);
std::mutex mutex_
Thread mutex.
Index
KDL specific indices for different components of the task matrix.
const KDL::JntArray min_
Joint minimums.
A shared pointer wrapper for se2ez::State.
A collision aware version of tree IK.
Convenience wrapper around TreeIK for solving chains with a single tip frame.
const std::string frame_
Task frame.
const std::string frame_
Task frame.
CollisionManagerPtr cm_
Collision Manager for IK.
const unsigned int t_
Number of tasks.
const KDL::JntArray max_
Joint maximums.
Convenience wrapper around CollisionAwareTreeIK for solving chains with a single tip frame...
const KDL::Tree tree_
KDL tree used for solving.
Common components of IK solvers.
A shared pointer wrapper for se2ez::CollisionManager.
KDL::TreeIkSolverVel_wdls velIK_
Inverse velocity solver.
A shared pointer wrapper for se2ez::Robot.
KDL::MatrixXd weights_
Joint variable weights.
const unsigned int n_
Number of joint variables.
KDL::TreeIkSolverPos_NR_JL posIK_
Inverse position solver.
KDL::MatrixXd tasks_
Task weights.
Request
A bitmask specification of what task components should this IK request satisfy.
KDL::TreeFkSolverPos_recursive fk_
Forward kinematics solver.
const RobotPtr robot_
Reference to robot.
const std::map< std::string, unsigned int > frames_
Mapping of task frame name to index.
#define SE2EZ_CLASS_FORWARD(C)
StatePtr state_
Work state.