Skip to main content

GetImage Class

Capture an image. The name of the topic containing the image is set through the "topic_name" parameter, and the resulting image is available on the "message_out" output port. More...

Declaration

class moveit_pro::behaviors::GetImage { ... }

Included Headers

#include <get_image.hpp>

Base class

classGetMessageFromTopicBehaviorBase<MessageT>

Base class for Behaviors that get the latest message from a topic specified on an input data port and set that message to an output data port. More...

Public Constructors Index

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

Private Member Functions Index

tl::expected< std::chrono::duration< double >, std::string >getWaitForMessageTimeout () override

Override getWaitForMessageTimeout to allow failing if no image is received within the expected duration. More...

tl::expected< std::chrono::duration< double >, std::string >getWaitForPublisherTimeout () override

Override getWaitForPublisherTimeout to allow failing if the topic is not advertised within the expected duration. 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

Capture an image. The name of the topic containing the image is set through the "topic_name" parameter, and the resulting image is available on the "message_out" output port.

Data Port NamePort TypeObject Type
topic_nameinputstd::string
message_timeout_secinputdouble
published_timeout_secinputdouble
message_outoutputsensor_msgs::msg::Image

Definition at line 26 of file get_image.hpp.

Public Constructors

GetImage()

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

Declaration at line 29 of file get_image.hpp, definition at line 34 of file get_image.cpp.

Private Member Functions

getFuture()

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

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

Definition at line 44 of file get_image.hpp.

getWaitForMessageTimeout()

tl::expected< std::chrono::duration< double >, std::string > moveit_pro::behaviors::GetImage::getWaitForMessageTimeout ()
virtual

Override getWaitForMessageTimeout to allow failing if no image is received within the expected duration.

Declaration at line 38 of file get_image.hpp, definition at line 40 of file get_image.cpp.

getWaitForPublisherTimeout()

tl::expected< std::chrono::duration< double >, std::string > moveit_pro::behaviors::GetImage::getWaitForPublisherTimeout ()
virtual

Override getWaitForPublisherTimeout to allow failing if the topic is not advertised within the expected duration.

Declaration at line 41 of file get_image.hpp, definition at line 47 of file get_image.cpp.

Private Member Attributes

future_

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

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

Definition at line 50 of file get_image.hpp.

Public Static Functions

metadata()

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

Declaration at line 34 of file get_image.hpp, definition at line 70 of file get_image.cpp.

providedPorts()

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

Declaration at line 32 of file get_image.hpp, definition at line 54 of file get_image.cpp.


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


Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.