Tesseract 0.28.4
Loading...
Searching...
No Matches
tesseract::environment::Environment Class Reference

Public Types

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

Public Member Functions

 Environment ()
 Default constructor.
 Environment (const Environment &)=delete
Environment & operator= (const Environment &)=delete
 Environment (Environment &&)=delete
Environment & operator= (Environment &&)=delete
bool init (const std::vector< std::shared_ptr< const Command > > &commands)
 Initialize the Environment.
bool init (const tesseract::scene_graph::SceneGraph &scene_graph, const std::shared_ptr< const tesseract::srdf::SRDFModel > &srdf_model=nullptr)
 Initialize the Environment.
bool init (const std::string &urdf_string, const std::shared_ptr< const tesseract::common::ResourceLocator > &locator)
bool init (const std::string &urdf_string, const std::string &srdf_string, const std::shared_ptr< const tesseract::common::ResourceLocator > &locator)
bool init (const std::filesystem::path &urdf_path, const std::shared_ptr< const tesseract::common::ResourceLocator > &locator)
bool init (const std::filesystem::path &urdf_path, const std::filesystem::path &srdf_path, const std::shared_ptr< const tesseract::common::ResourceLocator > &locator)
Environment::UPtr clone () const
 Clone the environment.
bool reset ()
 reset to initialized state
void clear ()
 clear content and uninitialized
bool isInitialized () const
 check if the environment is initialized
int getRevision () const
 Get the current revision number.
int getInitRevision () const
 Get the initialization revision number.
std::vector< std::shared_ptr< const Command > > getCommandHistory () const
 Get Environment command history post initialization.
bool applyCommands (const std::vector< std::shared_ptr< const Command > > &commands)
 Applies the commands to the environment.
bool applyCommand (std::shared_ptr< const Command > command)
 Apply command to the environment.
std::shared_ptr< const tesseract::scene_graph::SceneGraph > getSceneGraph () const
 Get the Scene Graph.
std::vector< tesseract::common::JointId > getGroupJointIds (const std::string &group_name) const
 Get a groups joint IDs.
std::shared_ptr< const tesseract::kinematics::JointGroup > getJointGroup (const std::string &group_name) const
 Get a joint group by name.
std::shared_ptr< const tesseract::kinematics::JointGroup > getJointGroup (const std::string &name, const std::vector< tesseract::common::JointId > &joint_ids) const
 Get a joint group given a vector of joint ids.
std::shared_ptr< const tesseract::kinematics::KinematicGroup > getKinematicGroup (const std::string &group_name, const std::string &ik_solver_name="") const
 Get a kinematic group given group name and solver name.
Eigen::Isometry3d findTCPOffset (const tesseract::common::ManipulatorInfo &manip_info) const
 Find tool center point provided in the manipulator info.
void addFindTCPOffsetCallback (const FindTCPOffsetCallbackFn &fn)
 This allows for user defined callbacks for looking up TCP information.
std::vector< FindTCPOffsetCallbackFn > getFindTCPOffsetCallbacks () const
 This get the current find tcp callbacks stored in the environment.
void addEventCallback (std::size_t hash, const EventCallbackFn &fn)
 Add an event callback function.
void removeEventCallback (std::size_t hash)
 Remove event callbacks.
void clearEventCallbacks ()
 clear all event callbacks
std::map< std::size_t, EventCallbackFn > getEventCallbacks () const
 Get the current event callbacks stored in the environment.
void setResourceLocator (std::shared_ptr< const tesseract::common::ResourceLocator > locator)
 Set resource locator for environment.
std::shared_ptr< const tesseract::common::ResourceLocator > getResourceLocator () const
 Get the resource locator assigned.
void setName (const std::string &name)
 Give the environment a name.
const std::string & getName () const
 Get the name of the environment.
void setState (const tesseract::scene_graph::SceneState::JointValues &joint_values, const tesseract::common::JointIdTransformMap &floating_joints={})
 Set the current state of the environment.
void setState (const std::vector< tesseract::common::JointId > &joint_ids, const Eigen::Ref< const Eigen::VectorXd > &joint_values, const tesseract::common::JointIdTransformMap &floating_joints={})
void setState (const tesseract::common::JointIdTransformMap &floating_joints)
 Set the current state of the floating joint values.
