SMACC2
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Private Attributes | List of all members
cl_move_group_interface::ClMoveGroup Class Reference

#include <cl_movegroup.hpp>

Inheritance diagram for cl_move_group_interface::ClMoveGroup:
Inheritance graph
Collaboration diagram for cl_move_group_interface::ClMoveGroup:
Collaboration graph

Public Member Functions

 ClMoveGroup (std::string groupName)
 
 ClMoveGroup (const moveit::planning_interface::MoveGroupInterface::Options &options)
 
virtual ~ClMoveGroup ()
 
void onInitialize () override
 
void postEventMotionExecutionSucceded ()
 
void postEventMotionExecutionFailed ()
 
template<typename TOrthogonal , typename TSourceObject >
void onOrthogonalAllocation ()
 
template<typename TCallback , typename T >
boost::signals2::connection onMotionExecutionSuccedded (TCallback callback, T *object)
 
template<typename TCallback , typename T >
boost::signals2::connection onMotionExecutionFailed (TCallback callback, T *object)
 
const moveit::planning_interface::MoveGroupInterface::Options & getOptions () const
 
- Public Member Functions inherited from smacc2::ISmaccClient
 ISmaccClient ()
 
virtual ~ISmaccClient ()
 
virtual void onInitialize ()
 
virtual std::string getName () const
 
template<typename TComponent >
TComponent * getComponent ()
 
template<typename TComponent >
TComponent * getComponent (std::string name)
 
template<typename TComponent >
TComponent * getComponent (int index)
 
virtual smacc2::introspection::TypeInfo::Ptr getType ()
 
ISmaccStateMachinegetStateMachine ()
 
template<typename TSmaccSignal , typename T >
void connectSignal (TSmaccSignal &signal, void(T::*callback)(), T *object)
 
template<typename SmaccClientType >
void requiresClient (SmaccClientType *&storage)
 
void getComponents (std::vector< std::shared_ptr< ISmaccComponent > > &components)
 
const std::vector< std::shared_ptr< ISmaccComponent > > & iterateComponents () const
 
template<typename EventType >
void postEvent (const EventType &ev)
 
template<typename EventType >
void postEvent ()
 

Public Attributes

std::shared_ptr< moveit::planning_interface::MoveGroupInterface > moveGroupClientInterface
 
std::shared_ptr< moveit::planning_interface::PlanningSceneInterface > planningSceneInterface
 

Private Attributes

std::function< void()> postEventMotionExecutionSucceded_
 
std::function< void()> postEventMotionExecutionFailed_
 
smacc2::SmaccSignal< void()> onSucceded_
 
smacc2::SmaccSignal< void()> onFailed_
 
moveit::planning_interface::MoveGroupInterface::Options options_
 

Additional Inherited Members

- Protected Member Functions inherited from smacc2::ISmaccClient
template<typename TOrthogonal , typename TSourceObject >
void onOrthogonalAllocation ()
 
template<typename SmaccComponentType , typename TOrthogonal , typename TClient , typename... TArgs>
SmaccComponentType * createComponent (TArgs... targs)
 
template<typename SmaccComponentType , typename TOrthogonal , typename TClient , typename... TArgs>
SmaccComponentType * createNamedComponent (std::string name, TArgs... targs)
 
rclcpp::Node::SharedPtr getNode ()
 
rclcpp::Logger getLogger ()
 
- Protected Attributes inherited from smacc2::ISmaccClient
std::map< ComponentKey, std::shared_ptr< smacc2::ISmaccComponent > > components_
 

Detailed Description

Definition at line 78 of file cl_movegroup.hpp.

Constructor & Destructor Documentation

◆ ClMoveGroup() [1/2]

cl_move_group_interface::ClMoveGroup::ClMoveGroup ( std::string  groupName)

Definition at line 36 of file cl_movegroup.cpp.

36: options_(groupName) {}
moveit::planning_interface::MoveGroupInterface::Options options_

◆ ClMoveGroup() [2/2]

cl_move_group_interface::ClMoveGroup::ClMoveGroup ( const moveit::planning_interface::MoveGroupInterface::Options &  options)

Definition at line 31 of file cl_movegroup.cpp.

32: options_(options)
33{
34}

◆ ~ClMoveGroup()

cl_move_group_interface::ClMoveGroup::~ClMoveGroup ( )
virtual

Definition at line 38 of file cl_movegroup.cpp.

38{}

Member Function Documentation

◆ getOptions()

const moveit::planning_interface::MoveGroupInterface::Options & cl_move_group_interface::ClMoveGroup::getOptions ( ) const

Definition at line 58 of file cl_movegroup.cpp.

59{
60 return options_;
61}

References options_.

◆ onInitialize()

void cl_move_group_interface::ClMoveGroup::onInitialize ( )
overridevirtual

Reimplemented from smacc2::ISmaccClient.

Definition at line 40 of file cl_movegroup.cpp.

