Skip to main content

GetSyncedImages Class

Get data from time-synchronized image topics and populate them in output ports. More...

Declaration

class moveit_pro::behaviors::GetSyncedImages { ... }

Included Headers

#include <get_synced_images.hpp>

Base class

classSharedResourcesNode<BehaviorTreeNodeT>

The SharedResourcesNode class provides a BehaviorContext object when constructing a BehaviorTree.Cpp node. More...

Private Member Typedefs Index

usingImage = sensor_msgs::msg::Image
usingCameraInfo = sensor_msgs::msg::CameraInfo
usingSyncPolicy = message_filters::sync_policies::ApproximateTime< Image, CameraInfo, Image, CameraInfo >
usingSynchronizer = message_filters::Synchronizer< SyncPolicy >

Public Constructors Index

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

Public Member Functions Index

BT::NodeStatusonStart () override
BT::NodeStatusonRunning () override
voidonHalted () override

Private Member Functions Index

voidsyncCallback (const Image::ConstSharedPtr &image_1_msg, const CameraInfo::ConstSharedPtr &camera_info_1_msg, const Image::ConstSharedPtr &image_2_msg, const CameraInfo::ConstSharedPtr &camera_info_2_msg)
voidunsubscribeTopics ()

Private Member Attributes Index

image_transport::SubscriberFiltersub_image_1_
message_filters::Subscriber< CameraInfo >sub_camera_info_1_
image_transport::SubscriberFiltersub_image_2_
message_filters::Subscriber< CameraInfo >sub_camera_info_2_
std::shared_ptr< Synchronizer >synchronizer_
std::atomic< bool >sync_done_
std::chrono::steady_clock::time_pointstart_time_

Public Static Functions Index

static BT::PortsListprovidedPorts ()
static BT::KeyValueVectormetadata ()

Private Static Attributes Index

static constexpr std::size_tkMessageSyncQueueSize = 10
static constexpr std::chrono::secondskMessageSyncTimeout { 5 }
static constexpr autokTopicNameImage1 = "image_1_topic_name"
static constexpr autokTopicNameCameraInfo1 = "camera_info_1_topic_name"
static constexpr autokTopicNameImage2 = "image_2_topic_name"
static constexpr autokTopicNameCameraInfo2 = "camera_info_2_topic_name"
static constexpr autokOutputNameImage1 = "image_1"
static constexpr autokOutputNameCameraInfo1 = "camera_info_1"
static constexpr autokOutputNameImage2 = "image_2"
static constexpr autokOutputNameCameraInfo2 = "camera_info_2"
static constexpr autokDescriptionGetSyncedImages = ...

Description

Get data from time-synchronized image topics and populate them in output ports.

Data Port NamePort TypeObject Type
camera_info_1_topic_nameInputstd::string
image_1_topic_nameInputstd::string
camera_info_2_topic_nameInputstd::string
image_2_topic_nameInputstd::string
image_1Outputsensor_msgs::msg::Image
camera_info_1Outputsensor_msgs::msg::CameraInfo
image_2Outputsensor_msgs::msg::Image
camera_info_2Outputsensor_msgs::msg::CameraInfo

Definition at line 36 of file get_synced_images.hpp.

Private Member Typedefs

CameraInfo

using moveit_pro::behaviors::GetSyncedImages::CameraInfo = sensor_msgs::msg::CameraInfo

Definition at line 54 of file get_synced_images.hpp.

Image

using moveit_pro::behaviors::GetSyncedImages::Image = sensor_msgs::msg::Image

Definition at line 53 of file get_synced_images.hpp.

Synchronizer

using moveit_pro::behaviors::GetSyncedImages::Synchronizer = message_filters::Synchronizer<SyncPolicy>

Definition at line 66 of file get_synced_images.hpp.

SyncPolicy

using moveit_pro::behaviors::GetSyncedImages::SyncPolicy = message_filters::sync_policies::ApproximateTime<Image, CameraInfo, Image, CameraInfo>

Definition at line 65 of file get_synced_images.hpp.

Public Constructors

GetSyncedImages()

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

Declaration at line 39 of file get_synced_images.hpp, definition at line 22 of file get_synced_images.cpp.

Public Member Functions

onHalted()

void moveit_pro::behaviors::GetSyncedImages::onHalted ()

Declaration at line 50 of file get_synced_images.hpp, definition at line 155 of file get_synced_images.cpp.

onRunning()

BT::NodeStatus moveit_pro::behaviors::GetSyncedImages::onRunning ()

Declaration at line 48 of file get_synced_images.hpp, definition at line 137 of file get_synced_images.cpp.

onStart()

BT::NodeStatus moveit_pro::behaviors::GetSyncedImages::onStart ()

Declaration at line 46 of file get_synced_images.hpp, definition at line 59 of file get_synced_images.cpp.

Private Member Functions

syncCallback()

