Go to the documentation of this file.
26 #include <VirtualRobot/RobotNodeSet.h>
27 #include <VirtualRobot/IK/DifferentialIK.h>
28 #include <VirtualRobot/Robot.h>
29 #include <Eigen/Dense>
31 #include <RobotAPI/interface/core/CartesianPositionControllerConfig.h>
37 class CartesianPositionController;
45 const VirtualRobot::RobotNodePtr& referenceFrame =
nullptr);
51 Eigen::VectorXf
calculatePos(
const Eigen::Vector3f& targetPos)
const;
56 const VirtualRobot::RobotNodePtr& tcp,
57 const VirtualRobot::RobotNodePtr& referenceFrame =
nullptr);
59 const VirtualRobot::RobotNodePtr& tcp,
60 const VirtualRobot::RobotNodePtr& referenceFrame =
nullptr);
62 const VirtualRobot::RobotNodePtr& tcp,
64 float thresholdPosReached,
65 float thresholdOriReached,
66 const VirtualRobot::RobotNodePtr& referenceFrame =
nullptr);
72 VirtualRobot::RobotNodePtr
getTcp()
const;
81 VirtualRobot::RobotNodePtr tcp;
82 VirtualRobot::RobotNodePtr referenceFrame;
101 return this->
clone();
103 VariantDataClassPtr
clone(
const Ice::Current& = ::Ice::Current())
const override
107 std::string
output(
const Ice::Current&
c = ::Ice::Current())
const override;
112 bool validate(
const Ice::Current& = ::Ice::Current())
override
119 stream <<
"CartesianPositionControllerConfig: " << std::endl << rhs.
output() << std::endl;
124 void serialize(
const armarx::ObjectSerializerBasePtr& serializer, const ::Ice::Current& = ::Ice::Current())
const override;
125 void deserialize(
const armarx::ObjectSerializerBasePtr& serializer, const ::Ice::Current& = ::Ice::Current())
override;
CartesianPositionController(const VirtualRobot::RobotNodePtr &tcp, const VirtualRobot::RobotNodePtr &referenceFrame=nullptr)
bool validate(const Ice::Current &=::Ice::Current()) override
const VariantTypeId CartesianPositionControllerConfig
Eigen::VectorXf calculatePos(const Eigen::Vector3f &targetPos) const
std::shared_ptr< CartesianPositionController > CartesianPositionControllerPtr
static float GetOrientationError(const Eigen::Matrix4f &targetPose, const VirtualRobot::RobotNodePtr &tcp, const VirtualRobot::RobotNodePtr &referenceFrame=nullptr)
Eigen::Vector3f getPositionDiff(const Eigen::Matrix4f &targetPose) const
friend std::ostream & operator<<(std::ostream &stream, const CartesianPositionControllerConfig &rhs)
bool reached(const Eigen::Matrix4f &targetPose, VirtualRobot::IKSolver::CartesianSelection mode, float thresholdPosReached, float thresholdOriReached)
float getPositionError(const Eigen::Matrix4f &targetPose) const
Eigen::Vector3f getPositionDiffVec3(const Eigen::Vector3f &targetPosition) const
void serialize(const armarx::ObjectSerializerBasePtr &serializer, const ::Ice::Current &=::Ice::Current()) const override
static float GetPositionError(const Eigen::Matrix4f &targetPose, const VirtualRobot::RobotNodePtr &tcp, const VirtualRobot::RobotNodePtr &referenceFrame=nullptr)
CartesianPositionControllerConfig()
VirtualRobot::RobotNodePtr getTcp() const
CartesianPositionController & operator=(CartesianPositionController &&)=default
std::string output(const Ice::Current &c=::Ice::Current()) const override
VariantDataClassPtr clone(const Ice::Current &=::Ice::Current()) const override
Eigen::Vector3f getOrientationDiff(const Eigen::Matrix4f &targetPose) const
MatrixXX< 4, 4, float > Matrix4f
IceInternal::Handle< CartesianPositionControllerConfig > CartesianPositionControllerConfigPtr
static bool Reached(const Eigen::Matrix4f &targetPose, const VirtualRobot::RobotNodePtr &tcp, bool checkOri, float thresholdPosReached, float thresholdOriReached, const VirtualRobot::RobotNodePtr &referenceFrame=nullptr)
void deserialize(const armarx::ObjectSerializerBasePtr &serializer, const ::Ice::Current &=::Ice::Current()) override
std::shared_ptr< Object > ObjectPtr
VariantTypeId getType(const Ice::Current &=::Ice::Current()) const override
Ice::ObjectPtr ice_clone() const override
float getOrientationError(const Eigen::Matrix4f &targetPose) const
This file offers overloads of toIce() and fromIce() functions for STL container types.
static VariantTypeId addTypeName(const std::string &typeName)
Register a new type for the use in a Variant.
Eigen::VectorXf calculate(const Eigen::Matrix4f &targetPose, VirtualRobot::IKSolver::CartesianSelection mode) const