Public Types | Public Member Functions | Protected Member Functions | List of all members
moveit::task_constructor::ContainerBase Class Referenceabstract

#include <container.h>

Inheritance diagram for moveit::task_constructor::ContainerBase:
Inheritance graph
[legend]

Public Types

using pointer = std::unique_ptr< ContainerBase >
 
using StageCallback = std::function< bool(const Stage &, unsigned int)>
 
- Public Types inherited from moveit::task_constructor::Stage
using pointer = std::unique_ptr< Stage >
 
enum  PropertyInitializerSource : uint8_t { DEFAULT = 0, MANUAL = 1, PARENT = 2, INTERFACE = 4 }
 
using SolutionCallback = std::function< void(const SolutionBase &)>
 
using SolutionCallbackList = std::list< SolutionCallback >
 

Public Member Functions

void add (Stage::pointer &&stage)
 
virtual bool canCompute () const =0
 
virtual void clear ()
 
virtual void compute ()=0
 
bool explainFailure (std::ostream &os) const override
 
StagefindChild (const std::string &name) const
 
void init (const moveit::core::RobotModelConstPtr &robot_model) override
 
virtual void insert (Stage::pointer &&stage, int before=-1)
 
size_t numChildren () const
 
virtual void onNewSolution (const SolutionBase &s)=0
 called by a (direct) child when a new solution becomes available More...
 
Stageoperator[] (int index) const
 
bool pruning () const
 
virtual Stage::pointer remove (int pos)
 
virtual Stage::pointer remove (Stage *child)
 
void reset () override
 reset stage, clearing all solutions, interfaces, inherited properties. More...
 
void setPruning (bool pruning)
 Explicitly enable/disable pruning. More...
 
bool traverseChildren (const StageCallback &processor) const
 traverse direct children of this container, calling the callback for each of them More...
 
bool traverseRecursively (const StageCallback &processor) const
 traverse all children of this container recursively More...
 
- Public Member Functions inherited from moveit::task_constructor::Stage
SolutionCallbackList::const_iterator addSolutionCallback (SolutionCallback &&cb)
 add function to be called for every newly found solution or failure More...
 
const std::list< SolutionBaseConstPtr > & failures () const
 
std::set< std::string > forwardedProperties () const
 
void forwardProperties (const InterfaceState &source, InterfaceState &dest)
 forwarding of properties between interface states More...
 
double getTotalComputeTime () const
 
Introspectionintrospection () const
 
uint32_t introspectionId () const
 
const std::string & markerNS ()
 marker namespace of solution markers More...
 
const std::string & name () const
 
size_t numFailures () const
 
const ContainerBaseparent () const
 
PropertyMapproperties ()
 Get the stage's property map. More...
 
const PropertyMapproperties () const
 
void removeSolutionCallback (SolutionCallbackList::const_iterator which)
 remove function callback More...
 
void reportPropertyError (const Property::error &e)
 Analyze source of error and report accordingly. More...
 
void setCostTerm (const CostTermConstPtr &term)
 
template<typename T , typename = std::enable_if_t<std::is_constructible<LambdaCostTerm, T>::value>>
void setCostTerm (T term)
 
void setForwardedProperties (const std::set< std::string > &names)
 
void setMarkerNS (const std::string &marker_ns)
 
void setName (const std::string &name)
 
void setProperty (const std::string &name, const boost::any &value)
 Set a previously declared property to a new value. More...
 
void setProperty (const std::string &name, const char *value)
 overload: const char* values are stored as std::string More...
 
void setTimeout (double timeout)
 
void setTrajectoryExecutionInfo (TrajectoryExecutionInfo trajectory_execution_info)
 Set and get info to use when executing the stage's trajectory. More...
 
void silentFailure ()
 Call to increase number of failures w/o storing a (failure) trajectory. More...
 
const ordered< SolutionBaseConstPtr > & solutions () const
 
bool storeFailures () const
 Should we generate failure solutions? Note: Always report a failure! More...
 
double timeout () const
 timeout of stage per computation More...
 
TrajectoryExecutionInfo trajectoryExecutionInfo () const
 
virtual ~Stage ()
 

Protected Member Functions

 ContainerBase (ContainerBasePrivate *impl)
 
