Tesseract 0.28.4
Loading...
Searching...
No Matches
tesseract::scene_graph::OFKTNode Class Referenceabstract

The OFKT node is contains multiple trasformation which are described below. More...

#include <ofkt_node.h>

Inheritance diagram for tesseract::scene_graph::OFKTNode:

Public Types

using UPtr = std::unique_ptr<OFKTNode>
using Ptr = std::shared_ptr<OFKTNode>
using ConstPtr = std::shared_ptr<const OFKTNode>

Public Member Functions

 OFKTNode (const OFKTNode &)=delete
OFKTNode & operator= (const OFKTNode &)=delete
 OFKTNode (OFKTNode &&)=delete
OFKTNode & operator= (OFKTNode &&)=delete
virtual JointType getType () const =0
 Get the type of joint associated with the node.
virtual void setParent (OFKTNode *parent)=0
 Set the parent node.
virtual OFKTNode * getParent ()=0
 Get the parent node.
virtual const OFKTNode * getParent () const =0
 Get the parent node (const).
virtual tesseract::common::LinkId getLinkId () const =0
 Get the link ID associated with the node.
virtual tesseract::common::JointId getJointId () const =0
 Get the joint ID associated with the node.
virtual void storeJointValue (double joint_value)=0
 Set the nodes joint value if it has one.
virtual double getJointValue () const =0
 Get the current joint value.
virtual bool hasJointValueChanged () const =0
 Indicates that the joint value has changed and that local and world transformation need to be recomputed.
virtual void setStaticTransformation (const Eigen::Isometry3d &static_tf)=0
 Set the static transformation.
virtual const Eigen::Isometry3d & getStaticTransformation () const =0
 Get the nodes static transformation.
virtual void computeAndStoreLocalTransformation ()=0
 Compute and save the local transformation 'L = S * J(Joint Value)'.
virtual const Eigen::Isometry3d & getLocalTransformation () const =0
 Get the local transformation: 'L = S * J'.
virtual Eigen::Isometry3d computeLocalTransformation (double joint_value) const =0
 Compute the local tranformation but do not save.
virtual void computeAndStoreWorldTransformation ()=0
 Compute and store the nodes world transformation.
virtual const Eigen::Isometry3d & getWorldTransformation () const =0
 Get the nodes world transformation.
virtual bool updateWorldTransformationRequired () const =0
 Indicates if an update of the world transformation is required.
virtual Eigen::Matrix< double, 6, 1 > getLocalTwist () const =0
 Return the twist of the node's link relative to its parent link for a unit joint velocity.
virtual void addChild (OFKTNode *node)=0
 Add a child node.
virtual void removeChild (const OFKTNode *node)=0
 Remove a child node assiciated with this node.
virtual std::vector< OFKTNode * > & getChildren ()=0
 Get a vector of child nodes associated with this node.
virtual const std::vector< const OFKTNode * > & getChildren () const =0
 Get a vector of child nodes associated with this node (Const).

Detailed Description

The OFKT node is contains multiple trasformation which are described below.

  • Static Transformation: (S)
  • Joint Transformation: (J) this if a fuction of the joint value if not fixed
  • Local Transformation: L = S * J
  • World Transformation: W = W(parent) * L

Member Function Documentation

◆ getType()

virtual JointType tesseract::scene_graph::OFKTNode::getType ( ) const
pure virtual

Get the type of joint associated with the node.

Returns
The Joint Type

Implemented in tesseract::scene_graph::OFKTBaseNode.

◆ setParent()

virtual void tesseract::scene_graph::OFKTNode::setParent ( OFKTNode * parent)
pure virtual

Set the parent node.

This should indicate that updateWorldTransformationRequired() = true

Parameters
parentThe parent node

Implemented in tesseract::scene_graph::OFKTBaseNode, and tesseract::scene_graph::OFKTRootNode.

◆ getParent() [1/2]

virtual OFKTNode * tesseract::scene_graph::OFKTNode::getParent ( )
pure virtual

Get the parent node.

Returns
The parent node

Implemented in tesseract::scene_graph::OFKTBaseNode.

◆ getParent() [2/2]

virtual const OFKTNode * tesseract::scene_graph::OFKTNode::getParent ( ) const
pure virtual

Get the parent node (const).

Returns
The parent node

Implemented in tesseract::scene_graph::OFKTBaseNode.

◆ getLinkId()

virtual tesseract::common::LinkId tesseract::scene_graph::OFKTNode::getLinkId ( ) const
pure virtual

Get the link ID associated with the node.

Returns
The link ID

Implemented in tesseract::scene_graph::OFKTBaseNode.

◆ getJointId()

virtual tesseract::common::JointId tesseract::scene_graph::OFKTNode::getJointId ( ) const
pure virtual

Get the joint ID associated with the node.

Returns
The joint ID

Implemented in tesseract::scene_graph::OFKTBaseNode.

◆ storeJointValue()

virtual void tesseract::scene_graph::OFKTNode::storeJointValue ( double joint_value)
pure virtual

◆ getJointValue()

virtual double tesseract::scene_graph::OFKTNode::getJointValue ( ) const
pure virtual

Get the current joint value.

Returns
The current joint value

Implemented in tesseract::scene_graph::OFKTBaseNode, tesseract::scene_graph::OFKTFixedNode, and tesseract::scene_graph::OFKTFloatingNode.

