SMACC2
|
#include <cb_move_end_effector_trajectory.hpp>
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 () |
onEntry is executed in a new thread. However the current state cannot be left until the onEntry thread finishes. This flag can be checked from the onEntry thread to force finishing the thread. | |
Protected Member Functions inherited from smacc2::ISmaccClientBehavior | |
virtual void | runtimeConfigure () |
template<typename EventType > | |
void | postEvent (const EventType &ev) |
template<typename EventType > | |
void | postEvent () |
ISmaccState * | getCurrentState () |
virtual rclcpp::Node::SharedPtr | getNode () const |
virtual rclcpp::Logger | getLogger () const |
Protected Attributes | |
std::vector< geometry_msgs::msg::PoseStamped > | endEffectorTrajectory_ |
ClMoveit2z * | 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_moveit2z::CbMoveEndEffectorTrajectory::CbMoveEndEffectorTrajectory | ( | std::optional< std::string > | tipLink = std::nullopt | ) |
Definition at line 35 of file cb_move_end_effector_trajectory.cpp.
cl_moveit2z::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 58 of file cb_move_end_effector_trajectory.cpp.
References allowInitialTrajectoryStateJointDiscontinuity_, smacc2::ISmaccClientBehavior::currentState, endEffectorTrajectory_, smacc2::ISmaccClientBehavior::getLogger(), smacc2::ISmaccClientBehavior::getName(), iksrv_, cl_moveit2z::INCORRECT_INITIAL_STATE, cl_moveit2z::JOINT_TRAJECTORY_DISCONTINUITY, movegroupClient_, cl_moveit2z::ClMoveit2z::moveGroupClientInterface, cl_moveit2z::SUCCESS, and tipLink_.
Referenced by onEntry().
|
protectedvirtual |
Reimplemented in cl_moveit2z::CbCircularPivotMotion, and cl_moveit2z::CbCircularPouringMotion.
Definition at line 385 of file cb_move_end_effector_trajectory.cpp.
References beahiorMarkers_, endEffectorTrajectory_, and smacc2::ISmaccClientBehavior::getNode().
Referenced by cl_moveit2z::CbCircularPivotMotion::createMarkers(), cl_moveit2z::CbCircularPouringMotion::createMarkers(), and onEntry().
|
protected |
Definition at line 268 of file cb_move_end_effector_trajectory.cpp.
References smacc2::ISmaccClientBehavior::getLogger(), smacc2::ISmaccClientBehavior::getName(), movegroupClient_, cl_moveit2z::ClMoveit2z::moveGroupClientInterface, cl_moveit2z::ClMoveit2z::postEventMotionExecutionSucceded(), smacc2::SmaccAsyncClientBehavior::postFailureEvent(), postMotionExecutionFailureEvents, and smacc2::SmaccAsyncClientBehavior::postSuccessEvent().
Referenced by cl_moveit2z::CbExecuteLastTrajectory::onEntry(), onEntry(), and cl_moveit2z::CbUndoLastTrajectory::onEntry().
|
protectedpure virtual |
Implemented in cl_moveit2z::CbExecuteLastTrajectory, cl_moveit2z::CbUndoLastTrajectory, cl_moveit2z::CbCircularPivotMotion, cl_moveit2z::CbMoveCartesianRelative2, and cl_moveit2z::CbCircularPouringMotion.
Definition at line 431 of file cb_move_end_effector_trajectory.cpp.
Referenced by onEntry().
|
protected |
Definition at line 437 of file cb_move_end_effector_trajectory.cpp.
References smacc2::ISmaccClientBehavior::getNode(), movegroupClient_, cl_moveit2z::ClMoveit2z::moveGroupClientInterface, and tipLink_.
Referenced by cl_moveit2z::CbCircularPouringMotion::createMarkers(), cl_moveit2z::CbMoveCartesianRelative2::generateTrajectory(), and cl_moveit2z::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_moveit2z::CbEndEffectorRotate, cl_moveit2z::CbExecuteLastTrajectory, and cl_moveit2z::CbUndoLastTrajectory.
Definition at line 289 of file cb_move_end_effector_trajectory.cpp.
References computeJointSpaceTrajectory(), createMarkers(), smacc2::introspection::demangleSymbol(), endEffectorTrajectory_, executeJointSpaceTrajectory(), generateTrajectory(), smacc2::ISmaccClientBehavior::getLogger(), smacc2::ISmaccClientBehavior::getName(), cl_moveit2z::INCORRECT_INITIAL_STATE, cl_moveit2z::JOINT_TRAJECTORY_DISCONTINUITY, markersInitialized_, movegroupClient_, cl_moveit2z::ClMoveit2z::postEventMotionExecutionFailed(), smacc2::SmaccAsyncClientBehavior::postFailureEvent(), postIncorrectInitialStateEvent, postJointDiscontinuityEvent, cl_moveit2z::CpTrajectoryHistory::pushTrajectory(), smacc2::ISmaccClientBehavior::requiresClient(), smacc2::ISmaccClientBehavior::requiresComponent(), and cl_moveit2z::SUCCESS.
|
overridevirtual |
Reimplemented from smacc2::ISmaccClientBehavior.
Definition at line 368 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_moveit2z::ClMoveit2z::postEventMotionExecutionFailed(), postIncorrectInitialStateEvent, postJointDiscontinuityEvent, and postMotionExecutionFailureEvents.
|
overridevirtual |
Implements smacc2::ISmaccUpdatable.
Definition at line 359 of file cb_move_end_effector_trajectory.cpp.
References beahiorMarkers_, m_mutex_, markersInitialized_, and markersPub_.
std::optional<bool> cl_moveit2z::CbMoveEndEffectorTrajectory::allowInitialTrajectoryStateJointDiscontinuity_ |
Definition at line 60 of file cb_move_end_effector_trajectory.hpp.
Referenced by computeJointSpaceTrajectory().
|
private |
Definition at line 139 of file cb_move_end_effector_trajectory.hpp.
Referenced by onExit().
|
protected |
Definition at line 118 of file cb_move_end_effector_trajectory.hpp.
Referenced by createMarkers(), cl_moveit2z::CbCircularPivotMotion::createMarkers(), cl_moveit2z::CbCircularPouringMotion::createMarkers(), onExit(), and update().
|
protected |
Definition at line 114 of file cb_move_end_effector_trajectory.hpp.
Referenced by computeJointSpaceTrajectory(), createMarkers(), cl_moveit2z::CbCircularPivotMotion::generateTrajectory(), cl_moveit2z::CbMoveCartesianRelative2::generateTrajectory(), cl_moveit2z::CbCircularPouringMotion::generateTrajectory(), and onEntry().
std::optional<std::string> cl_moveit2z::CbMoveEndEffectorTrajectory::group_ |
Definition at line 56 of file cb_move_end_effector_trajectory.hpp.
|
private |
Definition at line 130 of file cb_move_end_effector_trajectory.hpp.
Referenced by computeJointSpaceTrajectory(), and initializeROS().
|
private |
Definition at line 132 of file cb_move_end_effector_trajectory.hpp.
|
private |
Definition at line 128 of file cb_move_end_effector_trajectory.hpp.
|
private |
Definition at line 126 of file cb_move_end_effector_trajectory.hpp.
Referenced by initializeROS(), onExit(), and update().
|
protected |
Definition at line 116 of file cb_move_end_effector_trajectory.hpp.
Referenced by cl_moveit2z::CbCircularPivotMotion::computeCurrentEndEffectorPoseRelativeToPivot(), computeJointSpaceTrajectory(), executeJointSpaceTrajectory(), getCurrentEndEffectorPose(), cl_moveit2z::CbEndEffectorRotate::onEntry(), cl_moveit2z::CbExecuteLastTrajectory::onEntry(), onEntry(), cl_moveit2z::CbUndoLastTrajectory::onEntry(), and onOrthogonalAllocation().
|
private |
Definition at line 135 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 onEntry(), and onOrthogonalAllocation().
|
private |
Definition at line 137 of file cb_move_end_effector_trajectory.hpp.
Referenced by executeJointSpaceTrajectory(), and onOrthogonalAllocation().
std::optional<std::string> cl_moveit2z::CbMoveEndEffectorTrajectory::tipLink_ |
Definition at line 58 of file cb_move_end_effector_trajectory.hpp.
Referenced by cl_moveit2z::CbCircularPivotMotion::CbCircularPivotMotion(), cl_moveit2z::CbCircularPivotMotion::computeCurrentEndEffectorPoseRelativeToPivot(), computeJointSpaceTrajectory(), getCurrentEndEffectorPose(), and cl_moveit2z::CbEndEffectorRotate::onEntry().