Skip to main content

SendPointCloudToUI Class

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

Declaration

class moveit_pro::behaviors::SendPointCloudToUI { ... }

Included Headers

#include <send_point_cloud_to_ui.hpp>

Base class

classAsyncBehaviorBase

A base class for behaviors which need to asynchronously run a function that might take a long time to complete. More...

Public Constructors Index

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

Construct a new SendPointCloudToUI Behavior. More...

Private Member Functions Index

tl::expected< bool, std::string >doWork () override

Retrieves input settings from data ports and ROS parameters, then transforms the point cloud and publishes it. More...

std::shared_future< tl::expected< bool, std::string > > &getFuture () override

Classes derived from AsyncBehaviorBase must implement getFuture() so that it returns a shared_future class member. More...

Private Member Attributes Index

std::shared_future< tl::expected< bool, std::string > >future_

Classes derived from AsyncBehaviorBase must have this shared_future as a class member. More...

Public Static Functions Index

static BT::PortsListprovidedPorts ()

Returns list of ports for this behavior. More...

static BT::KeyValueVectormetadata ()

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 owned by the BehaviorContext so it outlives this Behavior's tree. DDS retains the most recent cloud and delivers it whenever foxglove_bridge subscribes — including a UI that connects or reloads after the Objective has finished.

Data Port NamePort TypeObject Type
point_cloudInputsensor_msgs::msg::PointCloud2
pcd_topicInputstd::string
use_latest_transformInputbool

Definition at line 36 of file send_point_cloud_to_ui.hpp.

Public Constructors

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
name

See SharedResourcesNode

config

See SharedResourcesNode

shared_resources

See SharedResourcesNode

Declaration at line 45 of file send_point_cloud_to_ui.hpp, definition at line 38 of file send_point_cloud_to_ui.cpp.

Private Member Functions

doWork()

tl::expected< bool, std::string > moveit_pro::behaviors::SendPointCloudToUI::doWork ()
virtual

Retrieves input settings from data ports and ROS parameters, then transforms the point cloud and publishes it.

Returns

Void if all required inputs were found and the point cloud transformation succeeds. Returns an error message if a required operation fails.

Declaration at line 64 of file send_point_cloud_to_ui.hpp, definition at line 60 of file send_point_cloud_to_ui.cpp.

getFuture()

std::shared_future< tl::expected< bool, std::string > > & moveit_pro::behaviors::SendPointCloudToUI::getFuture ()
inline virtual

Classes derived from AsyncBehaviorBase must implement getFuture() so that it returns a shared_future class member.

Definition at line 67 of file send_point_cloud_to_ui.hpp.

Private Member Attributes

future_

std::shared_future<tl::expected<bool, std::string> > moveit_pro::behaviors::SendPointCloudToUI::future_

Classes derived from AsyncBehaviorBase must have this shared_future as a class member.

Definition at line 73 of file send_point_cloud_to_ui.hpp.

Public Static Functions

metadata()

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

Declaration at line 56 of file send_point_cloud_to_ui.hpp, definition at line 54 of file send_point_cloud_to_ui.cpp.

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

Declaration at line 54 of file send_point_cloud_to_ui.hpp, definition at line 44 of file send_point_cloud_to_ui.cpp.


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


Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.