Tesseract 0.28.4
Loading...
Searching...
No Matches
tesseract::scene_graph::OFKTBaseNode Class Reference
Inheritance diagram for tesseract::scene_graph::OFKTBaseNode:

Public Member Functions

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

Protected Attributes

tesseract::scene_graph::JointType type_
OFKTNode * parent_ { nullptr }
tesseract::common::LinkId link_id_
tesseract::common::JointId joint_id_
Eigen::Isometry3d static_tf_ { Eigen::Isometry3d::Identity() }
Eigen::Isometry3d joint_tf_ { Eigen::Isometry3d::Identity() }
Eigen::Isometry3d local_tf_ { Eigen::Isometry3d::Identity() }
Eigen::Isometry3d world_tf_ { Eigen::Isometry3d::Identity() }
Eigen::Matrix< double, 6, 1 > local_twist_ { Eigen::VectorXd::Zero(6) }
double joint_value_ { 0 }
bool joint_value_changed_ { false }
std::vector< OFKTNode * > children_
std::vector< const OFKTNode * > children_const_
bool update_world_required_ { true }

Friends

class OFKTStateSolver

Additional Inherited Members

Public Types inherited from tesseract::scene_graph::OFKTNode
using UPtr = std::unique_ptr<OFKTNode>
using Ptr = std::shared_ptr<OFKTNode>
using ConstPtr = std::shared_ptr<const OFKTNode>

Member Function Documentation

◆ getType()

tesseract::scene_graph::JointType tesseract::scene_graph::OFKTBaseNode::getType ( ) const
overridevirtual

Get the type of joint associated with the node.

Returns
The Joint Type

Implements tesseract::scene_graph::OFKTNode.

◆ setParent()

void tesseract::scene_graph::OFKTBaseNode::setParent ( OFKTNode * parent)
overridevirtual

Set the parent node.

This should indicate that updateWorldTransformationRequired() = true

Parameters
parentThe parent node

Implements tesseract::scene_graph::OFKTNode.

Reimplemented in tesseract::scene_graph::OFKTRootNode.

◆ getParent() [1/2]

OFKTNode * tesseract::scene_graph::OFKTBaseNode::getParent ( )
overridevirtual

Get the parent node.

Returns
The parent node

Implements tesseract::scene_graph::OFKTNode.

◆ getParent() [2/2]

const OFKTNode * tesseract::scene_graph::OFKTBaseNode::getParent ( ) const
overridevirtual

Get the parent node (const).

Returns
The parent node

Implements tesseract::scene_graph::OFKTNode.

◆ getLinkId()

tesseract::common::LinkId tesseract::scene_graph::OFKTBaseNode::getLinkId ( ) const
overridevirtual

Get the link ID associated with the node.

Returns
The link ID

Implements tesseract::scene_graph::OFKTNode.

◆ getJointId()

tesseract::common::JointId tesseract::scene_graph::OFKTBaseNode::getJointId ( ) const
overridevirtual

Get the joint ID associated with the node.

Returns
The joint ID

Implements tesseract::scene_graph::OFKTNode.

◆ storeJointValue()

void tesseract::scene_graph::OFKTBaseNode::storeJointValue ( double joint_value)
overridevirtual

Set the nodes joint value if it has one.

This should indicate hasJointValueChanged() = true

Parameters
joint_valueThe joint value

Implements tesseract::scene_graph::OFKTNode.

Reimplemented in tesseract::scene_graph::OFKTFixedNode, tesseract::scene_graph::OFKTFloatingNode, tesseract::scene_graph::OFKTRevoluteNode, and tesseract::scene_graph::OFKTRootNode.

◆ getJointValue()

double tesseract::scene_graph::OFKTBaseNode::getJointValue ( ) const
overridevirtual

Get the current joint value.

Returns
The current joint value

Implements tesseract::scene_graph::OFKTNode.

Reimplemented in tesseract::scene_graph::OFKTFixedNode, and tesseract::scene_graph::OFKTFloatingNode.

◆ hasJointValueChanged()

bool tesseract::scene_graph::OFKTBaseNode::hasJointValueChanged ( ) const
overridevirtual

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

Implements tesseract::scene_graph::OFKTNode.

◆ setStaticTransformation()

void tesseract::scene_graph::OFKTBaseNode::setStaticTransformation ( const Eigen::Isometry3d & static_tf)
overridevirtual

Set the static transformation.

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

Parameters
static_tfThe new static transformation

Implements tesseract::scene_graph::OFKTNode.

Reimplemented in tesseract::scene_graph::OFKTFixedNode, tesseract::scene_graph::OFKTFloatingNode, and tesseract::scene_graph::OFKTRootNode.

◆ getStaticTransformation()

const Eigen::Isometry3d & tesseract::scene_graph::OFKTBaseNode::getStaticTransformation ( ) const
overridevirtual

Get the nodes static transformation.

Returns
The static transformation

Implements tesseract::scene_graph::OFKTNode.

◆ getLocalTransformation()

const Eigen::Isometry3d & tesseract::scene_graph::OFKTBaseNode::getLocalTransformation ( ) const
overridevirtual

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

Returns
The nodes local transformation

Implements tesseract::scene_graph::OFKTNode.

◆ computeLocalTransformation()

Eigen::Isometry3d tesseract::scene_graph::OFKTBaseNode::computeLocalTransformation ( double joint_value) const
overridevirtual

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

Implements tesseract::scene_graph::OFKTNode.

Reimplemented in 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()

void tesseract::scene_graph::OFKTBaseNode::computeAndStoreWorldTransformation ( )
overridevirtual

Compute and store the nodes world transformation.

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

Implements tesseract::scene_graph::OFKTNode.

Reimplemented in tesseract::scene_graph::OFKTRootNode.

◆ getWorldTransformation()

const Eigen::Isometry3d & tesseract::scene_graph::OFKTBaseNode::getWorldTransformation ( ) const
overridevirtual

Get the nodes world transformation.

Returns
The nodes world transformation

Implements tesseract::scene_graph::OFKTNode.

◆ updateWorldTransformationRequired()

bool tesseract::scene_graph::OFKTBaseNode::updateWorldTransformationRequired ( ) const
overridevirtual

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.

Implements tesseract::scene_graph::OFKTNode.

Reimplemented in tesseract::scene_graph::OFKTRootNode.

◆ getLocalTwist()

Eigen::Matrix< double, 6, 1 > tesseract::scene_graph::OFKTBaseNode::getLocalTwist ( ) const
overridevirtual

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

Implements tesseract::scene_graph::OFKTNode.

◆ addChild()

void tesseract::scene_graph::OFKTBaseNode::addChild ( OFKTNode * node)
overridevirtual

Add a child node.

Parameters
nodeThe node which is a child of this node

Implements tesseract::scene_graph::OFKTNode.

◆ removeChild()

void tesseract::scene_graph::OFKTBaseNode::removeChild ( const OFKTNode * node)
overridevirtual

Remove a child node assiciated with this node.

Parameters
nodeThe child node to be removed

Implements tesseract::scene_graph::OFKTNode.

◆ getChildren() [1/2]

std::vector< OFKTNode * > & tesseract::scene_graph::OFKTBaseNode::getChildren ( )
overridevirtual

Get a vector of child nodes associated with this node.

Returns
A vector of child nodes

Implements tesseract::scene_graph::OFKTNode.

◆ getChildren() [2/2]

const std::vector< const OFKTNode * > & tesseract::scene_graph::OFKTBaseNode::getChildren ( ) const
overridevirtual

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

Returns
A vector of child nodes

Implements tesseract::scene_graph::OFKTNode.