|
SMACC2
|
Component for centralized motion planning operations. More...
#include <cp_motion_planner.hpp>


Public Member Functions | |
| CpMotionPlanner ()=default | |
| virtual | ~CpMotionPlanner ()=default |
| void | onInitialize () override |
| Initialize the component and get reference to ClMoveit2z client. | |
| PlanningResult | planToPose (const geometry_msgs::msg::PoseStamped &target, const std::optional< std::string > &tipLink=std::nullopt, const PlanningOptions &options={}) |
| Plan to a Cartesian pose. | |
| PlanningResult | planToJointTarget (const std::map< std::string, double > &jointTargets, const PlanningOptions &options={}) |
| Plan to joint values. | |
| PlanningResult | planCartesianPath (const std::vector< geometry_msgs::msg::Pose > &waypoints, double maxStep=0.01, double jumpThreshold=0.0, bool avoidCollisions=true) |
| Plan a Cartesian path. | |
| moveit::core::RobotStatePtr | getCurrentState (double waitTime=1.0) |
| Get current robot state. | |
Public Member Functions inherited from smacc2::ISmaccComponent | |
| ISmaccComponent () | |
| virtual | ~ISmaccComponent () |
| virtual std::string | getName () const |
Private Member Functions | |
| void | applyPlanningOptions (moveit::planning_interface::MoveGroupInterface &moveGroup, const PlanningOptions &options) |
| Apply planning options to MoveGroupInterface. | |
Private Attributes | |
| ClMoveit2z * | moveit2zClient_ = nullptr |
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 | onOrthogonalAllocation () |
| template<typename TOrthogonal , typename TSourceObject > | |
| void | onStateOrthogonalAllocation () |
| template<typename TComponent > | |
| void | requiresComponent (TComponent *&requiredComponentStorage, bool throwExceptionIfNotExist) |
| template<typename TComponent > | |
| void | requiresComponent (std::string name, TComponent *&requiredComponentStorage, bool throwExceptionIfNotExist) |
| 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 |
| ISmaccStateMachine * | getStateMachine () |
Protected Attributes inherited from smacc2::ISmaccComponent | |
| ISmaccStateMachine * | stateMachine_ |
| ISmaccClient * | owner_ |
Component for centralized motion planning operations.
This component wraps all MoveGroupInterface planning operations to provide a consistent interface for planning motions. It supports planning to:
Pattern: API wrapper component with result types
Definition at line 79 of file cp_motion_planner.hpp.
|
default |
|
virtualdefault |
|
inlineprivate |
Apply planning options to MoveGroupInterface.
| moveGroup | Reference to MoveGroupInterface |
| options | Planning options to apply |
Definition at line 341 of file cp_motion_planner.hpp.
References cl_moveit2z::PlanningOptions::maxAccelerationScaling, cl_moveit2z::PlanningOptions::maxVelocityScaling, cl_moveit2z::PlanningOptions::plannerId, cl_moveit2z::PlanningOptions::planningPipelineId, and cl_moveit2z::PlanningOptions::planningTime.
|
inline |
Get current robot state.
| waitTime | Maximum time to wait for state (seconds) |
Definition at line 311 of file cp_motion_planner.hpp.
References smacc2::ISmaccComponent::getLogger(), cl_moveit2z::ClMoveit2z::moveGroupClientInterface, and moveit2zClient_.

|
inlineoverridevirtual |
Initialize the component and get reference to ClMoveit2z client.
Reimplemented from smacc2::ISmaccComponent.
Definition at line 88 of file cp_motion_planner.hpp.
References smacc2::ISmaccComponent::getLogger(), moveit2zClient_, and smacc2::ISmaccComponent::requiresClient().

|
inline |
Plan a Cartesian path.
| waypoints | Vector of waypoint poses |
| maxStep | Maximum distance between path points (meters) |
| jumpThreshold | Maximum joint jump threshold (0.0 = disabled) |
| avoidCollisions | Whether to check for collisions |
Definition at line 243 of file cp_motion_planner.hpp.
References cl_moveit2z::PlanningResult::errorCode, cl_moveit2z::PlanningResult::errorMessage, smacc2::ISmaccComponent::getLogger(), cl_moveit2z::ClMoveit2z::moveGroupClientInterface, moveit2zClient_, cl_moveit2z::PlanningResult::plan, and cl_moveit2z::PlanningResult::success.

|
inline |
Plan to joint values.
| jointTargets | Map of joint names to target values |
| options | Planning configuration options |
Definition at line 176 of file cp_motion_planner.hpp.
Referenced by cl_moveit2z::CbMoveJoints::moveJoints().

|
inline |
Plan to a Cartesian pose.
| target | Target pose (position and orientation) |
| tipLink | End effector tip link (optional, uses default if not specified) |
| options | Planning configuration options |
Definition at line 102 of file cp_motion_planner.hpp.
Referenced by cl_moveit2z::CbMoveEndEffector::moveToAbsolutePose().

|
private |
Definition at line 333 of file cp_motion_planner.hpp.
Referenced by getCurrentState(), onInitialize(), and planCartesianPath().