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

A mutable state solver allows you to reconfigure the solver's links and joints. More...

#include <mutable_state_solver.h>

Inheritance diagram for tesseract::scene_graph::MutableStateSolver:

Public Types

using Ptr = std::shared_ptr<MutableStateSolver>
using ConstPtr = std::shared_ptr<const MutableStateSolver>
using UPtr = std::unique_ptr<MutableStateSolver>
using ConstUPtr = std::unique_ptr<const MutableStateSolver>
Public Types inherited from tesseract::scene_graph::StateSolver
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

 MutableStateSolver (const MutableStateSolver &)=default
MutableStateSolver & operator= (const MutableStateSolver &)=default
 MutableStateSolver (MutableStateSolver &&)=default
MutableStateSolver & operator= (MutableStateSolver &&)=default
virtual void setRevision (int revision)=0
 Set the state solver revision number.
virtual int getRevision () const =0
 Get the state solver revision number.
virtual bool addLink (const Link &link, const Joint &joint)=0
 Adds a link/joint to the solver.
virtual bool moveLink (const Joint &joint)=0
 Move a link.
virtual bool removeLink (const tesseract::common::LinkId &link_id)=0
 Removes a link from the graph.
virtual bool replaceJoint (const Joint &joint)=0
 Replace and existing joint with the provided one.
virtual bool removeJoint (const tesseract::common::JointId &joint_id)=0
 Removes a joint from the graph.
virtual bool moveJoint (const tesseract::common::JointId &joint_id, const tesseract::common::LinkId &parent_link_id)=0
 Move joint to new parent link.
virtual bool changeJointOrigin (const tesseract::common::JointId &joint_id, const Eigen::Isometry3d &new_origin)=0
 Changes the "origin" transform of the joint and recomputes the associated edge.
virtual bool changeJointPositionLimits (const tesseract::common::JointId &joint_id, double lower, double upper)=0
 Changes the position limits associated with a joint.
virtual bool changeJointVelocityLimits (const tesseract::common::JointId &joint_id, double limit)=0
 Changes the velocity limits associated with a joint.
virtual bool changeJointAccelerationLimits (const tesseract::common::JointId &joint_id, double limit)=0
 Changes the acceleration limits associated with a joint.
virtual bool changeJointJerkLimits (const tesseract::common::JointId &joint_id, double limit)=0
 Changes the jerk limits associated with a joint.
virtual bool insertSceneGraph (const SceneGraph &scene_graph, const Joint &joint, const std::string &prefix="")=0
 Merge a scene into the current solver.
Public Member Functions inherited from tesseract::scene_graph::StateSolver
 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.

Detailed Description

A mutable state solver allows you to reconfigure the solver's links and joints.

Member Function Documentation

◆ setRevision()

virtual void tesseract::scene_graph::MutableStateSolver::setRevision ( int revision)
pure virtual

Set the state solver revision number.

Parameters
revisionThe revision number to assign

Implemented in tesseract::scene_graph::OFKTStateSolver.

◆ getRevision()

virtual int tesseract::scene_graph::MutableStateSolver::getRevision ( ) const
pure virtual

Get the state solver revision number.

Returns
revision number

Implemented in tesseract::scene_graph::OFKTStateSolver.

◆ addLink()

virtual bool tesseract::scene_graph::MutableStateSolver::addLink ( const Link & link,
const Joint & joint )
pure virtual

Adds a link/joint to the solver.

Parameters
linkThe link to be added to the graph
jointThe associated joint to be added to the graph
Returns
Return False if a link with the same name allready exists, otherwise true

Implemented in tesseract::scene_graph::OFKTStateSolver.

◆ moveLink()

virtual bool tesseract::scene_graph::MutableStateSolver::moveLink ( const Joint & joint)
pure virtual

Move a link.

Parameters
jointThe associated joint that defines the move
Returns
Return False if link does not exist or if joint name already exists, otherwise true

Implemented in tesseract::scene_graph::OFKTStateSolver.

◆ removeLink()

virtual bool tesseract::scene_graph::MutableStateSolver::removeLink ( const tesseract::common::LinkId & link_id)
pure virtual

Removes a link from the graph.

Note: this will remove all inbound and outbound edges

