SMACC2
Loading...
Searching...
No Matches
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
 
 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 >
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 TClient >
void onComponentInitialization ()
 
template<typename TOrthogonal , typename TSourceObject >
void onOrthogonalAllocation ()
 
template<typename TOrthogonal , typename TSourceObject >
void onStateOrthogonalAllocation ()
 
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_moveit2z.hpp.

Constructor & Destructor Documentation

◆ ClMoveit2z() [1/4]

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

Definition at line 26 of file cl_moveit2z.cpp.

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

◆ ClMoveit2z() [2/4]

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

Definition at line 28 of file cl_moveit2z.cpp.

29: options_(options)
30{
31}

◆ ~ClMoveit2z() [1/2]

cl_moveit2z::ClMoveit2z::~ClMoveit2z ( )
virtual

Definition at line 34 of file cl_moveit2z.cpp.

34{}

◆ ClMoveit2z() [3/4]

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

◆ ClMoveit2z() [4/4]

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

◆ ~ClMoveit2z() [2/2]

virtual cl_moveit2z::ClMoveit2z::~ClMoveit2z ( )
virtual

Member Function Documentation

◆ getOptions() [1/2]

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

Definition at line 142 of file cl_moveit2z.hpp.

143 {
144 return options_;
145 }

References options_.

◆ getOptions() [2/2]

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

◆ onInitialize() [1/2]

void cl_moveit2z::ClMoveit2z::onInitialize ( )
inlineoverridevirtual

Reimplemented from smacc2::ISmaccClient.

Definition at line 94 of file cl_moveit2z.hpp.

95 {
97 std::make_shared<moveit::planning_interface::MoveGroupInterface>(getNode(), options_);
98 planningSceneInterface = std::make_shared<moveit::planning_interface::PlanningSceneInterface>(
99 options_.move_group_namespace_);
100 }
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:

◆ onInitialize() [2/2]

void cl_moveit2z::ClMoveit2z::onInitialize ( )
overridevirtual

Reimplemented from smacc2::ISmaccClient.

◆ onMotionExecutionFailed() [1/2]

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

Definition at line 137 of file cl_moveit2z.hpp.

138 {
139 return this->getStateMachine()->createSignalConnection(onFailed_, callback, object);
140 }
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:

◆ onMotionExecutionFailed() [2/2]

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 }

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

Here is the call graph for this function:

◆ onMotionExecutionSuccedded() [1/2]

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

Definition at line 131 of file cl_moveit2z.hpp.

132 {
133 return this->getStateMachine()->createSignalConnection(onSucceded_, callback, object);
134 }
smacc2::SmaccSignal< void()> onSucceded_

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

Here is the call graph for this function:

◆ onMotionExecutionSuccedded() [2/2]

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 }

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

Here is the call graph for this function:

◆ onOrthogonalAllocation() [1/2]

template<typename TOrthogonal , typename TSourceObject >
void cl_moveit2z::ClMoveit2z::onOrthogonalAllocation ( )
inline

Definition at line 115 of file cl_moveit2z.hpp.

116 {
118 {
119 this->onSucceded_();
121 };
122
124 {
125 this->onFailed_();
127 };
128 }
std::function< void()> postEventMotionExecutionFailed_
std::function< void()> postEventMotionExecutionSucceded_

References onFailed_, onSucceded_, smacc2::ISmaccClient::postEvent(), postEventMotionExecutionFailed_, and postEventMotionExecutionSucceded_.

Here is the call graph for this function:

◆ onOrthogonalAllocation() [2/2]

template<typename TOrthogonal , typename TSourceObject >
void cl_moveit2z::ClMoveit2z::onOrthogonalAllocation ( )
inline

◆ postEventMotionExecutionFailed() [1/2]

void cl_moveit2z::ClMoveit2z::postEventMotionExecutionFailed ( )
inline

◆ postEventMotionExecutionFailed() [2/2]

void cl_moveit2z::ClMoveit2z::postEventMotionExecutionFailed ( )

◆ postEventMotionExecutionSucceded() [1/2]

void cl_moveit2z::ClMoveit2z::postEventMotionExecutionSucceded ( )
inline

◆ postEventMotionExecutionSucceded() [2/2]

void cl_moveit2z::ClMoveit2z::postEventMotionExecutionSucceded ( )

Member Data Documentation

◆ moveGroupClientInterface

◆ onFailed_

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

Definition at line 152 of file cl_moveit2z.hpp.

Referenced by onMotionExecutionFailed(), and onOrthogonalAllocation().

◆ onSucceded_

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

Definition at line 151 of file cl_moveit2z.hpp.

Referenced by onMotionExecutionSuccedded(), and onOrthogonalAllocation().

◆ options_

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

Definition at line 155 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 149 of file cl_moveit2z.hpp.

Referenced by onOrthogonalAllocation(), and postEventMotionExecutionFailed().

◆ postEventMotionExecutionSucceded_

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

Definition at line 148 of file cl_moveit2z.hpp.

Referenced by onOrthogonalAllocation(), and postEventMotionExecutionSucceded().


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