Go to the documentation of this file.
42 : type_(
type), parent_(parent), link_name_(std::move(link_name))
48 std::string link_name,
49 std::string joint_name,
50 const Eigen::Isometry3d& static_tf)
53 , link_name_(std::move(link_name))
54 , joint_name_(std::move(joint_name))
55 , static_tf_(static_tf)
56 , local_tf_(static_tf)
98 throw std::runtime_error(
"OFKTBaseNode: computeLocalTransformation should never be called!");
139 throw std::runtime_error(
"OFKTRootNode: does not have a parent!");
144 throw std::runtime_error(
"OFKTRootNode: does not have a joint value!");
149 throw std::runtime_error(
"OFKTRootNode: does not have a static transform!");
162 std::string link_name,
163 std::string joint_name,
164 const Eigen::Isometry3d& static_tf)
167 std::move(link_name),
168 std::move(joint_name),
176 throw std::runtime_error(
"OFKTFixedNode: does not have a joint value!");
196 std::string link_name,
197 std::string joint_name,
198 const Eigen::Isometry3d& static_tf)
201 std::move(link_name),
202 std::move(joint_name),
210 throw std::runtime_error(
"OFKTFloatingNode: does not have a joint value!");
215 throw std::runtime_error(
"OFKTFloatingNode: does not have a joint value!");
233 std::string link_name,
234 std::string joint_name,
235 const Eigen::Isometry3d& static_tf,
236 const Eigen::Vector3d& axis)
239 std::move(link_name),
240 std::move(joint_name),
242 , axis_(axis.normalized())
271 std::string link_name,
272 std::string joint_name,
273 const Eigen::Isometry3d& static_tf,
274 const Eigen::Vector3d& axis)
277 std::move(link_name),
278 std::move(joint_name),
280 , axis_(axis.normalized())
307 std::string link_name,
308 std::string joint_name,
309 const Eigen::Isometry3d& static_tf,
310 const Eigen::Vector3d& axis)
313 std::move(link_name),
314 std::move(joint_name),
316 , axis_(axis.normalized())
Eigen::Isometry3d computeLocalTransformation(double joint_value) const override
Compute the local tranformation but do not save.
double getJointValue() const override
Get the current joint value.
Eigen::Isometry3d computeLocalTransformation(double joint_value) const override
Compute the local tranformation but do not save.
std::vector< const OFKTNode * > children_const_
void setStaticTransformation(const Eigen::Isometry3d &static_tf) override
Set the static transformation.
void computeAndStoreLocalTransformation() override
Compute and save the local transformation 'L = S * J(Joint Value)'.
Eigen::Isometry3d joint_tf_
std::vector< OFKTNode * > children_
EIGEN_MAKE_ALIGNED_OPERATOR_NEW OFKTFloatingNode(OFKTNode *parent, std::string link_name, std::string joint_name, const Eigen::Isometry3d &static_tf)
void computeAndStoreLocalTransformation() override
Compute and save the local transformation 'L = S * J(Joint Value)'.
void computeAndStoreWorldTransformation() override
Compute and store the nodes world transformation.
void computeAndStoreLocalTransformationImpl()
Eigen::Isometry3d computeLocalTransformation(double joint_value) const override
Compute the local tranformation but do not save.
bool almostEqualRelativeAndAbs(const Eigen::Ref< const Eigen::VectorXd > &v1, const Eigen::Ref< const Eigen::VectorXd > &v2, const Eigen::Ref< const Eigen::VectorXd > &max_diff, const Eigen::Ref< const Eigen::VectorXd > &max_rel_diff)
void setParent(OFKTNode *parent) override
Set the parent node.
const std::string & getJointName() const override
Get the joint name associated with the node.
bool hasJointValueChanged() const override
Indicates that the joint value has changed and that local and world transformation need to be recompu...
tesseract_scene_graph::JointType type_
Eigen::Isometry3d computeLocalTransformation(double joint_value) const override
Compute the local tranformation but do not save.
void storeJointValue(double joint_value) override
Set the nodes joint value if it has one.
A implementation of the Optimized Forward Kinematic Tree Nodes.
const std::string & getLinkName() const override
Get the link name associated with the node.
Eigen::Matrix< double, 6, 1 > getLocalTwist() const override
Return the twist of the node in its local frame.
Eigen::Isometry3d computeLocalTransformation(double joint_value) const override
Compute the local tranformation but do not save.
const Eigen::Isometry3d & getWorldTransformation() const override
Get the nodes world transformation.
bool update_world_required_
Eigen::Isometry3d static_tf_
void computeAndStoreLocalTransformation() override
Compute and save the local transformation 'L = S * J(Joint Value)'.
EIGEN_MAKE_ALIGNED_OPERATOR_NEW OFKTContinuousNode(OFKTNode *parent, std::string link_name, std::string joint_name, const Eigen::Isometry3d &static_tf, const Eigen::Vector3d &axis)
Eigen::Isometry3d local_tf_
Eigen::Isometry3d computeLocalTransformation(double joint_value) const override
Compute the local tranformation but do not save.
JointType getType() const override
Get the type of joint associated with the node.
OFKTNode * getParent() override
Get the parent node.
EIGEN_MAKE_ALIGNED_OPERATOR_NEW OFKTRootNode(std::string link_name)
This should only be used for the root node of the tree.
const Eigen::Isometry3d & getLocalTransformation() const override
Get the local transformation: 'L = S * J'.
EIGEN_MAKE_ALIGNED_OPERATOR_NEW OFKTRevoluteNode(OFKTNode *parent, std::string link_name, std::string joint_name, const Eigen::Isometry3d &static_tf, const Eigen::Vector3d &axis)
std::vector< OFKTNode * > & getChildren() override
Get a vector of child nodes associated with this node.
EIGEN_MAKE_ALIGNED_OPERATOR_NEW OFKTFixedNode(OFKTNode *parent, std::string link_name, std::string joint_name, const Eigen::Isometry3d &static_tf)
const Eigen::Vector3d & getAxis() const
EIGEN_MAKE_ALIGNED_OPERATOR_NEW OFKTBaseNode(JointType type, OFKTNode *parent, std::string link_name)
bool updateWorldTransformationRequired() const override
Indicates if an update of the world transformation is required.
void computeAndStoreLocalTransformation() override
Compute and save the local transformation 'L = S * J(Joint Value)'.
double getJointValue() const override
Get the current joint value.
The OFKT node is contains multiple trasformation which are described below.
Eigen::Isometry3d world_tf_
void removeChild(const OFKTNode *node) override
Remove a child node assiciated with this node.
bool joint_value_changed_
double getJointValue() const override
Get the current joint value.
void computeAndStoreLocalTransformationImpl()
void computeAndStoreLocalTransformation() override
Compute and save the local transformation 'L = S * J(Joint Value)'.
EIGEN_MAKE_ALIGNED_OPERATOR_NEW OFKTPrismaticNode(OFKTNode *parent, std::string link_name, std::string joint_name, const Eigen::Isometry3d &static_tf, const Eigen::Vector3d &axis)
Eigen::Matrix< double, 6, 1 > local_twist_
void setStaticTransformation(const Eigen::Isometry3d &static_tf) override
Set the static transformation.
const Eigen::Vector3d & getAxis() const
const Eigen::Vector3d & getAxis() const
void addChild(OFKTNode *node) override
Add a child node.
void computeAndStoreLocalTransformationImpl()
void storeJointValue(double joint_value) override
Set the nodes joint value if it has one.
void storeJointValue(double joint_value) override
Set the nodes joint value if it has one.
const Eigen::Isometry3d & getStaticTransformation() const override
Get the nodes static transformation.
void setStaticTransformation(const Eigen::Isometry3d &static_tf) override
Set the static transformation.
Eigen::Isometry3d computeLocalTransformation(double joint_value) const override
Compute the local tranformation but do not save.
void storeJointValue(double joint_value) override
Set the nodes joint value if it has one.
void storeJointValue(double joint_value) override
Set the nodes joint value if it has one.
void setStaticTransformation(const Eigen::Isometry3d &static_tf) override
Set the static transformation.
void setParent(OFKTNode *parent) override
Set the parent node.
virtual const Eigen::Isometry3d & getWorldTransformation() const =0
Get the nodes world transformation.
void computeAndStoreWorldTransformation() override
Compute and store the nodes world transformation.
void computeAndStoreLocalTransformation() override
Compute and save the local transformation 'L = S * J(Joint Value)'.
bool updateWorldTransformationRequired() const override
Indicates if an update of the world transformation is required.