Skip to main content

SetupMTCBatchPathIK Class

Given an existing MTC Task object, append a stage that plans a Cartesian motion along each of several candidate paths, so the task can keep the best one. More...

Declaration​

class moveit_pro::behaviors::SetupMTCBatchPathIK { ... }

Included Headers​

#include <setup_mtc_batch_path_ik.hpp>

Base class​

classSharedResourcesNode<BehaviorTreeNodeT>

The SharedResourcesNode class provides a BehaviorContext object when constructing a BehaviorTree.Cpp node. More...

Public Constructors Index​

SetupMTCBatchPathIK (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources)

Public Member Functions Index​

BT::NodeStatustick () override

Private Member Functions Index​

tl::expected< std::vector< std::vector< geometry_msgs::msg::PoseStamped > >, std::string >readPaths () const

Public Static Functions Index​

static BT::PortsListprovidedPorts ()
static BT::KeyValueVectormetadata ()

Public Static Attributes Index​

static constexpr autokDefaultStageName = "Batch Path IK"
static constexpr autokPortIdTask = "task"
static constexpr autokPortIdPaths = "paths"

Description​

Given an existing MTC Task object, append a stage that plans a Cartesian motion along each of several candidate paths, so the task can keep the best one.

This Behavior sets up a MoveIt Task Constructor (MTC) Batch Path IK stage. The stage plans every candidate path in paths from the same start state, as SetupMTCPathIK's stage plans its single path, with the same options for every candidate. It sends each candidate that succeeds forward and reports each one that fails with its index in paths. The cost is the summed joint-space distance over the group's active joints; a mobile base counts through how far its wheels turn. PlanMTCTask then keeps the lowest-cost complete solution. PlanMTCTask checks for cancellation and its timeout only between stage computations, so it cannot stop until every candidate is planned.

paths is a vector of paths, each a non-empty vector of PoseStamped messages in any frame known to the robot's URDF. Build it in an Objective with ResetVector and PushBackVector, pushing one path, built with ResetPoseStampedVector and PushBackVector, per candidate.

Unlike SetupMTCPathIK, it has no deprecated position_only port: cartesian_constraint defaults to position and orientation. It takes its timing from trajectory_timing, time-optimal only, instead of scalar timing ports.

Data Port NamePort TypeObject Type
taskbidirectionalstd::shared_ptr<moveit_pro::task_constructor::Task>
pathsinputstd::vector<std::vector<geometry_msgs::msg::PoseStamped>>
planning_group_nameinputstd::string
tip_linksinputstd::vector<std::string>
tip_offsetinputstd::vector<double>
cartesian_constraintinputmoveit_studio_msgs::msg::CartesianConstraint
trajectory_timinginputmoveit_studio_msgs::msg::TrajectoryTiming
blending_radiusinputdouble
ik_cartesian_space_densityinputdouble
ik_joint_space_densityinputdouble
max_optimizer_iterationsinputint
ignore_environment_collisionsinputbool

Definition at line 56 of file setup_mtc_batch_path_ik.hpp.

Public Constructors​

SetupMTCBatchPathIK()​

moveit_pro::behaviors::SetupMTCBatchPathIK::SetupMTCBatchPathIK (const std::string & name, const BT::NodeConfiguration & config, const std::shared_ptr< BehaviorContext > & shared_resources)
Parameters
name

The name of a particular instance of this Behavior.

config

Runtime configuration info for this Behavior.

shared_resources

A shared_ptr to a BehaviorContext that is shared among all SharedResourcesNode Behaviors in the behavior tree.

Declaration at line 72 of file setup_mtc_batch_path_ik.hpp, definition at line 97 of file setup_mtc_batch_path_ik.cpp.

Public Member Functions​

tick()​

BT::NodeStatus moveit_pro::behaviors::SetupMTCBatchPathIK::tick ()

Declaration at line 79 of file setup_mtc_batch_path_ik.hpp, definition at line 149 of file setup_mtc_batch_path_ik.cpp.

Private Member Functions​

readPaths()​

tl::expected< CandidatePaths, std::string > moveit_pro::behaviors::SetupMTCBatchPathIK::readPaths ()
nodiscard

Declaration at line 84 of file setup_mtc_batch_path_ik.hpp, definition at line 125 of file setup_mtc_batch_path_ik.cpp.

Public Static Functions​

metadata()​

BT::KeyValueVector moveit_pro::behaviors::SetupMTCBatchPathIK::metadata ()
static

Declaration at line 77 of file setup_mtc_batch_path_ik.hpp, definition at line 119 of file setup_mtc_batch_path_ik.cpp.

providedPorts()​

BT::PortsList moveit_pro::behaviors::SetupMTCBatchPathIK::providedPorts ()
static

Declaration at line 75 of file setup_mtc_batch_path_ik.hpp, definition at line 103 of file setup_mtc_batch_path_ik.cpp.

Public Static Attributes​

kDefaultStageName​

auto moveit_pro::behaviors::SetupMTCBatchPathIK::kDefaultStageName = "Batch Path IK"
constexpr static

Definition at line 60 of file setup_mtc_batch_path_ik.hpp.

kPortIdPaths​

auto moveit_pro::behaviors::SetupMTCBatchPathIK::kPortIdPaths = "paths"
constexpr static

Definition at line 64 of file setup_mtc_batch_path_ik.hpp.

kPortIdTask​

auto moveit_pro::behaviors::SetupMTCBatchPathIK::kPortIdTask = "task"
constexpr static

Definition at line 63 of file setup_mtc_batch_path_ik.hpp.


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


Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.15.0.