Skip to main content

SavePointCloudToFile Class

Save a point cloud .pcd file to disk. The filename will follow the syntax of file_prefix_YYYYMMDD_HHMMSS.pcd. More...

Declaration​

class moveit_pro::behaviors::SavePointCloudToFile { ... }

Included Headers​

#include <save_pointcloud_to_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​

SavePointCloudToFile (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

Saves a point cloud to a .pcd file to the location given on the input 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​

Save a point cloud .pcd file to disk. The filename will follow the syntax of file_prefix_YYYYMMDD_HHMMSS.pcd.

Data Port NamePort TypeObject Type
file_pathinputstd::string
file_prefixinputstd::string
point_cloudinputsensor_msgs::msg::PointCloud2

Definition at line 32 of file save_pointcloud_to_file.hpp.

Public Constructors​

SavePointCloudToFile()​

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

Declaration at line 35 of file save_pointcloud_to_file.hpp, definition at line 29 of file save_pointcloud_to_file.cpp.

Private Member Functions​

doWork()​

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

Saves a point cloud to a .pcd file to the location given on the input port.

Returns

Returns true if the point cloud snapshot is captured successfully, and otherwise returns a failure.

Declaration at line 47 of file save_pointcloud_to_file.hpp, definition at line 50 of file save_pointcloud_to_file.cpp.

getFuture()​

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

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

Definition at line 50 of file save_pointcloud_to_file.hpp.

Private Member Attributes​

future_​

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

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

Definition at line 56 of file save_pointcloud_to_file.hpp.

Public Static Functions​

metadata()​

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

Declaration at line 40 of file save_pointcloud_to_file.hpp, definition at line 44 of file save_pointcloud_to_file.cpp.

providedPorts()​

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

Declaration at line 38 of file save_pointcloud_to_file.hpp, definition at line 35 of file save_pointcloud_to_file.cpp.


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


Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.