tesseract::scene_graph::SceneState getState (const tesseract::scene_graph::SceneState::JointValues &joint_values, const tesseract::common::JointIdTransformMap &floating_joints={}) const
 Get the state of the environment for a given set or subset of joint values.
tesseract::scene_graph::SceneState getState (const std::vector< tesseract::common::JointId > &joint_ids, const Eigen::Ref< const Eigen::VectorXd > &joint_values, const tesseract::common::JointIdTransformMap &floating_joints={}) const
tesseract::scene_graph::SceneState getState (const tesseract::common::JointIdTransformMap &floating_joints) const
 Get the state given floating joint values.
tesseract::scene_graph::SceneState getState () const
 Get the current state of the environment.
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_joints) const
 Get the link transforms of the scene for a given set or subset of joint values.
void getLinkTransforms (tesseract::common::LinkIdTransformMap &link_transforms, const std::vector< tesseract::common::JointId > &joint_ids, const Eigen::Ref< const Eigen::VectorXd > &joint_values) const
 Get the link transforms of the scene for a given set or subset of joint values.
std::chrono::system_clock::time_point getTimestamp () const
 Last update time. Updated when any change to the environment occurs.
std::chrono::system_clock::time_point getCurrentStateTimestamp () const
 Last update time to current state. Updated only when current state is updated.
std::shared_ptr< const tesseract::scene_graph::Link > getLink (const common::LinkId &id) const
 Get a link in the environment.
std::shared_ptr< const tesseract::scene_graph::Joint > getJoint (const common::JointId &id) const
 Get joint by id.
std::shared_ptr< const tesseract::scene_graph::JointLimits > getJointLimits (const common::JointId &joint_id) const
 Gets the limits associated with a joint.
bool getLinkCollisionEnabled (const common::LinkId &id) const
 Get whether a link should be considered during collision checking.
bool getLinkVisibility (const common::LinkId &id) const
 Get a given links visibility setting.
std::shared_ptr< const tesseract::common::AllowedCollisionMatrix > getAllowedCollisionMatrix () const
 Get the allowed collision matrix.
std::vector< tesseract::common::JointId > getJointIds () const
 Get a vector of joint IDs in the environment.
std::vector< tesseract::common::JointId > getActiveJointIds () const
 Get a vector of active joint IDs in the environment.
Eigen::VectorXd getCurrentJointValues () const
 Get the current state of the environment.
Eigen::VectorXd getCurrentJointValues (const std::vector< tesseract::common::JointId > &joint_ids) const
 Get the current joint values for a vector of joints by id.
tesseract::common::JointIdTransformMap getCurrentFloatingJointValues () const
 Get the current floating joint values.
tesseract::common::JointIdTransformMap getCurrentFloatingJointValues (const std::vector< tesseract::common::JointId > &joint_ids) const
 Get the current floating joint values by id.
tesseract::common::LinkId getRootLinkId () const
 Get the root link id.
std::vector< tesseract::common::LinkId > getLinkIds () const
 Get a vector of link IDs in the environment.
std::vector< tesseract::common::LinkId > getActiveLinkIds () const
 Get a vector of active link IDs in the environment.
std::vector< tesseract::common::LinkId > getActiveLinkIds (const std::vector< tesseract::common::JointId > &joint_ids) const
 Get a vector of active link ids affected by the provided joints in the environment.
std::vector< tesseract::common::LinkId > getStaticLinkIds () const
 Get a vector of static link ids in the environment.
std::vector< tesseract::common::LinkId > getStaticLinkIds (const std::vector< tesseract::common::JointId > &joint_ids) const
 Get a vector of static link ids not affected by the provided joints in the environment.
tesseract::common::VectorIsometry3d getLinkTransforms () const
 Get all of the links transforms.
Eigen::Isometry3d getLinkTransform (const tesseract::common::LinkId &link_id) const
 Get the transform corresponding to the link.
Eigen::Isometry3d getRelativeLinkTransform (const tesseract::common::LinkId &from_link_id, const tesseract::common::LinkId &to_link_id) const
 Get transform between two links using the current state.
std::unique_ptr< tesseract::scene_graph::StateSolver > getStateSolver () const
 Returns a clone of the environments state solver.
