Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
gazebo::GazeboMonitorBasePlugin Class Referenceabstract

Abstract base monitor class. More...

#include <gazebo_monitor_base_plugin.h>

Inheritance diagram for gazebo::GazeboMonitorBasePlugin:
Inheritance graph
[legend]

Public Types

using ImageDataPtrVector = std::vector< sensors::GvmMulticameraSensor::ImageDataPtr >
 

Public Member Functions

 GazeboMonitorBasePlugin (const std::string &name)
 
virtual void Init () override
 
virtual void Load (sensors::SensorPtr _sensor, sdf::ElementPtr _sdf) override
 
virtual ~GazeboMonitorBasePlugin () override
 

Protected Member Functions

RefModelConfigConstPtr getCameraRefConfig (const std::string &name) const
 
void initialize ()
 
virtual void initRos ()
 
virtual void onNewImages (const ImageDataPtrVector &images)=0
 

Protected Attributes

const std::string logger_prefix_
 
ros::NodeHandlePtr nh_
 
boost::filesystem::path save_path_
 
sdf::ElementPtr sdf_
 
sensors::GvmMulticameraSensorPtr sensor_
 
ros::ServiceServer start_recording_service_
 
ros::ServiceServer stop_recording_service_
 
physics::WorldPtr world_
 

Private Attributes

ros::CallbackQueue callback_queue_
 
std::unordered_map< std::string, RefModelConfigConstPtrcam_ref_configs_
 
std::thread deferred_init_thread_
 
event::ConnectionPtr new_images_connection_
 
ros::AsyncSpinner spinner_
 
std::atomic_bool terminating_
 

Detailed Description

Abstract base monitor class.

Hosts common monitor members, and partially initializes the monitor.

Note
Expects the following configuration:
  • setCameraService: name of the service for configuring a camera
  • savePath: path to which to save recordings
  • numberOfInitialAttachRetries (optional, defaults to 0): number of times to retry attaching the cameras during initialization

Definition at line 46 of file gazebo_monitor_base_plugin.h.

Member Typedef Documentation

◆ ImageDataPtrVector

Definition at line 49 of file gazebo_monitor_base_plugin.h.

Constructor & Destructor Documentation

◆ GazeboMonitorBasePlugin()

gazebo::GazeboMonitorBasePlugin::GazeboMonitorBasePlugin ( const std::string &  name)

Definition at line 25 of file gazebo_monitor_base_plugin.cpp.

◆ ~GazeboMonitorBasePlugin()

gazebo::GazeboMonitorBasePlugin::~GazeboMonitorBasePlugin ( )
overridevirtual

Definition at line 30 of file gazebo_monitor_base_plugin.cpp.

Member Function Documentation

◆ getCameraRefConfig()

RefModelConfigConstPtr gazebo::GazeboMonitorBasePlugin::getCameraRefConfig ( const std::string &  name) const
protected

Definition at line 139 of file gazebo_monitor_base_plugin.cpp.

◆ Init()

void gazebo::GazeboMonitorBasePlugin::Init ( )
overridevirtual

Definition at line 82 of file gazebo_monitor_base_plugin.cpp.

◆ initialize()

void gazebo::GazeboMonitorBasePlugin::initialize ( )
protected

Definition at line 96 of file gazebo_monitor_base_plugin.cpp.

◆ initRos()

void gazebo::GazeboMonitorBasePlugin::initRos ( )
protectedvirtual

◆ Load()

void gazebo::GazeboMonitorBasePlugin::Load ( sensors::SensorPtr  _sensor,
sdf::ElementPtr  _sdf 
)
overridevirtual

◆ onNewImages()

virtual void gazebo::GazeboMonitorBasePlugin::onNewImages ( const ImageDataPtrVector images)
protectedpure virtual

Member Data Documentation

◆ callback_queue_

ros::CallbackQueue gazebo::GazeboMonitorBasePlugin::callback_queue_
private

Definition at line 82 of file gazebo_monitor_base_plugin.h.

◆ cam_ref_configs_

std::unordered_map<std::string, RefModelConfigConstPtr> gazebo::GazeboMonitorBasePlugin::cam_ref_configs_
private

Definition at line 75 of file gazebo_monitor_base_plugin.h.

◆ deferred_init_thread_

std::thread gazebo::GazeboMonitorBasePlugin::deferred_init_thread_
private

Definition at line 77 of file gazebo_monitor_base_plugin.h.

◆ logger_prefix_

const std::string gazebo::GazeboMonitorBasePlugin::logger_prefix_
protected

Definition at line 61 of file gazebo_monitor_base_plugin.h.

◆ new_images_connection_

event::ConnectionPtr gazebo::GazeboMonitorBasePlugin::new_images_connection_
private

Definition at line 80 of file gazebo_monitor_base_plugin.h.

◆ nh_

ros::NodeHandlePtr gazebo::GazeboMonitorBasePlugin::nh_
protected

Definition at line 67 of file gazebo_monitor_base_plugin.h.

◆ save_path_

boost::filesystem::path gazebo::GazeboMonitorBasePlugin::save_path_
protected

Definition at line 72 of file gazebo_monitor_base_plugin.h.

◆ sdf_

sdf::ElementPtr gazebo::GazeboMonitorBasePlugin::sdf_
protected

Definition at line 63 of file gazebo_monitor_base_plugin.h.

◆ sensor_

sensors::GvmMulticameraSensorPtr gazebo::GazeboMonitorBasePlugin::sensor_
protected

Definition at line 65 of file gazebo_monitor_base_plugin.h.

◆ spinner_

ros::AsyncSpinner gazebo::GazeboMonitorBasePlugin::spinner_
private

Definition at line 83 of file gazebo_monitor_base_plugin.h.

◆ start_recording_service_

ros::ServiceServer gazebo::GazeboMonitorBasePlugin::start_recording_service_
protected

Definition at line 69 of file gazebo_monitor_base_plugin.h.

◆ stop_recording_service_

ros::ServiceServer gazebo::GazeboMonitorBasePlugin::stop_recording_service_
protected

Definition at line 70 of file gazebo_monitor_base_plugin.h.

◆ terminating_

std::atomic_bool gazebo::GazeboMonitorBasePlugin::terminating_
private

Definition at line 78 of file gazebo_monitor_base_plugin.h.

◆ world_

physics::WorldPtr gazebo::GazeboMonitorBasePlugin::world_
protected

Definition at line 64 of file gazebo_monitor_base_plugin.h.


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


gazebo_video_monitor_plugins
Author(s): Nick Lamprianidis
autogenerated on Tue Oct 24 2023 02:12:50