- Protected Member Functions inherited from moveit::task_constructor::Stage
 Stage (const Stage &)=delete
 Stage cannot be copied. More...
 
 Stage (StagePrivate *impl)
 Stage can only be instantiated through derived classes. More...
 

Additional Inherited Members

- Protected Attributes inherited from moveit::task_constructor::Stage
StagePrivate * pimpl_
 

Detailed Description

Base class for all container stages, i.e. ones that have one or more children

Definition at line 112 of file container.h.

Member Typedef Documentation

◆ pointer

Definition at line 116 of file container.h.

◆ StageCallback

using moveit::task_constructor::ContainerBase::StageCallback = std::function<bool(const Stage&, unsigned int)>

Callback function type used by traverse functions Receives currently visited Stage and current depth in hierarchy If callback returns false, traversal is stopped.

Definition at line 129 of file container.h.

Constructor & Destructor Documentation

◆ ContainerBase()

moveit::task_constructor::ContainerBase::ContainerBase ( ContainerBasePrivate *  impl)
protected

Member Function Documentation

◆ add()

void moveit::task_constructor::ContainerBase::add ( Stage::pointer &&  stage)

◆ canCompute()

virtual bool moveit::task_constructor::ContainerBase::canCompute ( ) const
pure virtual

◆ clear()

virtual void moveit::task_constructor::ContainerBase::clear ( )
virtual

Reimplemented in moveit::task_constructor::Task.

◆ compute()

virtual void moveit::task_constructor::ContainerBase::compute ( )
pure virtual

◆ explainFailure()

bool moveit::task_constructor::ContainerBase::explainFailure ( std::ostream &  os) const
overridevirtual

Reimplemented from moveit::task_constructor::Stage.

Reimplemented in moveit::task_constructor::Task.

◆ findChild()

Stage* moveit::task_constructor::ContainerBase::findChild ( const std::string &  name) const

◆ init()

void moveit::task_constructor::ContainerBase::init ( const moveit::core::RobotModelConstPtr &  robot_model)
overridevirtual

initialize stage once before planning

When called, properties configured for initialization from parent are already defined. Push interfaces are not yet defined!

Reimplemented from moveit::task_constructor::Stage.

Reimplemented in moveit::task_constructor::Fallbacks, moveit::task_constructor::stages::PickPlaceBase, moveit::task_constructor::stages::SimpleGraspBase, and moveit::task_constructor::stages::PredicateFilter.

◆ insert()

virtual void moveit::task_constructor::ContainerBase::insert ( Stage::pointer &&  stage,
int  before = -1 
)
virtual

◆ numChildren()

size_t moveit::task_constructor::ContainerBase::numChildren ( ) const

◆ onNewSolution()

virtual void moveit::task_constructor::ContainerBase::onNewSolution ( const SolutionBase s)
pure virtual

◆ operator[]()

Stage* moveit::task_constructor::ContainerBase::operator[] ( int  index) const

◆ pruning()

bool moveit::task_constructor::ContainerBase::pruning ( ) const
inline

Definition at line 120 of file container.h.

◆ remove() [1/2]

virtual Stage::pointer moveit::task_constructor::ContainerBase::remove ( int  pos)
virtual

◆ remove() [2/2]

virtual Stage::pointer moveit::task_constructor::ContainerBase::remove ( Stage child)
virtual

◆ reset()

void moveit::task_constructor::ContainerBase::reset ( )
overridevirtual

reset stage, clearing all solutions, interfaces, inherited properties.

Reimplemented from moveit::task_constructor::Stage.

Reimplemented in moveit::task_constructor::Merger, moveit::task_constructor::Fallbacks, moveit::task_constructor::stages::ComputeIK, and moveit::task_constructor::Task.

◆ setPruning()

void moveit::task_constructor::ContainerBase::setPruning ( bool  pruning)
inline

Explicitly enable/disable pruning.

Definition at line 119 of file container.h.

◆ traverseChildren()

bool moveit::task_constructor::ContainerBase::traverseChildren ( const StageCallback processor) const

traverse direct children of this container, calling the callback for each of them

◆ traverseRecursively()

bool moveit::task_constructor::ContainerBase::traverseRecursively ( const StageCallback processor) const

traverse all children of this container recursively


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


core
Author(s):
autogenerated on Sat May 3 2025 02:40:11