Parameters
link_idId of the link to be removed
Returns
Return False if a link does not exists, otherwise true

Implemented in tesseract::scene_graph::OFKTStateSolver.

◆ replaceJoint()

virtual bool tesseract::scene_graph::MutableStateSolver::replaceJoint ( const Joint & joint)
pure virtual

Replace and existing joint with the provided one.

Parameters
jointThe replacement joint
Returns
Return False if a joint does not exists, otherwise true

Implemented in tesseract::scene_graph::OFKTStateSolver.

◆ removeJoint()

virtual bool tesseract::scene_graph::MutableStateSolver::removeJoint ( const tesseract::common::JointId & joint_id)
pure virtual

Removes a joint from the graph.

Parameters
joint_idId of the joint to be removed
Returns
Return False if a joint does not exists, otherwise true

Implemented in tesseract::scene_graph::OFKTStateSolver.

◆ moveJoint()

virtual bool tesseract::scene_graph::MutableStateSolver::moveJoint ( const tesseract::common::JointId & joint_id,
const tesseract::common::LinkId & parent_link_id )
pure virtual

Move joint to new parent link.

Parameters
joint_idId of the joint to move
parent_link_idId of parent link to move to
Returns
Returns true if successful, otherwise false.

Implemented in tesseract::scene_graph::OFKTStateSolver.

◆ changeJointOrigin()

virtual bool tesseract::scene_graph::MutableStateSolver::changeJointOrigin ( const tesseract::common::JointId & joint_id,
const Eigen::Isometry3d & new_origin )
pure virtual

Changes the "origin" transform of the joint and recomputes the associated edge.

Parameters
joint_idId of the joint to be changed
new_originThe new transform associated with the joint
Returns
True if successful.

Implemented in tesseract::scene_graph::OFKTStateSolver.

◆ changeJointPositionLimits()

virtual bool tesseract::scene_graph::MutableStateSolver::changeJointPositionLimits ( const tesseract::common::JointId & joint_id,
double lower,
double upper )
pure virtual

Changes the position limits associated with a joint.

Parameters
joint_idId of the joint to be updated
limitsNew position limits to be set as the joint limits @returnTrue if successful.

Implemented in tesseract::scene_graph::OFKTStateSolver.

◆ changeJointVelocityLimits()

virtual bool tesseract::scene_graph::MutableStateSolver::changeJointVelocityLimits ( const tesseract::common::JointId & joint_id,
double limit )
pure virtual

Changes the velocity limits associated with a joint.

Parameters
joint_idId of the joint to be updated
limitsNew velocity limits to be set as the joint limits
Returns

Implemented in tesseract::scene_graph::OFKTStateSolver.

◆ changeJointAccelerationLimits()

virtual bool tesseract::scene_graph::MutableStateSolver::changeJointAccelerationLimits ( const tesseract::common::JointId & joint_id,
double limit )
pure virtual

Changes the acceleration limits associated with a joint.

Parameters
joint_idId of the joint to be updated
limitsNew acceleration limits to be set as the joint limits
Returns

Implemented in tesseract::scene_graph::OFKTStateSolver.

◆ changeJointJerkLimits()

virtual bool tesseract::scene_graph::MutableStateSolver::changeJointJerkLimits ( const tesseract::common::JointId & joint_id,
double limit )
pure virtual

Changes the jerk limits associated with a joint.

Parameters
joint_idId of the joint to be updated
limitsNew jerk limits to be set as the joint limits
Returns

Implemented in tesseract::scene_graph::OFKTStateSolver.

◆ insertSceneGraph()

virtual bool tesseract::scene_graph::MutableStateSolver::insertSceneGraph ( const SceneGraph & scene_graph,
const Joint & joint,
const std::string & prefix = "" )
pure virtual

Merge a scene into the current solver.

Parameters
scene_graphConst ref to the graph to be merged
jointThe joint that connects current scene with the inserted scene
prefixstring Will be prepended to every link and joint of the merged scene
Returns
Return False if any link or joint name collides with current solver, otherwise True The prefix argument is meant to allow adding multiple copies of the same subgraph with different names

Implemented in tesseract::scene_graph::OFKTStateSolver.