Tesseract 0.28.4
Loading...
Searching...
No Matches
tesseract::scene_graph::StateSolver Class Referenceabstract
Inheritance diagram for tesseract::scene_graph::StateSolver:

Public Types

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

Public Member Functions

 StateSolver (const StateSolver &)=default
StateSolver & operator= (const StateSolver &)=default
 StateSolver (StateSolver &&)=default
StateSolver & operator= (StateSolver &&)=default
virtual StateSolver::UPtr clone () const =0
 This should clone the object so it may be used in a multi threaded application where each thread would clone the solver.
virtual void setState (const Eigen::Ref< const Eigen::VectorXd > &joint_values, const tesseract::common::JointIdTransformMap &floating_joint_values={})=0
 Set the current state of the solver.
virtual void setState (const tesseract::common::JointIdTransformMap &floating_joint_values)=0
 Set the current state of the floating joint values.
virtual void setState (const SceneState::JointValues &joint_values, const tesseract::common::JointIdTransformMap &floating_joint_values={})=0
 Set the current state using a JointId-keyed map.
virtual void setState (const std::vector< tesseract::common::JointId > &joint_ids, const Eigen::Ref< const Eigen::VectorXd > &joint_values, const tesseract::common::JointIdTransformMap &floating_joint_values={})=0
 Set the current state using a vector of JointIds.
virtual SceneState getState (const Eigen::Ref< const Eigen::VectorXd > &joint_values, const tesseract::common::JointIdTransformMap &floating_joint_values={}) const =0
 Get the state of the solver given the joint values.
virtual SceneState getState (const tesseract::common::JointIdTransformMap &floating_joint_values) const =0
 Get the state given floating joint values.
virtual SceneState getState (const SceneState::JointValues &joint_values, const tesseract::common::JointIdTransformMap &floating_joint_values={}) const =0
 Get the state using a JointId-keyed map.
virtual SceneState getState (const std::vector< tesseract::common::JointId > &joint_ids, const Eigen::Ref< const Eigen::VectorXd > &joint_values, const tesseract::common::JointIdTransformMap &floating_joint_values={}) const =0
 Get the state using a vector of JointIds.
virtual void getLinkTransforms (tesseract::common::LinkIdTransformMap &link_transforms, const std::vector< tesseract::common::JointId > &joint_ids, const Eigen::Ref< const Eigen::VectorXd > &joint_values, const tesseract::common::JointIdTransformMap &floating_joint_values) const =0
 Get the link transforms of the scene for a given set or subset of joint values.
virtual void getLinkTransforms (tesseract::common::LinkIdTransformMap &link_transforms, const std::vector< tesseract::common::JointId > &joint_ids, const Eigen::Ref< const Eigen::VectorXd > &joint_values) const =0
 Get link transforms without applying floating joint values.
virtual SceneState getState () const =0
 Get the current state of the scene.
virtual Eigen::MatrixXd getJacobian (const Eigen::Ref< const Eigen::VectorXd > &joint_values, const tesseract::common::LinkId &link_id, const tesseract::common::JointIdTransformMap &floating_joint_values={}) const =0
 Get the jacobian for a link identified by LinkId.
virtual Eigen::MatrixXd getJacobian (const std::vector< tesseract::common::JointId > &joint_ids, const Eigen::Ref< const Eigen::VectorXd > &joint_values, const tesseract::common::LinkId &link_id, const tesseract::common::JointIdTransformMap &floating_joint_values={}) const =0
 Get the jacobian for a given set or subset of joint IDs.
virtual SceneState getRandomState () const =0
 Get the random state of the environment.
virtual std::vector< tesseract::common::JointId > getJointIds () const =0
 Get the vector of joint IDs.
virtual std::vector< tesseract::common::JointId > getFloatingJointIds () const =0
 Get the vector of floating joint IDs.
virtual std::vector< tesseract::common::JointId > getActiveJointIds () const =0
 Get the vector of active joint IDs which align with the limits.
virtual tesseract::common::LinkId getBaseLinkId () const =0
 Get the base link ID.
virtual std::vector< tesseract::common::LinkId > getLinkIds () const =0
 Get the vector of link IDs.
virtual std::vector< tesseract::common::LinkId > getActiveLinkIds () const =0
 Get the vector of active link IDs.
virtual std::vector< tesseract::common::LinkId > getStaticLinkIds () const =0
 Get a vector of static link IDs.
virtual bool isActiveLinkId (const tesseract::common::LinkId &link_id) const =0
 Check if link is an active link.