tesseract::srdf::KinematicsInformation getKinematicsInformation () const
 Get the kinematics information.
std::set< std::string > getGroupNames () const
 Get the available group names.
tesseract::common::ContactManagersPluginInfo getContactManagersPluginInfo () const
 Get the contact managers plugin information.
bool setActiveDiscreteContactManager (const std::string &name)
 Set the active discrete contact manager.
std::unique_ptr< tesseract::collision::DiscreteContactManager > getDiscreteContactManager () const
 Get a copy of the environments active discrete contact manager.
void clearCachedDiscreteContactManager () const
 Set the cached internal copy of the environments active discrete contact manager not nullptr.
std::unique_ptr< tesseract::collision::DiscreteContactManager > getDiscreteContactManager (const std::string &name) const
 Get a copy of the environments available discrete contact manager by name.
bool setActiveContinuousContactManager (const std::string &name)
 Set the active continuous contact manager.
std::unique_ptr< tesseract::collision::ContinuousContactManager > getContinuousContactManager () const
 Get a copy of the environments active continuous contact manager.
void clearCachedContinuousContactManager () const
 Set the cached internal copy of the environments active continuous contact manager not nullptr.
std::unique_ptr< tesseract::collision::ContinuousContactManager > getContinuousContactManager (const std::string &name) const
 Get a copy of the environments available continuous contact manager by name.
tesseract::common::CollisionMarginData getCollisionMarginData () const
 Get the environment collision margin data.
std::shared_lock< std::shared_mutex > lockRead () const
 Lock the environment when wanting to make multiple reads.
bool operator== (const Environment &rhs) const
 These operators are to facilitate checking serialization but may have value elsewhere.
bool operator!= (const Environment &rhs) const
 Environment (std::unique_ptr< Implementation > impl)
 This should only be used by the clone method.

Friends

template<class Archive>
friend void::tesseract::environment::serialize (Archive &ar, Environment &obj)

Member Function Documentation

◆ init() [1/2]

bool tesseract::environment::Environment::init ( const std::vector< std::shared_ptr< const Command > > & commands)

Initialize the Environment.

The template class provided should be a derived class from StateSolver.

Parameters
scene_graphThe scene graph to initialize the environment.
Returns
True if successful, otherwise false

◆ init() [2/2]

bool tesseract::environment::Environment::init ( const tesseract::scene_graph::SceneGraph & scene_graph,
const std::shared_ptr< const tesseract::srdf::SRDFModel > & srdf_model = nullptr )

Initialize the Environment.

The template class provided should be a derived class from StateSolver.

Parameters
scene_graphThe scene graph to initialize the environment.
Returns
True if successful, otherwise false

◆ clone()

Environment::UPtr tesseract::environment::Environment::clone ( ) const

Clone the environment.

Returns
A clone of the environment

◆ reset()

bool tesseract::environment::Environment::reset ( )

reset to initialized state

If the environment has not been initialized then this returns false

Returns
True if environment was successfully reset, otherwise false.

◆ getRevision()

int tesseract::environment::Environment::getRevision ( ) const

Get the current revision number.

Returns
Revision number

◆ getInitRevision()

int tesseract::environment::Environment::getInitRevision ( ) const

Get the initialization revision number.

Returns
Initialization revision number

◆ getCommandHistory()

std::vector< std::shared_ptr< const Command > > tesseract::environment::Environment::getCommandHistory ( ) const

Get Environment command history post initialization.

Returns
List of commands

◆ applyCommands()

bool tesseract::environment::Environment::applyCommands ( const std::vector< std::shared_ptr< const Command > > & commands)

Applies the commands to the environment.

Parameters
commandsCommands to be applied to the environment
Returns
true if successful. If returned false, then only a partial set of commands have been applied. Call getCommandHistory to check. Some commands are not checked for success

◆ applyCommand()

bool tesseract::environment::Environment::applyCommand ( std::shared_ptr< const Command > command)

Apply command to the environment.

Parameters
commandCommand to be applied to the environment
Returns
true if successful. If returned false, then the command have not been applied. Some type of Command are not checked for success

◆ getSceneGraph()

std::shared_ptr< const tesseract::scene_graph::SceneGraph > tesseract::environment::Environment::getSceneGraph ( ) const

Get the Scene Graph.

