Go to the documentation of this file.
25 #include <SimoxUtility/math/distance/delta_angle.h>
27 #include <VirtualRobot/Nodes/RobotNode.h>
28 #include <VirtualRobot/RobotNodeSet.h>
29 #include <VirtualRobot/IK/DifferentialIK.h>
81 VirtualRobot::RobotNodePtr
tcp;
101 void set(
const VirtualRobot::RobotNodePtr& rn,
float target,
float weight);
103 VirtualRobot::RobotNodeSetPtr
rns;
123 VirtualRobot::RobotNodeSetPtr
rns;
143 VirtualRobot::RobotNodePtr
tcp;
155 return tcp->getPoseInRootFrame().inverse() *
target;
159 return (
tcp->getPoseInRootFrame().inverse() *
target).topRightCorner<3, 1>();
163 return simox::math::delta_angle(
tcp->getPoseInRootFrame(),
target);
199 static Eigen::VectorXf
LimitInfNormTo(Eigen::VectorXf vec,
float maxValue);
219 VirtualRobot::RobotNodeSetPtr rns;
220 std::vector<TargetPtr> targets;
221 std::vector<NullspaceGradientPtr> nullspaceGradients;
222 VirtualRobot::DifferentialIKPtr ik;
Target(const VirtualRobot::RobotNodeSetPtr &rns, const VirtualRobot::RobotNodePtr &tcp, const Eigen::Matrix4f &target, VirtualRobot::IKSolver::CartesianSelection mode)
VirtualRobot::RobotNodeSetPtr rns
CartesianVelocityController vCtrl
Eigen::Vector3f getPosError() const
VirtualRobot::IKSolver::CartesianSelection mode
Eigen::VectorXf jointValues
std::vector< NullspaceTargetStep > ikSteps
void init(Parameters &) override
float jointRegularizationTranslation
Eigen::VectorXf getGradient(Parameters ¶ms) override
Vertex target(const detail::edge_base< Directed, Vertex > &e, const PCG &)
std::shared_ptr< class NullspaceJointLimitAvoidance > NullspaceJointLimitAvoidancePtr
void setWeight(int index, float weight)
std::shared_ptr< class CompositeDiffIK > CompositeDiffIKPtr
Eigen::VectorXf getGradient(Parameters ¶ms) override
void set(int index, float target, float weight)
NullspaceTarget(const VirtualRobot::RobotNodeSetPtr &rns, const VirtualRobot::RobotNodePtr &tcp, const Eigen::Matrix4f &target, VirtualRobot::IKSolver::CartesianSelection mode)
virtual void init(Parameters ¶ms)=0
Result solve(Parameters params)
VirtualRobot::IKSolver::CartesianSelection mode
std::shared_ptr< class NullspaceTarget > NullspaceTargetPtr
std::shared_ptr< class NullspaceJointTarget > NullspaceJointTargetPtr
void addTarget(const TargetPtr &target)
void init(Parameters &) override
virtual Eigen::VectorXf getGradient(Parameters ¶ms)=0
void step(Parameters ¶ms, SolveState &s, int stepNr)
std::shared_ptr< Target > TargetPtr
static Eigen::MatrixXf CalculateNullspaceLU(const Eigen::Matrix4f &jacobi)
Eigen::VectorXf jointRegularization
Eigen::Matrix4f getPoseError() const
VirtualRobot::RobotNodePtr tcp
NullspaceJointLimitAvoidance(const VirtualRobot::RobotNodeSetPtr &rns)
Eigen::VectorXf jointLimitMargins
Eigen::VectorXf cartesianVel
Eigen::Vector3f posDiffElbow
Eigen::MatrixXf nullspace
static Eigen::VectorXf LimitInfNormTo(Eigen::VectorXf vec, float maxValue)
std::shared_ptr< class NullspaceGradient > NullspaceGradientPtr
float minimumJointLimitMargin
VirtualRobot::RobotNodeSetPtr rns
static Eigen::MatrixXf CalculateNullspaceSVD(const Eigen::Matrix4f &jacobi)
Eigen::VectorXf getGradient(Parameters ¶ms) override
std::vector< TargetStep > ikSteps
void init(Parameters &) override
MatrixXX< 4, 4, float > Matrix4f
Eigen::Vector3f elbowPosDiff
CartesianPositionController pCtrl
Eigen::VectorXf cartesianVel
int CartesianSelectionToSize(VirtualRobot::IKSolver::CartesianSelection mode)
virtual ~NullspaceGradient()=default
VirtualRobot::RobotNodePtr tcp
float jointRegularizationRotation
CartesianPositionController pCtrl
Eigen::VectorXf jointValues
Eigen::VectorXf cartesianRegularization
void setWeights(const VirtualRobot::RobotNodeSetPtr &rns, float weight)
NullspaceTargetPtr addNullspacePositionTarget(const VirtualRobot::RobotNodePtr &tcp, const Eigen::Vector3f &target)
CompositeDiffIK(const VirtualRobot::RobotNodeSetPtr &rns)
double s(double t, double s0, double v0, double a0, double j)
This file offers overloads of toIce() and fromIce() functions for STL container types.
void addNullspaceGradient(const NullspaceGradientPtr &gradient)
NullspaceJointTarget(const VirtualRobot::RobotNodeSetPtr &rns)