virtual bool hasLinkId (const tesseract::common::LinkId &link_id) const =0
 Check if link id exists.
virtual tesseract::common::VectorIsometry3d getLinkTransforms () const =0
 Get all of the links transforms.
virtual Eigen::Isometry3d getLinkTransform (const tesseract::common::LinkId &link_id) const =0
 Get the transform corresponding to the link.
virtual Eigen::Isometry3d getRelativeLinkTransform (const tesseract::common::LinkId &from_link_id, const tesseract::common::LinkId &to_link_id) const =0
 Get transform between two links using the current state.
virtual tesseract::common::KinematicLimits getLimits () const =0
 Getter for kinematic limits.

Member Function Documentation

◆ clone()

virtual StateSolver::UPtr tesseract::scene_graph::StateSolver::clone ( ) const
pure virtual

This should clone the object so it may be used in a multi threaded application where each thread would clone the solver.

Returns
A clone of the object.

Implemented in tesseract::scene_graph::KDLStateSolver, and tesseract::scene_graph::OFKTStateSolver.

◆ setState() [1/4]

virtual void tesseract::scene_graph::StateSolver::setState ( const Eigen::Ref< const Eigen::VectorXd > & joint_values,
const tesseract::common::JointIdTransformMap & floating_joint_values = {} )
pure virtual

Set the current state of the solver.

This must be the same size and order as what is returned by getJointIds

Parameters
joint_valuesThe joint values

Implemented in tesseract::scene_graph::KDLStateSolver, and tesseract::scene_graph::OFKTStateSolver.

◆ setState() [2/4]

virtual void tesseract::scene_graph::StateSolver::setState ( const tesseract::common::JointIdTransformMap & floating_joint_values)
pure virtual

Set the current state of the floating joint values.

Parameters
floating_joint_valuesThe floating joint values to set

Implemented in tesseract::scene_graph::KDLStateSolver, and tesseract::scene_graph::OFKTStateSolver.

◆ setState() [3/4]

virtual void tesseract::scene_graph::StateSolver::setState ( const SceneState::JointValues & joint_values,
const tesseract::common::JointIdTransformMap & floating_joint_values = {} )
pure virtual

Set the current state using a JointId-keyed map.

Implemented in tesseract::scene_graph::KDLStateSolver, and tesseract::scene_graph::OFKTStateSolver.

◆ setState() [4/4]

virtual void tesseract::scene_graph::StateSolver::setState ( const std::vector< tesseract::common::JointId > & joint_ids,
const Eigen::Ref< const Eigen::VectorXd > & joint_values,
const tesseract::common::JointIdTransformMap & floating_joint_values = {} )
pure virtual

Set the current state using a vector of JointIds.

Implemented in tesseract::scene_graph::KDLStateSolver, and tesseract::scene_graph::OFKTStateSolver.

◆ getState() [1/5]

virtual SceneState tesseract::scene_graph::StateSolver::getState ( const Eigen::Ref< const Eigen::VectorXd > & joint_values,
const tesseract::common::JointIdTransformMap & floating_joint_values = {} ) const
pure virtual

Get the state of the solver given the joint values.

This must be the same size and order as what is returned by getJointIds

Parameters
joint_valuesThe joint values
floating_joint_valuesThe floating joint origin transform

Implemented in tesseract::scene_graph::KDLStateSolver, and tesseract::scene_graph::OFKTStateSolver.

◆ getState() [2/5]

virtual SceneState tesseract::scene_graph::StateSolver::getState ( const tesseract::common::JointIdTransformMap & floating_joint_values) const
pure virtual

Get the state given floating joint values.

Parameters
floating_joint_valuesThe floating joint values to leverage
Returns
A the state of the environment

Implemented in tesseract::scene_graph::KDLStateSolver, and tesseract::scene_graph::OFKTStateSolver.

◆ getState() [3/5]

virtual SceneState tesseract::scene_graph::StateSolver::getState ( const SceneState::JointValues & joint_values,
const tesseract::common::JointIdTransformMap & floating_joint_values = {} ) const
pure virtual

Get the state using a JointId-keyed map.

This does not change the internal state of the solver.

Implemented in tesseract::scene_graph::KDLStateSolver, and tesseract::scene_graph::OFKTStateSolver.

◆ getState() [4/5]

virtual SceneState tesseract::scene_graph::StateSolver::getState ( const std::vector< tesseract::common::JointId > & joint_ids,
const Eigen::Ref< const Eigen::VectorXd > & joint_values,
const tesseract::common::JointIdTransformMap & floating_joint_values = {} ) const
pure virtual