Returns
SceneGraphConstPtr

◆ getJointGroup() [1/2]

std::shared_ptr< const tesseract::kinematics::JointGroup > tesseract::environment::Environment::getJointGroup ( const std::string & group_name) const

Get a joint group by name.

Parameters
group_nameThe group name
Returns
A joint group

◆ getJointGroup() [2/2]

std::shared_ptr< const tesseract::kinematics::JointGroup > tesseract::environment::Environment::getJointGroup ( const std::string & name,
const std::vector< tesseract::common::JointId > & joint_ids ) const

Get a joint group given a vector of joint ids.

Parameters
nameThe name to assign to the joint group
joint_idsThe joint ids that make up the group
Returns
A joint group

◆ getKinematicGroup()

std::shared_ptr< const tesseract::kinematics::KinematicGroup > tesseract::environment::Environment::getKinematicGroup ( const std::string & group_name,
const std::string & ik_solver_name = "" ) const

Get a kinematic group given group name and solver name.

If ik_solver_name is empty it will choose the first ik solver for the group

Parameters
group_nameThe group name
ik_solver_nameThe IK solver name
Returns
A kinematics group

◆ findTCPOffset()

Eigen::Isometry3d tesseract::environment::Environment::findTCPOffset ( const tesseract::common::ManipulatorInfo & manip_info) const

Find tool center point provided in the manipulator info.

If manipulator information tcp is defined as a string it does the following

  • First check if manipulator info is empty or already an Isometry3d, if so return identity
  • Next if not, it checks if the tcp offset name is a link in the environment if so throw an exception.
  • Next if not found, it looks up the tcp name in the SRDF kinematics information
  • Next if not found, it leverages the user defined callbacks to try an locate the tcp information.
  • Next throw an exception, because no tcp information was located.
Parameters
manip_infoThe manipulator info
Returns
The tool center point

◆ addFindTCPOffsetCallback()

void tesseract::environment::Environment::addFindTCPOffsetCallback ( const FindTCPOffsetCallbackFn & fn)

This allows for user defined callbacks for looking up TCP information.

Parameters
fnUser defined callback function for locating TCP information

◆ getFindTCPOffsetCallbacks()

std::vector< FindTCPOffsetCallbackFn > tesseract::environment::Environment::getFindTCPOffsetCallbacks ( ) const

This get the current find tcp callbacks stored in the environment.

Returns
A vector of callback functions

◆ addEventCallback()

void tesseract::environment::Environment::addEventCallback ( std::size_t hash,
const EventCallbackFn & fn )

Add an event callback function.

When these get called they are protected by a unique lock internally so if the callback is a long event it can impact performance.

Note
These do not get cloned or serialized
Parameters
hashThe id associated with the callback to allow removal. It is recommended to use std::hash<Object*>{}(this) to associate the callback with the class it associated with.
fnUser defined callback function which gets called for different event triggers

◆ removeEventCallback()

void tesseract::environment::Environment::removeEventCallback ( std::size_t hash)

Remove event callbacks.

Parameters
hashthe id associated with the callback to be removed

◆ getEventCallbacks()

std::map< std::size_t, EventCallbackFn > tesseract::environment::Environment::getEventCallbacks ( ) const

Get the current event callbacks stored in the environment.

Returns
A map of callback functions

◆ setResourceLocator()

void tesseract::environment::Environment::setResourceLocator ( std::shared_ptr< const tesseract::common::ResourceLocator > locator)

Set resource locator for environment.

Parameters
locatorThe resource locator

◆ getResourceLocator()

std::shared_ptr< const tesseract::common::ResourceLocator > tesseract::environment::Environment::getResourceLocator ( ) const

Get the resource locator assigned.

This can be a nullptr

Returns
The resource locator assigned to the environment

◆ getName()

const std::string & tesseract::environment::Environment::getName ( ) const

Get the name of the environment.

This may be empty, if so check urdf name

◆ setState() [1/2]

void tesseract::environment::Environment::setState ( const tesseract::scene_graph::SceneState::JointValues & joint_values,
const tesseract::common::JointIdTransformMap & floating_joints = {} )

Set the current state of the environment.

After updating the current state these function must call currentStateChanged() which will update the contact managers transforms

◆ setState() [2/2]

