MoveIt Pro API
Core Behaviors for MoveIt Pro
Loading...
Searching...
No Matches
moveit_pro::behaviors::SendPointCloudToUI Class Referencefinal

Transform a point cloud to the "world" frame and publish it as PCD to a topic the UI visualizes. More...

#include <send_point_cloud_to_ui.hpp>

Inheritance diagram for moveit_pro::behaviors::SendPointCloudToUI:
Collaboration diagram for moveit_pro::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.
 
- 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.
 
- 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 > &shared_resources)
 Constructor for SharedResourcesNode. Called by BT::BehaviorTreeFactory when creating a new behavior tree containing this node.
 

Static Public Member Functions

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

Additional Inherited Members

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

Detailed Description

Transform a point cloud to the "world" frame and publish it as PCD to a topic the UI visualizes.

Removes NaN points, transforms the cloud to the "world" frame (required by the MoveIt Pro web app), converts it to binary compressed PCD, and publishes it for the UI to render.

The publisher uses latched (transient_local), reliable QoS and is kept alive across ticks so the most recent cloud is delivered to the UI whenever foxglove_bridge subscribes — including a UI that connects or reconnects after the capture.

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

Constructor & Destructor Documentation

◆ SendPointCloudToUI()

moveit_pro::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_pro::behaviors::SendPointCloudToUI::metadata ( )
static

◆ providedPorts()

BT::PortsList moveit_pro::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: