Skip to main content

LoadPointCloudFromFile Class

Loads a point cloud from a .pcd or .stl file, optionally recolors it, and writes it to an output data port. More...

Declaration

class moveit_pro::behaviors::LoadPointCloudFromFile { ... }

Included Headers

#include <load_pointcloud_from_file.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

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

Private Member Functions Index

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

Loads a point cloud from a file specified on a data port and then writes the point cloud to an output data port. 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 ()
static BT::KeyValueVectormetadata ()

Description

Loads a point cloud from a .pcd or .stl file, optionally recolors it, and writes it to an output data port.

The scale, num_sampled_points, and random_seed variables are used only when reading an .stl file, since these parameters control sampling the point cloud from a mesh.

Data Port NamePort TypeObject Type
package_nameinputstd::string
file_pathinputstd::string
frame_idinputstd::string
scaleinputfloat
num_sampled_pointsinputsize_t
random_seedinputsize_t
colorinputstd::vector<uint8_t>
point_cloudoutputsensor_msgs::msg::PointCloud2

Definition at line 33 of file load_pointcloud_from_file.hpp.

Public Constructors

LoadPointCloudFromFile()

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

Declaration at line 36 of file load_pointcloud_from_file.hpp, definition at line 117 of file load_pointcloud_from_file.cpp.

Private Member Functions

doWork()

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

Loads a point cloud from a file specified on a data port and then writes the point cloud to an output data port.

Returns

Returns true if the point cloud snapshot is captured successfully. Returns a failure result if the point cloud could not be successfully loaded.

Declaration at line 50 of file load_pointcloud_from_file.hpp, definition at line 146 of file load_pointcloud_from_file.cpp.

getFuture()

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

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

Definition at line 53 of file load_pointcloud_from_file.hpp.

Private Member Attributes

future_

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

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

Definition at line 59 of file load_pointcloud_from_file.hpp.

Public Static Functions

metadata()

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

Declaration at line 41 of file load_pointcloud_from_file.hpp, definition at line 140 of file load_pointcloud_from_file.cpp.

providedPorts()

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

Declaration at line 39 of file load_pointcloud_from_file.hpp, definition at line 123 of file load_pointcloud_from_file.cpp.


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


Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.