void tesseract::environment::Environment::setState ( const tesseract::common::JointIdTransformMap & floating_joints)

Set the current state of the floating joint values.

Parameters
floating_joint_valuesThe floating joint values to set

◆ getState() [1/2]

tesseract::scene_graph::SceneState tesseract::environment::Environment::getState ( const tesseract::scene_graph::SceneState::JointValues & joint_values,
const tesseract::common::JointIdTransformMap & floating_joints = {} ) const

Get the state of the environment for a given set or subset of joint values.

This does not change the internal state of the environment.

◆ getState() [2/2]

tesseract::scene_graph::SceneState tesseract::environment::Environment::getState ( const tesseract::common::JointIdTransformMap & floating_joints) const

Get the state given floating joint values.

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

◆ getLinkTransforms() [1/3]

void tesseract::environment::Environment::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_joints ) const

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.

Parameters
link_transformsThe link_transforms to populate with data.
joint_idsThe joints to change.
joint_valuesThe joint values
floating_jointsThe floating joint origin transform

◆ getLinkTransforms() [2/3]

void tesseract::environment::Environment::getLinkTransforms ( tesseract::common::LinkIdTransformMap & link_transforms,
const std::vector< tesseract::common::JointId > & joint_ids,
const Eigen::Ref< const Eigen::VectorXd > & joint_values ) const

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.

Parameters
link_transformsThe link_transforms to populate with data.
joint_idsThe joints to change.
joint_valuesThe joint values

◆ getLink()

std::shared_ptr< const tesseract::scene_graph::Link > tesseract::environment::Environment::getLink ( const common::LinkId & id) const

Get a link in the environment.

Parameters
idThe id of the link
Returns
Return nullptr if link name does not exists, otherwise a pointer to the link

◆ getJoint()

std::shared_ptr< const tesseract::scene_graph::Joint > tesseract::environment::Environment::getJoint ( const common::JointId & id) const

Get joint by id.

Parameters
idThe id of the joint
Returns
Joint Const Pointer

◆ getJointLimits()

std::shared_ptr< const tesseract::scene_graph::JointLimits > tesseract::environment::Environment::getJointLimits ( const common::JointId & joint_id) const

Gets the limits associated with a joint.

Parameters
joint_idId of the joint to be updated
Returns
The joint limits set for the given joint

◆ getLinkCollisionEnabled()

bool tesseract::environment::Environment::getLinkCollisionEnabled ( const common::LinkId & id) const

Get whether a link should be considered during collision checking.

Returns
True if should be considered during collision checking, otherwise false

◆ getLinkVisibility()

bool tesseract::environment::Environment::getLinkVisibility ( const common::LinkId & id) const

Get a given links visibility setting.

Returns
True if should be visible, otherwise false

◆ getAllowedCollisionMatrix()

std::shared_ptr< const tesseract::common::AllowedCollisionMatrix > tesseract::environment::Environment::getAllowedCollisionMatrix ( ) const

Get the allowed collision matrix.

Returns
AllowedCollisionMatrixConstPtr

◆ getCurrentJointValues() [1/2]

Eigen::VectorXd tesseract::environment::Environment::getCurrentJointValues ( ) const

Get the current state of the environment.

Order should be the same as getActiveJointIds()

Returns
A vector of joint values

◆ getCurrentJointValues() [2/2]

Eigen::VectorXd tesseract::environment::Environment::getCurrentJointValues ( const std::vector< tesseract::common::JointId > & joint_ids) const

Get the current joint values for a vector of joints by id.

Order should be the same as the input vector

Returns
A vector of joint values

◆ getCurrentFloatingJointValues() [1/2]

tesseract::common::JointIdTransformMap tesseract::environment::Environment::getCurrentFloatingJointValues ( ) const

Get the current floating joint values.

Returns
The joint origin transform for the floating joint

◆ getCurrentFloatingJointValues() [2/2]

tesseract::common::JointIdTransformMap tesseract::environment::Environment::getCurrentFloatingJointValues ( const std::vector< tesseract::common::JointId > & joint_ids) const

Get the current floating joint values by id.

Returns
The joint origin transform for the floating joint

◆ getRootLinkId()

tesseract::common::LinkId tesseract::environment::Environment::getRootLinkId ( ) const

