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 onStateOrthogonalAllocation ()
 
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 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/2]

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/2]

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

cl_moveit2z::ClMoveit2z::~ClMoveit2z ( )
virtual

Definition at line 34 of file cl_moveit2z.cpp.

34{}

Member Function Documentation

◆ getOptions()

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_.

◆ onInitialize()

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:

◆ onMotionExecutionFailed()

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:

◆ onMotionExecutionSuccedded()

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:

◆ onStateOrthogonalAllocation()

template<typename TOrthogonal , typename TSourceObject >
void cl_moveit2z::ClMoveit2z::onStateOrthogonalAllocation ( )
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:

◆ postEventMotionExecutionFailed()

void cl_moveit2z::ClMoveit2z::postEventMotionExecutionFailed ( )
inline

Definition at line 108 of file cl_moveit2z.hpp.

109 {
110 RCLCPP_INFO(getLogger(), "[ClMoveit2z] Post Motion Failure Event");
112 }
rclcpp::Logger getLogger()

References smacc2::ISmaccClient::getLogger(), and postEventMotionExecutionFailed_.

Referenced by cl_moveit2z::CbMoveJoints::moveJoints(), cl_moveit2z::CbMoveEndEffector::moveToAbsolutePose(), cl_moveit2z::CbMoveEndEffectorTrajectory::onEntry(), and cl_moveit2z::CbMoveEndEffectorTrajectory::onStateOrthogonalAllocation().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ postEventMotionExecutionSucceded()

void cl_moveit2z::ClMoveit2z::postEventMotionExecutionSucceded ( )
inline

Definition at line 102 of file cl_moveit2z.hpp.

103 {
104 RCLCPP_INFO(getLogger(), "[ClMoveit2z] Post Motion Success Event");
106 }

References smacc2::ISmaccClient::getLogger(), and postEventMotionExecutionSucceded_.

Referenced by cl_moveit2z::CbMoveEndEffectorTrajectory::executeJointSpaceTrajectory(), cl_moveit2z::CbMoveJoints::moveJoints(), and cl_moveit2z::CbMoveEndEffector::moveToAbsolutePose().

Here is the call graph for this function:
Here is the caller graph for this function:

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

◆ onSucceded_

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

Definition at line 151 of file cl_moveit2z.hpp.

Referenced by onMotionExecutionSuccedded(), and onStateOrthogonalAllocation().

◆ 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 onStateOrthogonalAllocation(), and postEventMotionExecutionFailed().

◆ postEventMotionExecutionSucceded_

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

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