◆ hasJointValueChanged()

virtual bool tesseract::scene_graph::OFKTNode::hasJointValueChanged ( ) const
pure virtual

Indicates that the joint value has changed and that local and world transformation need to be recomputed.

Returns
If true, local and world transformation need to be recompute

Implemented in tesseract::scene_graph::OFKTBaseNode.

◆ setStaticTransformation()

virtual void tesseract::scene_graph::OFKTNode::setStaticTransformation ( const Eigen::Isometry3d & static_tf)
pure virtual

Set the static transformation.

This should recompute the local transformation and updateWorldTransformationRequired() = true.

Parameters
static_tfThe new static transformation

Implemented in tesseract::scene_graph::OFKTBaseNode, tesseract::scene_graph::OFKTFixedNode, tesseract::scene_graph::OFKTFloatingNode, and tesseract::scene_graph::OFKTRootNode.

◆ getStaticTransformation()

virtual const Eigen::Isometry3d & tesseract::scene_graph::OFKTNode::getStaticTransformation ( ) const
pure virtual

Get the nodes static transformation.

Returns
The static transformation

Implemented in tesseract::scene_graph::OFKTBaseNode.

◆ computeAndStoreLocalTransformation()

virtual void tesseract::scene_graph::OFKTNode::computeAndStoreLocalTransformation ( )
pure virtual

◆ getLocalTransformation()

virtual const Eigen::Isometry3d & tesseract::scene_graph::OFKTNode::getLocalTransformation ( ) const
pure virtual

Get the local transformation: 'L = S * J'.

Returns
The nodes local transformation

Implemented in tesseract::scene_graph::OFKTBaseNode.

◆ computeLocalTransformation()

virtual Eigen::Isometry3d tesseract::scene_graph::OFKTNode::computeLocalTransformation ( double joint_value) const
pure virtual

Compute the local tranformation but do not save.

This provides a const method for computing the local transform.

Parameters
joint_valueThe joint value for calculating the local transformation
Returns
The local transformation for the provided joint value

Implemented in tesseract::scene_graph::OFKTBaseNode, tesseract::scene_graph::OFKTContinuousNode, tesseract::scene_graph::OFKTFixedNode, tesseract::scene_graph::OFKTFloatingNode, tesseract::scene_graph::OFKTPrismaticNode, tesseract::scene_graph::OFKTRevoluteNode, and tesseract::scene_graph::OFKTRootNode.

◆ computeAndStoreWorldTransformation()

virtual void tesseract::scene_graph::OFKTNode::computeAndStoreWorldTransformation ( )
pure virtual

Compute and store the nodes world transformation.

This should reset the flag such that updateWorldTransformationRequired() returns false

Implemented in tesseract::scene_graph::OFKTBaseNode, and tesseract::scene_graph::OFKTRootNode.

◆ getWorldTransformation()

virtual const Eigen::Isometry3d & tesseract::scene_graph::OFKTNode::getWorldTransformation ( ) const
pure virtual

Get the nodes world transformation.

Returns
The nodes world transformation

Implemented in tesseract::scene_graph::OFKTBaseNode.

◆ updateWorldTransformationRequired()

virtual bool tesseract::scene_graph::OFKTNode::updateWorldTransformationRequired ( ) const
pure virtual

Indicates if an update of the world transformation is required.

This should get set to true when either of the following happen.

Note: setJointValue() is not handle here because that is captured by hasJointValueChanged()

Returns
If true, the world transformation need to be recalculated.

Implemented in tesseract::scene_graph::OFKTBaseNode, and tesseract::scene_graph::OFKTRootNode.

◆ getLocalTwist()

virtual Eigen::Matrix< double, 6, 1 > tesseract::scene_graph::OFKTNode::getLocalTwist ( ) const
pure virtual

Return the twist of the node's link relative to its parent link for a unit joint velocity.

It is expressed in the frame of the node's link, with the origin of that link as the reference point, so it does not depend on the joint value or on the joint origin. It is zero for a node without a joint value.

Returns
The node twist, linear part first

Implemented in tesseract::scene_graph::OFKTBaseNode.

◆ addChild()

virtual void tesseract::scene_graph::OFKTNode::addChild ( OFKTNode * node)
pure virtual

Add a child node.

Parameters
nodeThe node which is a child of this node

Implemented in tesseract::scene_graph::OFKTBaseNode.

◆ removeChild()

virtual void tesseract::scene_graph::OFKTNode::removeChild ( const OFKTNode * node)
pure virtual

Remove a child node assiciated with this node.

Parameters
nodeThe child node to be removed

Implemented in tesseract::scene_graph::OFKTBaseNode.

◆ getChildren() [1/2]

virtual std::vector< OFKTNode * > & tesseract::scene_graph::OFKTNode::getChildren ( )
pure virtual

Get a vector of child nodes associated with this node.

Returns
A vector of child nodes

Implemented in tesseract::scene_graph::OFKTBaseNode.

◆ getChildren() [2/2]

virtual const std::vector< const OFKTNode * > & tesseract::scene_graph::OFKTNode::getChildren ( ) const
pure virtual

Get a vector of child nodes associated with this node (Const).

Returns
A vector of child nodes

Implemented in tesseract::scene_graph::OFKTBaseNode.