SMACC2
|
#include <cb_move_end_effector_trajectory.hpp>
Public Member Functions | |
CbMoveEndEffectorTrajectory (std::optional< std::string > tipLink=std::nullopt) | |
CbMoveEndEffectorTrajectory (const std::vector< geometry_msgs::msg::PoseStamped > &endEffectorTrajectory, std::optional< std::string > tipLink=std::nullopt) | |
template<typename TOrthogonal , typename TSourceObject > | |
void | onOrthogonalAllocation () |
virtual void | onEntry () override |
virtual void | onExit () override |
virtual void | update () override |
Public Member Functions inherited from smacc2::SmaccAsyncClientBehavior | |
template<typename TOrthogonal , typename TSourceObject > | |
void | onOrthogonalAllocation () |
virtual | ~SmaccAsyncClientBehavior () |
template<typename TCallback , typename T > | |
boost::signals2::connection | onSuccess (TCallback callback, T *object) |
template<typename TCallback , typename T > | |
boost::signals2::connection | onFinished (TCallback callback, T *object) |
template<typename TCallback , typename T > | |
boost::signals2::connection | onFailure (TCallback callback, T *object) |
Public Member Functions inherited from smacc2::ISmaccClientBehavior | |
ISmaccClientBehavior () | |
virtual | ~ISmaccClientBehavior () |
ISmaccStateMachine * | getStateMachine () |
std::string | getName () const |
template<typename SmaccClientType > | |
void | requiresClient (SmaccClientType *&storage) |
template<typename SmaccComponentType > | |
void | requiresComponent (SmaccComponentType *&storage) |
Public Member Functions inherited from smacc2::ISmaccUpdatable | |
ISmaccUpdatable () | |
ISmaccUpdatable (rclcpp::Duration duration) | |
void | executeUpdate (rclcpp::Node::SharedPtr node) |
void | setUpdatePeriod (rclcpp::Duration duration) |
Public Attributes | |
std::optional< std::string > | group_ |
std::optional< std::string > | tipLink_ |
std::optional< bool > | allowInitialTrajectoryStateJointDiscontinuity_ |
Protected Member Functions | |
ComputeJointTrajectoryErrorCode | computeJointSpaceTrajectory (moveit_msgs::msg::RobotTrajectory &computedJointTrajectory) |
void | executeJointSpaceTrajectory (const moveit_msgs::msg::RobotTrajectory &computedJointTrajectory) |
virtual void | generateTrajectory ()=0 |
virtual void | createMarkers () |
void | getCurrentEndEffectorPose (std::string globalFrame, tf2::Stamped< tf2::Transform > ¤tEndEffectorTransform) |
Protected Member Functions inherited from smacc2::SmaccAsyncClientBehavior | |
void | postSuccessEvent () |
void | postFailureEvent () |
virtual void | dispose () override |
bool | isShutdownRequested () |
Protected Member Functions inherited from smacc2::ISmaccClientBehavior | |
virtual void | runtimeConfigure () |
virtual void | onEntry () |
virtual void | onExit () |
template<typename EventType > | |
void | postEvent (const EventType &ev) |
template<typename EventType > | |
void | postEvent () |
ISmaccState * | getCurrentState () |
virtual void | dispose () |
virtual rclcpp::Node::SharedPtr | getNode () |
virtual rclcpp::Logger | getLogger () |
virtual void | update ()=0 |
Protected Attributes | |
std::vector< geometry_msgs::msg::PoseStamped > | endEffectorTrajectory_ |
ClMoveGroup * | movegroupClient_ = nullptr |
visualization_msgs::msg::MarkerArray | beahiorMarkers_ |
Private Member Functions | |
void | initializeROS () |
Private Attributes | |
rclcpp::Publisher< visualization_msgs::msg::MarkerArray >::SharedPtr | markersPub_ |
std::atomic< bool > | markersInitialized_ |
rclcpp::Client< moveit_msgs::srv::GetPositionIK >::SharedPtr | iksrv_ |
std::mutex | m_mutex_ |
std::function< void(moveit_msgs::msg::RobotTrajectory &)> | postJointDiscontinuityEvent |
std::function< void(moveit_msgs::msg::RobotTrajectory &)> | postIncorrectInitialStateEvent |
std::function< void()> | postMotionExecutionFailureEvents |
bool | autocleanmarkers = false |
Definition at line 51 of file cb_move_end_effector_trajectory.hpp.
cl_move_group_interface::CbMoveEndEffectorTrajectory::CbMoveEndEffectorTrajectory | ( | std::optional< std::string > | tipLink = std::nullopt | ) |
Definition at line 35 of file cb_move_end_effector_trajectory.cpp.
cl_move_group_interface::CbMoveEndEffectorTrajectory::CbMoveEndEffectorTrajectory | ( | const std::vector< geometry_msgs::msg::PoseStamped > & | endEffectorTrajectory, |
std::optional< std::string > | tipLink = std::nullopt |
||
) |
Definition at line 40 of file cb_move_end_effector_trajectory.cpp.
|
protected |
Definition at line 57 of file cb_move_end_effector_trajectory.cpp.
References allowInitialTrajectoryStateJointDiscontinuity_, smacc2::ISmaccClientBehavior::currentState, endEffectorTrajectory_, smacc2::ISmaccClientBehavior::getLogger(), smacc2::ISmaccClientBehavior::getName(), iksrv_, cl_move_group_interface::INCORRECT_INITIAL_STATE, cl_move_group_interface::JOINT_TRAJECTORY_DISCONTINUITY, movegroupClient_, cl_move_group_interface::ClMoveGroup::moveGroupClientInterface, service_node_3::s, cl_move_group_interface::SUCCESS, and tipLink_.
Referenced by onEntry().
|
protectedvirtual |
Reimplemented in cl_move_group_interface::CbCircularPivotMotion, and cl_move_group_interface::CbCircularPouringMotion.
Definition at line 384 of file cb_move_end_effector_trajectory.cpp.
References beahiorMarkers_, endEffectorTrajectory_, and smacc2::ISmaccClientBehavior::getNode().
Referenced by cl_move_group_interface::CbCircularPivotMotion::createMarkers(), cl_move_group_interface::CbCircularPouringMotion::createMarkers(), and onEntry().
|
protected |
Definition at line 267 of file cb_move_end_effector_trajectory.cpp.
References smacc2::ISmaccClientBehavior::getLogger(), smacc2::ISmaccClientBehavior::getName(), movegroupClient_, cl_move_group_interface::ClMoveGroup::moveGroupClientInterface, cl_move_group_interface::ClMoveGroup::postEventMotionExecutionSucceded(), smacc2::SmaccAsyncClientBehavior::postFailureEvent(), postMotionExecutionFailureEvents, and smacc2::SmaccAsyncClientBehavior::postSuccessEvent().
Referenced by cl_move_group_interface::CbExecuteLastTrajectory::onEntry(), onEntry(), and cl_move_group_interface::CbUndoLastTrajectory::onEntry().
|
protectedpure virtual |
Implemented in cl_move_group_interface::CbExecuteLastTrajectory, cl_move_group_interface::CbUndoLastTrajectory, cl_move_group_interface::CbCircularPivotMotion, cl_move_group_interface::CbMoveCartesianRelative2, and cl_move_group_interface::CbCircularPouringMotion.
Definition at line 430 of file cb_move_end_effector_trajectory.cpp.
Referenced by onEntry().
|
protected |
Definition at line 436 of file cb_move_end_effector_trajectory.cpp.
References smacc2::ISmaccClientBehavior::getNode(), movegroupClient_, cl_move_group_interface::ClMoveGroup::moveGroupClientInterface, service_node_3::s, and tipLink_.
Referenced by cl_move_group_interface::CbCircularPouringMotion::createMarkers(), cl_move_group_interface::CbMoveCartesianRelative2::generateTrajectory(), and cl_move_group_interface::CbCircularPouringMotion::generateTrajectory().
|
private |
Definition at line 48 of file cb_move_end_effector_trajectory.cpp.
References smacc2::ISmaccClientBehavior::getLogger(), smacc2::ISmaccClientBehavior::getName(), smacc2::ISmaccClientBehavior::getNode(), iksrv_, and markersPub_.
Referenced by onOrthogonalAllocation().
|
overridevirtual |
Reimplemented from smacc2::ISmaccClientBehavior.
Reimplemented in cl_move_group_interface::CbEndEffectorRotate, cl_move_group_interface::CbExecuteLastTrajectory, and cl_move_group_interface::CbUndoLastTrajectory.
Definition at line 288 of file cb_move_end_effector_trajectory.cpp.
References computeJointSpaceTrajectory(), createMarkers(), smacc2::introspection::demangleSymbol(), endEffectorTrajectory_, executeJointSpaceTrajectory(), generateTrajectory(), smacc2::ISmaccClientBehavior::getLogger(), smacc2::ISmaccClientBehavior::getName(), cl_move_group_interface::INCORRECT_INITIAL_STATE, cl_move_group_interface::JOINT_TRAJECTORY_DISCONTINUITY, markersInitialized_, movegroupClient_, cl_move_group_interface::ClMoveGroup::postEventMotionExecutionFailed(), smacc2::SmaccAsyncClientBehavior::postFailureEvent(), postIncorrectInitialStateEvent, postJointDiscontinuityEvent, cl_move_group_interface::CpTrajectoryHistory::pushTrajectory(), smacc2::ISmaccClientBehavior::requiresClient(), smacc2::ISmaccClientBehavior::requiresComponent(), and cl_move_group_interface::SUCCESS.
Referenced by cl_move_group_interface::CbEndEffectorRotate::onEntry().
|
overridevirtual |
Reimplemented from smacc2::ISmaccClientBehavior.
Definition at line 367 of file cb_move_end_effector_trajectory.cpp.
References autocleanmarkers, beahiorMarkers_, smacc2::ISmaccClientBehavior::getNode(), m_mutex_, markersInitialized_, and markersPub_.
|
inline |
Definition at line 69 of file cb_move_end_effector_trajectory.hpp.
References smacc2::ISmaccClientBehavior::getLogger(), smacc2::ISmaccClientBehavior::getName(), initializeROS(), movegroupClient_, smacc2::ISmaccClientBehavior::postEvent(), cl_move_group_interface::ClMoveGroup::postEventMotionExecutionFailed(), postIncorrectInitialStateEvent, postJointDiscontinuityEvent, and postMotionExecutionFailureEvents.
|
overridevirtual |
Implements smacc2::ISmaccUpdatable.
Definition at line 358 of file cb_move_end_effector_trajectory.cpp.
References beahiorMarkers_, m_mutex_, markersInitialized_, and markersPub_.
std::optional<bool> cl_move_group_interface::CbMoveEndEffectorTrajectory::allowInitialTrajectoryStateJointDiscontinuity_ |
Definition at line 60 of file cb_move_end_effector_trajectory.hpp.
Referenced by computeJointSpaceTrajectory().
|
private |
Definition at line 136 of file cb_move_end_effector_trajectory.hpp.
Referenced by onExit().
|
protected |
Definition at line 115 of file cb_move_end_effector_trajectory.hpp.
Referenced by createMarkers(), cl_move_group_interface::CbCircularPivotMotion::createMarkers(), cl_move_group_interface::CbCircularPouringMotion::createMarkers(), onExit(), and update().
|
protected |
Definition at line 111 of file cb_move_end_effector_trajectory.hpp.
Referenced by computeJointSpaceTrajectory(), createMarkers(), cl_move_group_interface::CbCircularPivotMotion::generateTrajectory(), cl_move_group_interface::CbMoveCartesianRelative2::generateTrajectory(), cl_move_group_interface::CbCircularPouringMotion::generateTrajectory(), and onEntry().
std::optional<std::string> cl_move_group_interface::CbMoveEndEffectorTrajectory::group_ |
Definition at line 56 of file cb_move_end_effector_trajectory.hpp.
|
private |
Definition at line 127 of file cb_move_end_effector_trajectory.hpp.
Referenced by computeJointSpaceTrajectory(), and initializeROS().
|
private |
Definition at line 129 of file cb_move_end_effector_trajectory.hpp.
|
private |
Definition at line 125 of file cb_move_end_effector_trajectory.hpp.
|
private |
Definition at line 123 of file cb_move_end_effector_trajectory.hpp.
Referenced by initializeROS(), onExit(), and update().
|
protected |
Definition at line 113 of file cb_move_end_effector_trajectory.hpp.
Referenced by cl_move_group_interface::CbCircularPivotMotion::computeCurrentEndEffectorPoseRelativeToPivot(), computeJointSpaceTrajectory(), executeJointSpaceTrajectory(), getCurrentEndEffectorPose(), cl_move_group_interface::CbEndEffectorRotate::onEntry(), cl_move_group_interface::CbExecuteLastTrajectory::onEntry(), onEntry(), cl_move_group_interface::CbUndoLastTrajectory::onEntry(), and onOrthogonalAllocation().
|
private |
Definition at line 132 of file cb_move_end_effector_trajectory.hpp.
Referenced by onEntry(), and onOrthogonalAllocation().
|
private |
Definition at line 131 of file cb_move_end_effector_trajectory.hpp.
Referenced by onEntry(), and onOrthogonalAllocation().
|
private |
Definition at line 134 of file cb_move_end_effector_trajectory.hpp.
Referenced by executeJointSpaceTrajectory(), and onOrthogonalAllocation().
std::optional<std::string> cl_move_group_interface::CbMoveEndEffectorTrajectory::tipLink_ |
Definition at line 58 of file cb_move_end_effector_trajectory.hpp.
Referenced by cl_move_group_interface::CbCircularPivotMotion::CbCircularPivotMotion(), cl_move_group_interface::CbCircularPivotMotion::computeCurrentEndEffectorPoseRelativeToPivot(), computeJointSpaceTrajectory(), getCurrentEndEffectorPose(), and cl_move_group_interface::CbEndEffectorRotate::onEntry().