Get the root link id.

Returns
Id of the root link

◆ getActiveLinkIds()

std::vector< tesseract::common::LinkId > tesseract::environment::Environment::getActiveLinkIds ( const std::vector< tesseract::common::JointId > & joint_ids) const

Get a vector of active link ids affected by the provided joints in the environment.

Parameters
joint_idsA list of joint ids
Returns
A vector of active link ids

◆ getStaticLinkIds() [1/2]

std::vector< tesseract::common::LinkId > tesseract::environment::Environment::getStaticLinkIds ( ) const

Get a vector of static link ids in the environment.

Returns
A vector of static link ids

◆ getStaticLinkIds() [2/2]

std::vector< tesseract::common::LinkId > tesseract::environment::Environment::getStaticLinkIds ( const std::vector< tesseract::common::JointId > & joint_ids) const

Get a vector of static link ids not affected by the provided joints in the environment.

Parameters
joint_idsA list of joint ids
Returns
A vector of static link ids

◆ getLinkTransforms() [3/3]

tesseract::common::VectorIsometry3d tesseract::environment::Environment::getLinkTransforms ( ) const

Get all of the links transforms.

Order should be the same as getLinkIds()

Returns
Get a vector of transforms for all links in the environment.

◆ getLinkTransform()

Eigen::Isometry3d tesseract::environment::Environment::getLinkTransform ( const tesseract::common::LinkId & link_id) const

Get the transform corresponding to the link.

Returns
Transform and is identity when no transform is available.

◆ getRelativeLinkTransform()

Eigen::Isometry3d tesseract::environment::Environment::getRelativeLinkTransform ( const tesseract::common::LinkId & from_link_id,
const tesseract::common::LinkId & to_link_id ) const

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)

◆ getStateSolver()

std::unique_ptr< tesseract::scene_graph::StateSolver > tesseract::environment::Environment::getStateSolver ( ) const

Returns a clone of the environments state solver.

The Environment::getState contains mutex's which is may not be needed in all motion planners. This allows the user to get snap shot of the environment to calculate the state.

Returns
A clone of the environments state solver

◆ getKinematicsInformation()

tesseract::srdf::KinematicsInformation tesseract::environment::Environment::getKinematicsInformation ( ) const

Get the kinematics information.

Returns
The kinematics information

◆ getGroupNames()

std::set< std::string > tesseract::environment::Environment::getGroupNames ( ) const

Get the available group names.

Returns
The group names

◆ getContactManagersPluginInfo()

tesseract::common::ContactManagersPluginInfo tesseract::environment::Environment::getContactManagersPluginInfo ( ) const

Get the contact managers plugin information.

Returns
The contact managers plugin information

◆ setActiveDiscreteContactManager()

bool tesseract::environment::Environment::setActiveDiscreteContactManager ( const std::string & name)

Set the active discrete contact manager.

Parameters
nameThe name used to register the contact manager
Returns
True of name exists in DiscreteContactManagerFactory

◆ clearCachedDiscreteContactManager()

void tesseract::environment::Environment::clearCachedDiscreteContactManager ( ) const

Set the cached internal copy of the environments active discrete contact manager not nullptr.

This can be useful to save space in the event the environment is being saved

◆ setActiveContinuousContactManager()

bool tesseract::environment::Environment::setActiveContinuousContactManager ( const std::string & name)

Set the active continuous contact manager.

Parameters
nameThe name used to register the contact manager
Returns
True of name exists in ContinuousContactManagerFactory

◆ clearCachedContinuousContactManager()

void tesseract::environment::Environment::clearCachedContinuousContactManager ( ) const

Set the cached internal copy of the environments active continuous contact manager not nullptr.

This can be useful to save space in the event the environment is being saved

◆ lockRead()

std::shared_lock< std::shared_mutex > tesseract::environment::Environment::lockRead ( ) const

Lock the environment when wanting to make multiple reads.

This is useful when making multiple read function calls and don't want the data to get updated between function calls when there a multiple threads updating a single environment

◆ operator==()

bool tesseract::environment::Environment::operator== ( const Environment & rhs) const

These operators are to facilitate checking serialization but may have value elsewhere.

Parameters
rhsThe environment to compare
Returns
True if they are equal otherwise false