void moveit_pro::behaviors::GetSyncedImages::syncCallback (const Image::ConstSharedPtr & image_1_msg, const CameraInfo::ConstSharedPtr & camera_info_1_msg, const Image::ConstSharedPtr & image_2_msg, const CameraInfo::ConstSharedPtr & camera_info_2_msg)

Declaration at line 56 of file get_synced_images.hpp, definition at line 122 of file get_synced_images.cpp.

unsubscribeTopics()

void moveit_pro::behaviors::GetSyncedImages::unsubscribeTopics ()

Declaration at line 58 of file get_synced_images.hpp, definition at line 114 of file get_synced_images.cpp.

Private Member Attributes

start_time_

std::chrono::steady_clock::time_point moveit_pro::behaviors::GetSyncedImages::start_time_

Definition at line 70 of file get_synced_images.hpp.

sub_camera_info_1_

message_filters::Subscriber<CameraInfo> moveit_pro::behaviors::GetSyncedImages::sub_camera_info_1_

Definition at line 61 of file get_synced_images.hpp.

sub_camera_info_2_

message_filters::Subscriber<CameraInfo> moveit_pro::behaviors::GetSyncedImages::sub_camera_info_2_

Definition at line 63 of file get_synced_images.hpp.

sub_image_1_

image_transport::SubscriberFilter moveit_pro::behaviors::GetSyncedImages::sub_image_1_

Definition at line 60 of file get_synced_images.hpp.

sub_image_2_

image_transport::SubscriberFilter moveit_pro::behaviors::GetSyncedImages::sub_image_2_

Definition at line 62 of file get_synced_images.hpp.

sync_done_

std::atomic<bool> moveit_pro::behaviors::GetSyncedImages::sync_done_

Definition at line 69 of file get_synced_images.hpp.

synchronizer_

std::shared_ptr<Synchronizer> moveit_pro::behaviors::GetSyncedImages::synchronizer_

Definition at line 67 of file get_synced_images.hpp.

Public Static Functions

metadata()

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

Declaration at line 44 of file get_synced_images.hpp, definition at line 53 of file get_synced_images.cpp.

providedPorts()

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

Declaration at line 42 of file get_synced_images.hpp, definition at line 28 of file get_synced_images.cpp.

Private Static Attributes

kDescriptionGetSyncedImages

constexpr auto moveit_pro::behaviors::GetSyncedImages::kDescriptionGetSyncedImages
constexpr static
Initialiser
= R"(                 <p>                     Get data from time-synchronized image topics and populate them in output ports.                 </p>             )"

Definition at line 85 of file get_synced_images.hpp.

kMessageSyncQueueSize

constexpr std::size_t moveit_pro::behaviors::GetSyncedImages::kMessageSyncQueueSize = 10
constexpr static

Definition at line 72 of file get_synced_images.hpp.

kMessageSyncTimeout

constexpr std::chrono::seconds moveit_pro::behaviors::GetSyncedImages::kMessageSyncTimeout { 5 }
constexpr static

Definition at line 73 of file get_synced_images.hpp.

kOutputNameCameraInfo1

constexpr auto moveit_pro::behaviors::GetSyncedImages::kOutputNameCameraInfo1 = "camera_info_1"
constexpr static

Definition at line 81 of file get_synced_images.hpp.

kOutputNameCameraInfo2

constexpr auto moveit_pro::behaviors::GetSyncedImages::kOutputNameCameraInfo2 = "camera_info_2"
constexpr static

Definition at line 83 of file get_synced_images.hpp.

kOutputNameImage1

constexpr auto moveit_pro::behaviors::GetSyncedImages::kOutputNameImage1 = "image_1"
constexpr static

Definition at line 80 of file get_synced_images.hpp.

kOutputNameImage2

constexpr auto moveit_pro::behaviors::GetSyncedImages::kOutputNameImage2 = "image_2"
constexpr static

Definition at line 82 of file get_synced_images.hpp.

kTopicNameCameraInfo1

constexpr auto moveit_pro::behaviors::GetSyncedImages::kTopicNameCameraInfo1 = "camera_info_1_topic_name"
constexpr static

Definition at line 76 of file get_synced_images.hpp.

kTopicNameCameraInfo2

constexpr auto moveit_pro::behaviors::GetSyncedImages::kTopicNameCameraInfo2 = "camera_info_2_topic_name"
constexpr static

Definition at line 78 of file get_synced_images.hpp.

kTopicNameImage1

constexpr auto moveit_pro::behaviors::GetSyncedImages::kTopicNameImage1 = "image_1_topic_name"
constexpr static

Definition at line 75 of file get_synced_images.hpp.

kTopicNameImage2

constexpr auto moveit_pro::behaviors::GetSyncedImages::kTopicNameImage2 = "image_2_topic_name"
constexpr static

Definition at line 77 of file get_synced_images.hpp.


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


Generated via doxygen2docusaurus 2.2.2 by Doxygen 1.9.8.