Tesseract 0.28.4
Loading...
Searching...
No Matches
tesseract::environment::EnvironmentMonitorInterface Class Referenceabstract

Public Types

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

Public Member Functions

 EnvironmentMonitorInterface (std::string env_name)
 EnvironmentMonitorInterface (const EnvironmentMonitorInterface &)=default
EnvironmentMonitorInterface & operator= (const EnvironmentMonitorInterface &)=default
 EnvironmentMonitorInterface (EnvironmentMonitorInterface &&)=default
EnvironmentMonitorInterface & operator= (EnvironmentMonitorInterface &&)=default
virtual bool wait (std::chrono::duration< double > duration=std::chrono::seconds(0)) const =0
 This will wait for all namespaces to begin publishing.
virtual bool waitForNamespace (const std::string &monitor_namespace, std::chrono::duration< double > duration=std::chrono::seconds(0)) const =0
 This will wait for a given namespace to begin publishing.
virtual void addNamespace (std::string monitor_namespace)=0
 Add monitor namespace to interface.
virtual void removeNamespace (const std::string &monitor_namespace)=0
 Remove monitor namespace from interface.
virtual std::vector< std::string > applyCommand (const Command &command) const =0
 Apply provided command to all monitor namespaces.
virtual std::vector< std::string > applyCommands (const std::vector< std::shared_ptr< const Command > > &commands) const =0
virtual std::vector< std::string > applyCommands (const std::vector< Command > &commands) const =0
virtual bool applyCommand (const std::string &monitor_namespace, const Command &command) const =0
 Apply provided command to only the provided namespace. The namespace does not have to be one that is currently stored in this class.
virtual bool applyCommands (const std::string &monitor_namespace, const std::vector< std::shared_ptr< const Command > > &commands) const =0
virtual bool applyCommands (const std::string &monitor_namespace, const std::vector< Command > &commands) const =0
virtual tesseract::scene_graph::SceneState getEnvironmentState (const std::string &monitor_namespace) const =0
 Pull current environment state from the environment in the provided namespace.
virtual bool setEnvironmentState (const std::string &monitor_namespace, const tesseract::scene_graph::SceneState::JointValues &joints, const tesseract::common::JointIdTransformMap &floating_joints={}) const =0
 Set environments state in the provided namespace.
virtual bool setEnvironmentState (const std::string &monitor_namespace, const std::vector< tesseract::common::JointId > &joint_ids, const Eigen::Ref< const Eigen::VectorXd > &joint_values, const tesseract::common::JointIdTransformMap &floating_joints={}) const =0
virtual bool setEnvironmentState (const std::string &monitor_namespace, const tesseract::common::JointIdTransformMap &floating_joints) const =0
virtual bool setEnvironmentState (const std::string &monitor_namespace, const std::vector< tesseract::common::JointId > &joint_ids, const std::vector< double > &joint_values, const tesseract::common::JointIdTransformMap &floating_joints={}) const
 Set environment state in the provided namespace.
virtual std::vector< std::string > setEnvironmentState (const tesseract::scene_graph::SceneState::JointValues &joints, const tesseract::common::JointIdTransformMap &floating_joints={}) const =0
 Set environment state for all monitor namespaces.
virtual std::vector< std::string > setEnvironmentState (const std::vector< tesseract::common::JointId > &joint_ids, const Eigen::Ref< const Eigen::VectorXd > &joint_values, const tesseract::common::JointIdTransformMap &floating_joints={}) const =0
virtual std::vector< std::string > setEnvironmentState (const tesseract::common::JointIdTransformMap &floating_joints={}) const =0
virtual std::vector< std::string > setEnvironmentState (const std::vector< tesseract::common::JointId > &joint_ids, const std::vector< double > &joint_values, const tesseract::common::JointIdTransformMap &floating_joints={}) const
 Set environment state for all monitor namespaces.
virtual std::unique_ptr< Environment > getEnvironment (const std::string &monitor_namespace) const =0
 Pull information from the environment in the provided namespace and create a Environment Object.

Protected Attributes

std::string env_name_

Member Function Documentation

◆ wait()

virtual bool tesseract::environment::EnvironmentMonitorInterface::wait ( std::chrono::duration< double > duration = std::chrono::seconds(0)) const
pure virtual

This will wait for all namespaces to begin publishing.