Get the state using a vector of JointIds.

Implemented in tesseract::scene_graph::KDLStateSolver, and tesseract::scene_graph::OFKTStateSolver.

◆ getLinkTransforms() [1/3]

virtual void tesseract::scene_graph::StateSolver::getLinkTransforms ( tesseract::common::LinkIdTransformMap & link_transforms,
const std::vector< tesseract::common::JointId > & joint_ids,
const Eigen::Ref< const Eigen::VectorXd > & joint_values,
const tesseract::common::JointIdTransformMap & floating_joint_values ) const
pure virtual

Get the link transforms of the scene for a given set or subset of joint values.

This is provided to optimize motion planning where link_transforms are poplated multiple time

This does not change the internal state of the solver.

This overwrites the transform of every link in the solver's tree but does not clear link_transforms first; keys from a different tree persist. Reusing a scratch map without clearing is safe iff every key later read is a link of this solver.

Parameters
link_transformsThe link_transforms to populate with data.
joint_idsA list of joint IDs to change.
joint_valuesThe joint values
floating_joint_valuesThe floating joint origin transform

Implemented in tesseract::scene_graph::KDLStateSolver, and tesseract::scene_graph::OFKTStateSolver.

◆ getLinkTransforms() [2/3]

virtual void tesseract::scene_graph::StateSolver::getLinkTransforms ( tesseract::common::LinkIdTransformMap & link_transforms,
const std::vector< tesseract::common::JointId > & joint_ids,
const Eigen::Ref< const Eigen::VectorXd > & joint_values ) const
pure virtual

Get link transforms without applying floating joint values.

This is provided to optimize motion planning where link_transforms are poplated multiple time

This does not change the internal state of the solver.

This overwrites the transform of every link in the solver's tree but does not clear link_transforms first; keys from a different tree persist. Reusing a scratch map without clearing is safe iff every key later read is a link of this solver.

Parameters
link_transformsThe link_transforms to populate with data.
joint_idsA list of joint IDs to change.
joint_valuesThe joint values

Implemented in tesseract::scene_graph::KDLStateSolver, and tesseract::scene_graph::OFKTStateSolver.

◆ getState() [5/5]

virtual SceneState tesseract::scene_graph::StateSolver::getState ( ) const
pure virtual

Get the current state of the scene.

Returns
The current state

Implemented in tesseract::scene_graph::KDLStateSolver, and tesseract::scene_graph::OFKTStateSolver.

◆ getJacobian() [1/2]

virtual Eigen::MatrixXd tesseract::scene_graph::StateSolver::getJacobian ( const Eigen::Ref< const Eigen::VectorXd > & joint_values,
const tesseract::common::LinkId & link_id,
const tesseract::common::JointIdTransformMap & floating_joint_values = {} ) const
pure virtual

Get the jacobian for a link identified by LinkId.

This must be the same size and order as what is returned by getJointIds

Parameters
joint_valuesThe joint values
link_idThe link ID to calculate the jacobian for
floating_joint_valuesThe floating joint origin transform

Implemented in tesseract::scene_graph::KDLStateSolver, and tesseract::scene_graph::OFKTStateSolver.

◆ getJacobian() [2/2]

virtual Eigen::MatrixXd tesseract::scene_graph::StateSolver::getJacobian ( const std::vector< tesseract::common::JointId > & joint_ids,
const Eigen::Ref< const Eigen::VectorXd > & joint_values,
const tesseract::common::LinkId & link_id,
const tesseract::common::JointIdTransformMap & floating_joint_values = {} ) const
pure virtual

Get the jacobian for a given set or subset of joint IDs.

This does not change the internal state of the solver.

Parameters
joint_idsA list of joint IDs to change.
joint_valuesThe joint values
link_idThe link ID to calculate the jacobian for
floating_joint_valuesThe floating joint origin transform

Implemented in tesseract::scene_graph::KDLStateSolver, and tesseract::scene_graph::OFKTStateSolver.

◆ getRandomState()

virtual SceneState tesseract::scene_graph::StateSolver::getRandomState ( ) const
pure virtual

Get the random state of the environment.

Returns
Environment state

Implemented in tesseract::scene_graph::KDLStateSolver, and tesseract::scene_graph::OFKTStateSolver.

◆ getJointIds()

virtual std::vector< tesseract::common::JointId > tesseract::scene_graph::StateSolver::getJointIds ( ) const
pure virtual

Get the vector of joint IDs.

