|
MoveIt Pro API
Core Behaviors for MoveIt Pro
|
Segment an image using the SAM2 model and point prompts. More...
#include <sam2_segmentation.hpp>


Classes | |
| struct | InferenceHandle |
| Interface for SAM2 point-prompted segmentation inference. More... | |
| struct | SAM2SegmentHandle |
| Default implementation using SAM2Segment over the shared model pool. More... | |
Public Member Functions | |
| GetMasks2DFromPointQuery (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< moveit_pro::behaviors::BehaviorContext > &shared_resources, std::unique_ptr< InferenceHandle > inference_handle=std::make_unique< SAM2SegmentHandle >()) | |
| Constructor for the GetMasks2DFromPointQuery behavior. | |
| ~GetMasks2DFromPointQuery () override | |
Public Member Functions inherited from moveit_pro::behaviors::AsyncBehaviorBase | |
| AsyncBehaviorBase (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources) | |
| ~AsyncBehaviorBase () override=default | |
| BT::NodeStatus | onStart () override |
| Required implementation of BT::StatefulActionNode::onStart(). | |
| BT::NodeStatus | onRunning () override |
| Required implementation of BT::StatefulActionNode::onRunning(). | |
| void | onHalted () override |
| Required implementation of BT::StatefulActionNode::onHalted(). | |
| void | resetStatus () |
| Resets the internal status of this node. | |
| void | notifyCanHalt () |
| Called when runAsync() finishes to notify onHalted() that the async process has finished. | |
Public Member Functions inherited from moveit_pro::behaviors::SharedResourcesNode< BT::StatefulActionNode > | |
| SharedResourcesNode (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &behavior_context) | |
| Constructor for SharedResourcesNode. Called by BT::BehaviorTreeFactory when creating a new behavior tree containing this node. | |
| const std::shared_ptr< BehaviorContext > & | getBehaviorContext () const |
Static Public Member Functions | |
| static BT::PortsList | providedPorts () |
| Implementation of the required providedPorts() function for the Behavior. | |
| static BT::KeyValueVector | metadata () |
| Implementation of the metadata() function for displaying metadata, such as Behavior description and subcategory, in the MoveIt Studio Developer Tool. | |
Segment an image using the SAM2 model and point prompts.
| Data Port Name | Port Type | Object Type |
|---|---|---|
| image | input | sensor_msgs::msg::Image |
| pixel_coords | input | std::vector<geometry_msgs::msg::PointStamped> |
| model_bundle_manifest | input | std::string |
| runtime_id | input | std::string |
| model_package | input | std::string |
| masks2d | output | std::vector<moveit_studio_vision_msgs::msg::Mask2D> |
| moveit_pro::behaviors::GetMasks2DFromPointQuery::GetMasks2DFromPointQuery | ( | const std::string & | name, |
| const BT::NodeConfiguration & | config, | ||
| const std::shared_ptr< moveit_pro::behaviors::BehaviorContext > & | shared_resources, | ||
| std::unique_ptr< InferenceHandle > | inference_handle = std::make_unique<SAM2SegmentHandle>() |
||
| ) |
Constructor for the GetMasks2DFromPointQuery behavior.
| name | The name of a particular instance of this Behavior. This will be set by the behavior tree factory when this Behavior is created within a new behavior tree. |
| config | This contains runtime configuration info for this Behavior, such as the mapping between the Behavior's data ports on the behavior tree's blackboard. This will be set by the behavior tree factory when this Behavior is created within a new behavior tree. |
| shared_resources | Provides access to common resources such as the node handle and failure logger that are shared between all the behaviors that inherit from moveit_pro::behaviors::SharedResourcesNode. |
| inference_handle | Custom inference implementation (default uses SAM2SegmentHandle). |
|
overridedefault |
|
static |
Implementation of the metadata() function for displaying metadata, such as Behavior description and subcategory, in the MoveIt Studio Developer Tool.
|
static |
Implementation of the required providedPorts() function for the Behavior.