Save an image to disk as a .png file. The filename will follow the syntax of file_prefix_YYYYMMDD_HHMMSS.png. More...
Declaration
class moveit_pro::behaviors::SaveImageToFile { ... }
#include <save_image_to_file.hpp>
Base class
| class | AsyncBehaviorBase |
|
A base class for behaviors which need to asynchronously run a function that might take a long time to complete. More...
|
|
Public Constructors Index
| SaveImageToFile (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 an image from the specified port 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
Public Static Attributes Index
Description
Save an image to disk as a .png file. The filename will follow the syntax of file_prefix_YYYYMMDD_HHMMSS.png.
| Data Port Name | Port Type | Object Type |
|---|
| file_path | input | std::string |
| file_prefix | input | std::string |
| image | input | sensor_msgs::msg::Image |
Definition at line 31 of file save_image_to_file.hpp.
Public Constructors
SaveImageToFile()
| moveit_pro::behaviors::SaveImageToFile::SaveImageToFile (const std::string & name, const BT::NodeConfiguration & config, const std::shared_ptr< BehaviorContext > & shared_resources) |
|
Private Member Functions
doWork()
| tl::expected< bool, std::string > moveit_pro::behaviors::SaveImageToFile::doWork () |
|
virtual
|
Saves an image from the specified port to the location given on the input port.
- Returns
Returns true if the image saved successfully, and otherwise returns a failure.
Declaration at line 53 of file save_image_to_file.hpp, definition at line 112 of file save_image_to_file.cpp.
getFuture()
| std::shared_future< tl::expected< bool, std::string > > & moveit_pro::behaviors::SaveImageToFile::getFuture () |
|
inline
virtual
|
Private Member Attributes
future_
| std::shared_future<tl::expected<bool, std::string> > moveit_pro::behaviors::SaveImageToFile::future_ |
|
Public Static Functions
metadata()
| BT::KeyValueVector moveit_pro::behaviors::SaveImageToFile::metadata () |
|
static
|
providedPorts()
| BT::PortsList moveit_pro::behaviors::SaveImageToFile::providedPorts () |
|
static
|
Public Static Attributes
kMaxImageDimension
| constexpr uint32_t moveit_pro::behaviors::SaveImageToFile::kMaxImageDimension = 16384 |
|
constexpr
static
|
The documentation for this class was generated from the following files:
Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.