Tesseract
Motion Planning Environment
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Attributes | List of all members
tesseract_environment::EnvironmentMonitorInterface Class Referenceabstract

#include <environment_monitor_interface.h>

Collaboration diagram for tesseract_environment::EnvironmentMonitorInterface:
Collaboration graph
[legend]

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)
 
virtual ~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. More...
 
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. More...
 
virtual void addNamespace (std::string monitor_namespace)=0
 Add monitor namespace to interface. More...
 
virtual void removeNamespace (const std::string &monitor_namespace)=0
 Remove monitor namespace from interface. More...
 
virtual std::vector< std::string > applyCommand (const tesseract_environment::Command &command) const =0
 Apply provided command to all monitor namespaces. More...
 
virtual std::vector< std::string > applyCommands (const tesseract_environment::Commands &commands) const =0
 
virtual std::vector< std::string > applyCommands (const std::vector< tesseract_environment::Command > &commands) const =0
 
virtual bool applyCommand (const std::string &monitor_namespace, const tesseract_environment::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. More...
 
virtual bool applyCommands (const std::string &monitor_namespace, const tesseract_environment::Commands &commands) const =0
 
virtual bool applyCommands (const std::string &monitor_namespace, const std::vector< tesseract_environment::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. More...
 
virtual bool setEnvironmentState (const std::string &monitor_namespace, const std::unordered_map< std::string, double > &joints) const =0
 Set environments state in the provided namespace. More...
 
virtual bool setEnvironmentState (const std::string &monitor_namespace, const std::vector< std::string > &joint_names, const std::vector< double > &joint_values) const =0
 
virtual bool setEnvironmentState (const std::string &monitor_namespace, const std::vector< std::string > &joint_names, const Eigen::Ref< const Eigen::VectorXd > &joint_values) const =0
 
virtual std::vector< std::string > setEnvironmentState (const std::unordered_map< std::string, double > &joints) const =0
 Set environment state for all monitor namespaces. More...
 
virtual std::vector< std::string > setEnvironmentState (const std::vector< std::string > &joint_names, const std::vector< double > &joint_values) const =0
 
virtual std::vector< std::string > setEnvironmentState (const std::vector< std::string > &joint_names, const Eigen::Ref< const Eigen::VectorXd > &joint_values) const =0
 
virtual tesseract_environment::Environment::UPtr getEnvironment (const std::string &monitor_namespace) const =0
 Pull information from the environment in the provided namespace and create a Environment Object. More...
 

Protected Attributes

std::string env_name_
 

Member Typedef Documentation

◆ ConstPtr

◆ ConstUPtr

◆ Ptr

◆ UPtr

Constructor & Destructor Documentation

◆ EnvironmentMonitorInterface()

tesseract_environment::EnvironmentMonitorInterface::EnvironmentMonitorInterface ( std::string  env_name)
inline

◆ ~EnvironmentMonitorInterface()

virtual tesseract_environment::EnvironmentMonitorInterface::~EnvironmentMonitorInterface ( )
virtualdefault

Member Function Documentation

◆ addNamespace()

virtual void tesseract_environment::EnvironmentMonitorInterface::addNamespace ( std::string  monitor_namespace)
pure virtual

Add monitor namespace to interface.

Parameters
monitor_namespace

◆ applyCommand() [1/2]

virtual bool tesseract_environment::EnvironmentMonitorInterface::applyCommand ( const std::string &  monitor_namespace,
const tesseract_environment::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

◆ applyCommand() [2/2]

virtual std::vector< std::string > tesseract_environment::EnvironmentMonitorInterface::applyCommand ( const tesseract_environment::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.

◆ applyCommands() [1/4]

virtual bool tesseract_environment::EnvironmentMonitorInterface::applyCommands ( const std::string &  monitor_namespace,
const std::vector< tesseract_environment::Command > &  commands 
) const
pure virtual

◆ applyCommands() [2/4]

virtual bool tesseract_environment::EnvironmentMonitorInterface::applyCommands ( const std::string &  monitor_namespace,
const tesseract_environment::Commands commands 
) const
pure virtual

◆ applyCommands() [3/4]

virtual std::vector< std::string > tesseract_environment::EnvironmentMonitorInterface::applyCommands ( const std::vector< tesseract_environment::Command > &  commands) const
pure virtual

◆ applyCommands() [4/4]

virtual std::vector< std::string > tesseract_environment::EnvironmentMonitorInterface::applyCommands ( const tesseract_environment::Commands commands) const
pure virtual

◆ getEnvironment()

virtual tesseract_environment::Environment::UPtr 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

◆ 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

◆ removeNamespace()

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

Remove monitor namespace from interface.

Parameters
monitor_namespace

◆ setEnvironmentState() [1/6]

virtual bool tesseract_environment::EnvironmentMonitorInterface::setEnvironmentState ( const std::string &  monitor_namespace,
const std::unordered_map< std::string, double > &  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/6]

virtual bool tesseract_environment::EnvironmentMonitorInterface::setEnvironmentState ( const std::string &  monitor_namespace,
const std::vector< std::string > &  joint_names,
const Eigen::Ref< const Eigen::VectorXd > &  joint_values 
) const
pure virtual

◆ setEnvironmentState() [3/6]

virtual bool tesseract_environment::EnvironmentMonitorInterface::setEnvironmentState ( const std::string &  monitor_namespace,
const std::vector< std::string > &  joint_names,
const std::vector< double > &  joint_values 
) const
pure virtual

◆ setEnvironmentState() [4/6]

virtual std::vector< std::string > tesseract_environment::EnvironmentMonitorInterface::setEnvironmentState ( const std::unordered_map< std::string, double > &  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() [5/6]

virtual std::vector< std::string > tesseract_environment::EnvironmentMonitorInterface::setEnvironmentState ( const std::vector< std::string > &  joint_names,
const Eigen::Ref< const Eigen::VectorXd > &  joint_values 
) const
pure virtual

◆ setEnvironmentState() [6/6]

virtual std::vector< std::string > tesseract_environment::EnvironmentMonitorInterface::setEnvironmentState ( const std::vector< std::string > &  joint_names,
const std::vector< double > &  joint_values 
) const
pure virtual

◆ 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

Member Data Documentation

◆ env_name_

std::string tesseract_environment::EnvironmentMonitorInterface::env_name_
protected

The documentation for this class was generated from the following file: