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

#include <cl_moveit2z.hpp>

Inheritance diagram for cl_moveit2z::ClMoveit2z:
Inheritance graph
Collaboration diagram for cl_moveit2z::ClMoveit2z:
Collaboration graph

Public Member Functions

 ClMoveit2z (std::string groupName)
 
 ClMoveit2z (const moveit::planning_interface::MoveGroupInterface::Options &options)
 
virtual ~ClMoveit2z ()
 
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 std::string getName () const
 
template<typename TComponent >
TComponentgetComponent ()
 
template<typename TComponent >
TComponentgetComponent (std::string name)
 
template<typename TComponent >
TComponentgetComponent (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>
SmaccComponentTypecreateComponent (TArgs... targs)
 
template<typename SmaccComponentType , typename TOrthogonal , typename TClient , typename... TArgs>
SmaccComponentTypecreateNamedComponent (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_moveit2z.hpp.

Constructor & Destructor Documentation

◆ ClMoveit2z() [1/2]

cl_moveit2z::ClMoveit2z::ClMoveit2z ( std::string  groupName)

Definition at line 36 of file cl_moveit2z.cpp.

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

◆ ClMoveit2z() [2/2]

cl_moveit2z::ClMoveit2z::ClMoveit2z ( const moveit::planning_interface::MoveGroupInterface::Options &  options)

Definition at line 31 of file cl_moveit2z.cpp.

32: options_(options)
33{
34}

◆ ~ClMoveit2z()

cl_moveit2z::ClMoveit2z::~ClMoveit2z ( )
virtual

Definition at line 38 of file cl_moveit2z.cpp.

38{}

Member Function Documentation

◆ getOptions()

const moveit::planning_interface::MoveGroupInterface::Options & cl_moveit2z::ClMoveit2z::getOptions ( ) const

Definition at line 58 of file cl_moveit2z.cpp.

59{
60 return options_;
61}

References options_.

◆ onInitialize()

void cl_moveit2z::ClMoveit2z::onInitialize ( )
overridevirtual

Reimplemented from smacc2::ISmaccClient.

Definition at line 40 of file cl_moveit2z.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_moveit2z::ClMoveit2z::onMotionExecutionFailed ( TCallback  callback,
T *  object 
)
inline

Definition at line 123 of file cl_moveit2z.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_moveit2z::ClMoveit2z::onMotionExecutionSuccedded ( TCallback  callback,
T *  object 
)
inline

Definition at line 117 of file cl_moveit2z.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_moveit2z::ClMoveit2z::onOrthogonalAllocation ( )
inline

Definition at line 101 of file cl_moveit2z.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()> postEventMotionExecutionFailed_
std::function< void()> postEventMotionExecutionSucceded_

References onFailed_, onSucceded_, postEventMotionExecutionFailed_, and postEventMotionExecutionSucceded_.

◆ postEventMotionExecutionFailed()

void cl_moveit2z::ClMoveit2z::postEventMotionExecutionFailed ( )

◆ postEventMotionExecutionSucceded()

void cl_moveit2z::ClMoveit2z::postEventMotionExecutionSucceded ( )

Member Data Documentation

◆ moveGroupClientInterface

std::shared_ptr<moveit::planning_interface::MoveGroupInterface> cl_moveit2z::ClMoveit2z::moveGroupClientInterface

◆ onFailed_

smacc2::SmaccSignal<void()> cl_moveit2z::ClMoveit2z::onFailed_
private

Definition at line 135 of file cl_moveit2z.hpp.

Referenced by onMotionExecutionFailed(), and onOrthogonalAllocation().

◆ onSucceded_

smacc2::SmaccSignal<void()> cl_moveit2z::ClMoveit2z::onSucceded_
private

Definition at line 134 of file cl_moveit2z.hpp.

Referenced by onMotionExecutionSuccedded(), and onOrthogonalAllocation().

◆ options_

moveit::planning_interface::MoveGroupInterface::Options cl_moveit2z::ClMoveit2z::options_
private

Definition at line 138 of file cl_moveit2z.hpp.

Referenced by getOptions(), and onInitialize().

◆ planningSceneInterface

std::shared_ptr<moveit::planning_interface::PlanningSceneInterface> cl_moveit2z::ClMoveit2z::planningSceneInterface

◆ postEventMotionExecutionFailed_

std::function<void()> cl_moveit2z::ClMoveit2z::postEventMotionExecutionFailed_
private

Definition at line 132 of file cl_moveit2z.hpp.

Referenced by onOrthogonalAllocation(), and postEventMotionExecutionFailed().

◆ postEventMotionExecutionSucceded_

std::function<void()> cl_moveit2z::ClMoveit2z::postEventMotionExecutionSucceded_
private

Definition at line 131 of file cl_moveit2z.hpp.

Referenced by onOrthogonalAllocation(), and postEventMotionExecutionSucceded().


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