SMACC2
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)
 
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)
 
- 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)
 
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_
 
std::string groupName_
 

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()

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

Definition at line 31 of file cl_movegroup.cpp.

31: groupName_(groupName) { rclcpp::sleep_for(10s); }

References service_node_3::s.

◆ ~ClMoveGroup()

cl_move_group_interface::ClMoveGroup::~ClMoveGroup ( )
virtual

Definition at line 33 of file cl_movegroup.cpp.

33{}

Member Function Documentation

◆ onInitialize()

void cl_move_group_interface::ClMoveGroup::onInitialize ( )
overridevirtual

Reimplemented from smacc2::ISmaccClient.

Definition at line 35 of file cl_movegroup.cpp.

36{
37 moveGroupClientInterface = std::make_shared<MoveGroupInterface>(getNode(), groupName_);
38 planningSceneInterface = std::make_shared<PlanningSceneInterface>();
39}
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(), groupName_, moveGroupClientInterface, 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 119 of file cl_movegroup.hpp.

120 {
122 }
smacc2::SmaccSignal< void()> onFailed_
ISmaccStateMachine * getStateMachine()
boost::signals2::connection createSignalConnection(TSmaccSignal &signal, TMemberFunctionPrototype callback, TSmaccObjectType *object)
void callback(const image_tools::ROSCvMatContainer &img)

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 113 of file cl_movegroup.hpp.

114 {
116 }
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 99 of file cl_movegroup.hpp.

100 {
102 this->onSucceded_();
103 this->postEvent<EvMoveGroupMotionExecutionSucceded<TSourceObject, TOrthogonal>>();
104 };
105
107 this->onFailed_();
108 this->postEvent<EvMoveGroupMotionExecutionFailed<TSourceObject, TOrthogonal>>();
109 };
110 }
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

◆ groupName_

std::string cl_move_group_interface::ClMoveGroup::groupName_
private

Definition at line 131 of file cl_movegroup.hpp.

Referenced by onInitialize().

◆ 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 129 of file cl_movegroup.hpp.

Referenced by onMotionExecutionFailed(), and onOrthogonalAllocation().

◆ onSucceded_

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

Definition at line 128 of file cl_movegroup.hpp.

Referenced by onMotionExecutionSuccedded(), and onOrthogonalAllocation().

◆ 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 126 of file cl_movegroup.hpp.

Referenced by onOrthogonalAllocation(), and postEventMotionExecutionFailed().

◆ postEventMotionExecutionSucceded_

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

Definition at line 125 of file cl_movegroup.hpp.

Referenced by onOrthogonalAllocation(), and postEventMotionExecutionSucceded().


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