Implemented in tesseract::scene_graph::KDLStateSolver, and tesseract::scene_graph::OFKTStateSolver.

◆ getFloatingJointIds()

virtual std::vector< tesseract::common::JointId > tesseract::scene_graph::StateSolver::getFloatingJointIds ( ) const
pure virtual

Get the vector of floating joint IDs.

Implemented in tesseract::scene_graph::KDLStateSolver, and tesseract::scene_graph::OFKTStateSolver.

◆ getActiveJointIds()

virtual std::vector< tesseract::common::JointId > tesseract::scene_graph::StateSolver::getActiveJointIds ( ) const
pure virtual

Get the vector of active joint IDs which align with the limits.

Implemented in tesseract::scene_graph::KDLStateSolver, and tesseract::scene_graph::OFKTStateSolver.

◆ getBaseLinkId()

virtual tesseract::common::LinkId tesseract::scene_graph::StateSolver::getBaseLinkId ( ) const
pure virtual

◆ getLinkIds()

virtual std::vector< tesseract::common::LinkId > tesseract::scene_graph::StateSolver::getLinkIds ( ) const
pure virtual

Get the vector of link IDs.

Implemented in tesseract::scene_graph::KDLStateSolver, and tesseract::scene_graph::OFKTStateSolver.

◆ getActiveLinkIds()

virtual std::vector< tesseract::common::LinkId > tesseract::scene_graph::StateSolver::getActiveLinkIds ( ) const
pure virtual

Get the vector of active link IDs.

Implemented in tesseract::scene_graph::KDLStateSolver, and tesseract::scene_graph::OFKTStateSolver.

◆ getStaticLinkIds()

virtual std::vector< tesseract::common::LinkId > tesseract::scene_graph::StateSolver::getStaticLinkIds ( ) const
pure virtual

Get a vector of static link IDs.

Implemented in tesseract::scene_graph::KDLStateSolver, and tesseract::scene_graph::OFKTStateSolver.

◆ isActiveLinkId()

virtual bool tesseract::scene_graph::StateSolver::isActiveLinkId ( const tesseract::common::LinkId & link_id) const
pure virtual

Check if link is an active link.

Parameters
link_idThe link id to check
Returns
True if active, otherwise false

Implemented in tesseract::scene_graph::KDLStateSolver, and tesseract::scene_graph::OFKTStateSolver.

◆ hasLinkId()

virtual bool tesseract::scene_graph::StateSolver::hasLinkId ( const tesseract::common::LinkId & link_id) const
pure virtual

Check if link id exists.

Parameters
link_idThe link id to check for
Returns
True if it exists, otherwise false

Implemented in tesseract::scene_graph::KDLStateSolver, and tesseract::scene_graph::OFKTStateSolver.

◆ getLinkTransforms() [3/3]

virtual tesseract::common::VectorIsometry3d tesseract::scene_graph::StateSolver::getLinkTransforms ( ) const
pure virtual

Get all of the links transforms.

Order should be the same as getLinkIds()

Returns
Get a vector of transforms for all links.

Implemented in tesseract::scene_graph::KDLStateSolver, and tesseract::scene_graph::OFKTStateSolver.

◆ getLinkTransform()

virtual Eigen::Isometry3d tesseract::scene_graph::StateSolver::getLinkTransform ( const tesseract::common::LinkId & link_id) const
pure virtual

Get the transform corresponding to the link.

Returns
Transform and is identity when no transform is available.

Implemented in tesseract::scene_graph::KDLStateSolver, and tesseract::scene_graph::OFKTStateSolver.

◆ getRelativeLinkTransform()

virtual Eigen::Isometry3d tesseract::scene_graph::StateSolver::getRelativeLinkTransform ( const tesseract::common::LinkId & from_link_id,
const tesseract::common::LinkId & to_link_id ) const
pure virtual

Get transform between two links using the current state.

Parameters
from_link_idThe link id the transform should be relative to
to_link_idThe link id to get transform
Returns
The relative transform = inv(Transform(from_link_id)) * Transform(to_link_id)

Implemented in tesseract::scene_graph::KDLStateSolver, and tesseract::scene_graph::OFKTStateSolver.

◆ getLimits()

virtual tesseract::common::KinematicLimits tesseract::scene_graph::StateSolver::getLimits ( ) const
pure virtual

Getter for kinematic limits.

Returns
The kinematic limits

Implemented in tesseract::scene_graph::KDLStateSolver, and tesseract::scene_graph::OFKTStateSolver.