SMACC2
Loading...
Searching...
No Matches
cl_moveit2z::CpMoveGroupInterface Class Reference

#include <cp_move_group_interface.hpp>

Inheritance diagram for cl_moveit2z::CpMoveGroupInterface:
Inheritance graph
Collaboration diagram for cl_moveit2z::CpMoveGroupInterface:
Collaboration graph

Public Member Functions

 CpMoveGroupInterface (const moveit::planning_interface::MoveGroupInterface::Options &options)
 
void onInitialize () override
 
template<typename TOrthogonal , typename TSourceObject >
void onStateOrthogonalAllocation ()
 
void postEventMotionExecutionSucceeded ()
 
void postEventMotionExecutionFailed ()
 
template<typename TCallback , typename T >
smacc2::SmaccSignalConnection onMotionExecutionSucceeded (TCallback callback, T *object)
 
template<typename TCallback , typename T >
smacc2::SmaccSignalConnection onMotionExecutionFailed (TCallback callback, T *object)
 
- Public Member Functions inherited from smacc2::ISmaccComponent
 ISmaccComponent ()
 
virtual ~ISmaccComponent ()
 
virtual std::string getName () const
 

Public Attributes

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

Private Attributes

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

Additional Inherited Members

- Protected Member Functions inherited from smacc2::ISmaccComponent
template<typename TOrthogonal , typename TClient >
void onComponentInitialization ()
 
template<typename EventType >
void postEvent (const EventType &ev)
 
template<typename EventType >
void postEvent ()
 
template<typename TOrthogonal , typename TSourceObject >
void onStateOrthogonalAllocation ()
 
template<typename TComponent >
void requiresComponent (TComponent *&requiredComponentStorage, ComponentRequirement requirementType=ComponentRequirement::SOFT)
 
template<typename TComponent >
void requiresComponent (std::string name, TComponent *&requiredComponentStorage, ComponentRequirement requirementType=ComponentRequirement::SOFT)
 
template<typename TClient >
void requiresClient (TClient *&requiredClientStorage)
 
template<typename SmaccComponentType , typename TOrthogonal , typename TClient , typename... TArgs>
SmaccComponentType * createSiblingComponent (TArgs... targs)
 
template<typename SmaccComponentType , typename TOrthogonal , typename TClient , typename... TArgs>
SmaccComponentType * createSiblingNamedComponent (std::string name, TArgs... targs)
 
rclcpp::Node::SharedPtr getNode ()
 
rclcpp::Logger getLogger () const
 
ISmaccStateMachinegetStateMachine ()
 
- Protected Attributes inherited from smacc2::ISmaccComponent
ISmaccStateMachinestateMachine_
 
ISmaccClientowner_
 

Detailed Description

Definition at line 46 of file cp_move_group_interface.hpp.

Constructor & Destructor Documentation

◆ CpMoveGroupInterface()

cl_moveit2z::CpMoveGroupInterface::CpMoveGroupInterface ( const moveit::planning_interface::MoveGroupInterface::Options & options)
inlineexplicit

Definition at line 52 of file cp_move_group_interface.hpp.

54 : options_(options)
55 {
56 }
moveit::planning_interface::MoveGroupInterface::Options options_

Member Function Documentation

◆ onInitialize()

void cl_moveit2z::CpMoveGroupInterface::onInitialize ( )
inlineoverridevirtual

Reimplemented from smacc2::ISmaccComponent.

Definition at line 58 of file cp_move_group_interface.hpp.

59 {
61 std::make_shared<moveit::planning_interface::MoveGroupInterface>(getNode(), options_);
62 planningSceneInterface = std::make_shared<moveit::planning_interface::PlanningSceneInterface>(
63 options_.move_group_namespace);
64 RCLCPP_INFO(getLogger(), "[CpMoveGroupInterface] MoveGroupInterface initialized");
65 }
std::shared_ptr< moveit::planning_interface::MoveGroupInterface > moveGroupClientInterface
std::shared_ptr< moveit::planning_interface::PlanningSceneInterface > planningSceneInterface
rclcpp::Logger getLogger() const
rclcpp::Node::SharedPtr getNode()

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

Here is the call graph for this function:

◆ onMotionExecutionFailed()

template<typename TCallback , typename T >
smacc2::SmaccSignalConnection cl_moveit2z::CpMoveGroupInterface::onMotionExecutionFailed ( TCallback callback,
T * object )
inline

Definition at line 102 of file cp_move_group_interface.hpp.

103 {
104 return this->getStateMachine()->createSignalConnection(onFailed_, callback, object);
105 }
ISmaccStateMachine * getStateMachine()
smacc2::SmaccSignalConnection createSignalConnection(TSmaccSignal &signal, TMemberFunctionPrototype callback, TSmaccObjectType *object)

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

Here is the call graph for this function:

◆ onMotionExecutionSucceeded()

template<typename TCallback , typename T >
smacc2::SmaccSignalConnection cl_moveit2z::CpMoveGroupInterface::onMotionExecutionSucceeded ( TCallback callback,
T * object )
inline

Definition at line 96 of file cp_move_group_interface.hpp.

97 {
98 return this->getStateMachine()->createSignalConnection(onSucceeded_, callback, object);
99 }
smacc2::SmaccSignal< void()> onSucceeded_

References smacc2::ISmaccStateMachine::createSignalConnection(), smacc2::ISmaccComponent::getStateMachine(), and onSucceeded_.

Here is the call graph for this function:

◆ onStateOrthogonalAllocation()

template<typename TOrthogonal , typename TSourceObject >
void cl_moveit2z::CpMoveGroupInterface::onStateOrthogonalAllocation ( )
inline

◆ postEventMotionExecutionFailed()

void cl_moveit2z::CpMoveGroupInterface::postEventMotionExecutionFailed ( )
inline

Definition at line 89 of file cp_move_group_interface.hpp.

90 {
91 RCLCPP_INFO(getLogger(), "[CpMoveGroupInterface] Post Motion Failure Event");
93 }

References smacc2::ISmaccComponent::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:

◆ postEventMotionExecutionSucceeded()

void cl_moveit2z::CpMoveGroupInterface::postEventMotionExecutionSucceeded ( )
inline

Definition at line 83 of file cp_move_group_interface.hpp.

84 {
85 RCLCPP_INFO(getLogger(), "[CpMoveGroupInterface] Post Motion Success Event");
87 }

References smacc2::ISmaccComponent::getLogger(), and postEventMotionExecutionSucceeded_.

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::CpMoveGroupInterface::onFailed_
private

◆ onSucceeded_

smacc2::SmaccSignal<void()> cl_moveit2z::CpMoveGroupInterface::onSucceeded_
private

◆ options_

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

Definition at line 114 of file cp_move_group_interface.hpp.

Referenced by onInitialize().

◆ planningSceneInterface

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

◆ postEventMotionExecutionFailed_

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

◆ postEventMotionExecutionSucceeded_

std::function<void()> cl_moveit2z::CpMoveGroupInterface::postEventMotionExecutionSucceeded_
private

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