41{
42 moveGroupClientInterface = std::make_shared<MoveGroupInterface>(getNode(), options_);
43 planningSceneInterface = std::make_shared<PlanningSceneInterface>(options_.move_group_namespace_);
44}
std::shared_ptr< moveit::planning_interface::MoveGroupInterface > moveGroupClientInterface
std::shared_ptr< moveit::planning_interface::PlanningSceneInterface > planningSceneInterface
rclcpp::Node::SharedPtr getNode()
Definition: client.cpp:60

References smacc2::ISmaccClient::getNode(), moveGroupClientInterface, options_, and planningSceneInterface.

Here is the call graph for this function:

◆ onMotionExecutionFailed()

template<typename TCallback , typename T >
boost::signals2::connection cl_move_group_interface::ClMoveGroup::onMotionExecutionFailed ( TCallback  callback,
T *  object 
)
inline

Definition at line 123 of file cl_movegroup.hpp.

124 {
125 return this->getStateMachine()->createSignalConnection(onFailed_, callback, object);
126 }
smacc2::SmaccSignal< void()> onFailed_
ISmaccStateMachine * getStateMachine()
boost::signals2::connection createSignalConnection(TSmaccSignal &signal, TMemberFunctionPrototype callback, TSmaccObjectType *object)

References smacc2::ISmaccStateMachine::createSignalConnection(), smacc2::ISmaccClient::getStateMachine(), and onFailed_.

Here is the call graph for this function:

◆ onMotionExecutionSuccedded()

template<typename TCallback , typename T >
boost::signals2::connection cl_move_group_interface::ClMoveGroup::onMotionExecutionSuccedded ( TCallback  callback,
T *  object 
)
inline

Definition at line 117 of file cl_movegroup.hpp.

118 {
119 return this->getStateMachine()->createSignalConnection(onSucceded_, callback, object);
120 }
smacc2::SmaccSignal< void()> onSucceded_

References smacc2::ISmaccStateMachine::createSignalConnection(), smacc2::ISmaccClient::getStateMachine(), and onSucceded_.

Here is the call graph for this function:

◆ onOrthogonalAllocation()

template<typename TOrthogonal , typename TSourceObject >
void cl_move_group_interface::ClMoveGroup::onOrthogonalAllocation ( )
inline

Definition at line 101 of file cl_movegroup.hpp.

102 {
104 {
105 this->onSucceded_();
106 this->postEvent<EvMoveGroupMotionExecutionSucceded<TSourceObject, TOrthogonal>>();
107 };
108
110 {
111 this->onFailed_();
112 this->postEvent<EvMoveGroupMotionExecutionFailed<TSourceObject, TOrthogonal>>();
113 };
114 }
std::function< void()> postEventMotionExecutionSucceded_
std::function< void()> postEventMotionExecutionFailed_

References onFailed_, onSucceded_, postEventMotionExecutionFailed_, and postEventMotionExecutionSucceded_.

◆ postEventMotionExecutionFailed()

void cl_move_group_interface::ClMoveGroup::postEventMotionExecutionFailed ( )

◆ postEventMotionExecutionSucceded()

void cl_move_group_interface::ClMoveGroup::postEventMotionExecutionSucceded ( )

Member Data Documentation

◆ moveGroupClientInterface

std::shared_ptr<moveit::planning_interface::MoveGroupInterface> cl_move_group_interface::ClMoveGroup::moveGroupClientInterface

◆ onFailed_

smacc2::SmaccSignal<void()> cl_move_group_interface::ClMoveGroup::onFailed_
private

Definition at line 135 of file cl_movegroup.hpp.

Referenced by onMotionExecutionFailed(), and onOrthogonalAllocation().

◆ onSucceded_

smacc2::SmaccSignal<void()> cl_move_group_interface::ClMoveGroup::onSucceded_
private

Definition at line 134 of file cl_movegroup.hpp.

Referenced by onMotionExecutionSuccedded(), and onOrthogonalAllocation().

◆ options_

moveit::planning_interface::MoveGroupInterface::Options cl_move_group_interface::ClMoveGroup::options_
private

Definition at line 138 of file cl_movegroup.hpp.

Referenced by getOptions(), and onInitialize().

◆ planningSceneInterface

std::shared_ptr<moveit::planning_interface::PlanningSceneInterface> cl_move_group_interface::ClMoveGroup::planningSceneInterface

◆ postEventMotionExecutionFailed_

std::function<void()> cl_move_group_interface::ClMoveGroup::postEventMotionExecutionFailed_
private

Definition at line 132 of file cl_movegroup.hpp.

Referenced by onOrthogonalAllocation(), and postEventMotionExecutionFailed().

◆ postEventMotionExecutionSucceded_

std::function<void()> cl_move_group_interface::ClMoveGroup::postEventMotionExecutionSucceded_
private

Definition at line 131 of file cl_movegroup.hpp.

Referenced by onOrthogonalAllocation(), and postEventMotionExecutionSucceded().


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