MoveIt Pro Behavior
Core Behaviors for MoveIt Pro
moveit_studio::behaviors::SendPointCloudToUI Class Referencefinal

Crop and filter a point cloud using MoveIt's sensor configuration, then publish it to a topic monitored by the UI. More...

#include <send_point_cloud_to_ui.hpp>

Inheritance diagram for moveit_studio::behaviors::SendPointCloudToUI:
Collaboration diagram for moveit_studio::behaviors::SendPointCloudToUI:

Public Member Functions

 SendPointCloudToUI (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources)
 Construct a new SendPointCloudToUI Behavior. More...
 
- Public Member Functions inherited from moveit_studio::behaviors::AsyncBehaviorBase
 AsyncBehaviorBase (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources)
 
virtual ~AsyncBehaviorBase ()=default
 
BT::NodeStatus onStart () override
 Required implementation of BT::StatefulActionNode::onStart(). More...
 
BT::NodeStatus onRunning () override
 Required implementation of BT::StatefulActionNode::onRunning(). More...
 
void onHalted () override
 Required implementation of BT::StatefulActionNode::onHalted(). More...
 
void resetStatus ()
 Resets the internal status of this node. More...
 
- Public Member Functions inherited from moveit_studio::behaviors::SharedResourcesNode< BT::StatefulActionNode >
 SharedResourcesNode (const std::string &name, const BT::NodeConfiguration &config, const std::shared_ptr< BehaviorContext > &shared_resources)
 Constructor for SharedResourcesNode. Called by BT::BehaviorTreeFactory when creating a new behavior tree containing this node. More...
 

Static Public Member Functions

static BT::PortsList providedPorts ()
 Returns list of ports for this behavior. More...
 
static BT::KeyValueVector metadata ()
 

Additional Inherited Members

- Protected Member Functions inherited from moveit_studio::behaviors::AsyncBehaviorBase
virtual tl::expected< void, std::string > doHalt ()
 Optionally implement additional work needed to cleanly interrupt the async process. More...
 
void notifyCanHalt ()
 Called when runAsync() finishes to notify onHalted() that the async process has finished. More...
 
- Protected Attributes inherited from moveit_studio::behaviors::SharedResourcesNode< BT::StatefulActionNode >
std::shared_ptr< BehaviorContextshared_resources_
 

Detailed Description

Crop and filter a point cloud using MoveIt's sensor configuration, then publish it to a topic monitored by the UI.

Will clean up the point cloud, transform it to the "world" frame (which is currently required by the MoveIt Studio web app), and publish the result to the appropriate topic for the provided sensor to update the occupancy map. Will also convert the point cloud to ASCII PCD format to send relevant data through to the UI.

NOTE: No validation is done on the value of the UUID, so any string that is provided (including the empty string) will be set on the output port.

Data Port Name Port Type Object Type
point_cloud Input sensor_msgs::msg::PointCloud2
pcd_topic Input std::string

Constructor & Destructor Documentation

◆ SendPointCloudToUI()

moveit_studio::behaviors::SendPointCloudToUI::SendPointCloudToUI ( const std::string &  name,
const BT::NodeConfiguration &  config,
const std::shared_ptr< BehaviorContext > &  shared_resources 
)
explicit

Construct a new SendPointCloudToUI Behavior.

Parameters
nameSee SharedResourcesNode
configSee SharedResourcesNode
shared_resourcesSee SharedResourcesNode

Member Function Documentation

◆ metadata()

BT::KeyValueVector moveit_studio::behaviors::SendPointCloudToUI::metadata ( )
static

◆ providedPorts()

BT::PortsList moveit_studio::behaviors::SendPointCloudToUI::providedPorts ( )
static

Returns list of ports for this behavior.

Inputs to this behavior are: the point cloud, sensor_name, an optional point cloud uuid, and the name of the topic to publish the result.

Returns
BT::PortsList The list of I/O Ports

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