Skip to main content

LoadImageFromFile Class

Loads an image from a file and writes it to an output data port. More...

Declaration​

class moveit_pro::behaviors::LoadImageFromFile { ... }

Included Headers​

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

LoadImageFromFile (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 an image from a file specified on a data port, and writes the image to an output 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 an image from a file and writes it to an output data port.

Data Port NamePort TypeObject Type
package_nameinputstd::string
file_pathinputstd::string
frame_idinputstd::string
imageoutputsensor_msgs::msg::Image

Definition at line 24 of file load_image_from_file.hpp.

Public Constructors​

LoadImageFromFile()​

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

Declaration at line 27 of file load_image_from_file.hpp, definition at line 31 of file load_image_from_file.cpp.

Private Member Functions​

doWork()​

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

Loads an image from a file specified on a data port, and writes the image to an output port.

Returns

Returns true if the image is loaded successfully, or a failure result otherwise.

Declaration at line 39 of file load_image_from_file.hpp, definition at line 56 of file load_image_from_file.cpp.

getFuture()​

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

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

Definition at line 42 of file load_image_from_file.hpp.

Private Member Attributes​

future_​

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

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

Definition at line 48 of file load_image_from_file.hpp.

Public Static Functions​

metadata()​

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

Declaration at line 32 of file load_image_from_file.hpp, definition at line 50 of file load_image_from_file.cpp.

providedPorts()​

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

Declaration at line 30 of file load_image_from_file.hpp, definition at line 37 of file load_image_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.