Parameters
durationThe number of seconds to wait before returning, if zero it waits indefinitely
Returns
True if namespace is available, otherwise false

◆ waitForNamespace()

virtual bool tesseract::environment::EnvironmentMonitorInterface::waitForNamespace ( const std::string & monitor_namespace,
std::chrono::duration< double > duration = std::chrono::seconds(0) ) const
pure virtual

This will wait for a given namespace to begin publishing.

Parameters
monitor_namespaceThe namespace to wait for
durationThe number of seconds to wait before returning, if zero it waits indefinitely
Returns
True if namespace is available, otherwise false

◆ addNamespace()

virtual void tesseract::environment::EnvironmentMonitorInterface::addNamespace ( std::string monitor_namespace)
pure virtual

Add monitor namespace to interface.

Parameters
monitor_namespace

◆ removeNamespace()

virtual void tesseract::environment::EnvironmentMonitorInterface::removeNamespace ( const std::string & monitor_namespace)
pure virtual

Remove monitor namespace from interface.

Parameters
monitor_namespace

◆ applyCommand() [1/2]

virtual std::vector< std::string > tesseract::environment::EnvironmentMonitorInterface::applyCommand ( const Command & command) const
pure virtual

Apply provided command to all monitor namespaces.

Parameters
commandThe command to apply
Returns
A vector of failed namespace, if empty all namespace were updated successfully.

◆ applyCommand() [2/2]

virtual bool tesseract::environment::EnvironmentMonitorInterface::applyCommand ( const std::string & monitor_namespace,
const Command & command ) const
pure virtual

Apply provided command to only the provided namespace. The namespace does not have to be one that is currently stored in this class.

Parameters
commandThe command to apply
Returns
True if successful, otherwise false

◆ getEnvironmentState()

virtual tesseract::scene_graph::SceneState tesseract::environment::EnvironmentMonitorInterface::getEnvironmentState ( const std::string & monitor_namespace) const
pure virtual

Pull current environment state from the environment in the provided namespace.

Parameters
monitor_namespaceThe namespace to extract the environment from.
Returns
Environment Shared Pointer, if nullptr it failed

◆ setEnvironmentState() [1/4]

virtual bool tesseract::environment::EnvironmentMonitorInterface::setEnvironmentState ( const std::string & monitor_namespace,
const tesseract::scene_graph::SceneState::JointValues & joints,
const tesseract::common::JointIdTransformMap & floating_joints = {} ) const
pure virtual

Set environments state in the provided namespace.

Parameters
monitor_namespaceThe monitored namespace to set the state
Returns
True if successful, otherwise false

◆ setEnvironmentState() [2/4]

bool tesseract::environment::EnvironmentMonitorInterface::setEnvironmentState ( const std::string & monitor_namespace,
const std::vector< tesseract::common::JointId > & joint_ids,
const std::vector< double > & joint_values,
const tesseract::common::JointIdTransformMap & floating_joints = {} ) const
virtual

Set environment state in the provided namespace.

Parameters
monitor_namespaceThe monitored namespace to set the state
Returns
True if successful, otherwise false

◆ setEnvironmentState() [3/4]

virtual std::vector< std::string > tesseract::environment::EnvironmentMonitorInterface::setEnvironmentState ( const tesseract::scene_graph::SceneState::JointValues & joints,
const tesseract::common::JointIdTransformMap & floating_joints = {} ) const
pure virtual

Set environment state for all monitor namespaces.

Returns
A vector of failed namespace, if empty all namespace were updated successfully.

◆ setEnvironmentState() [4/4]

std::vector< std::string > tesseract::environment::EnvironmentMonitorInterface::setEnvironmentState ( const std::vector< tesseract::common::JointId > & joint_ids,
const std::vector< double > & joint_values,
const tesseract::common::JointIdTransformMap & floating_joints = {} ) const
virtual

Set environment state for all monitor namespaces.

Returns
A vector of failed namespace, if empty all namespace were updated successfully.

◆ getEnvironment()

virtual std::unique_ptr< Environment > tesseract::environment::EnvironmentMonitorInterface::getEnvironment ( const std::string & monitor_namespace) const
pure virtual

Pull information from the environment in the provided namespace and create a Environment Object.

Parameters
monitor_namespaceThe namespace to extract the environment from.
Returns
Environment Shared Pointer, if nullptr it failed