Template Class GazeboMonitorBasePlugin

Inheritance Relationships

Base Type

  • public SensorPlugin

Class Documentation

template<typename StartServiceT, typename StopServiceT>
class GazeboMonitorBasePlugin : public SensorPlugin

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

Public Types

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

Public Functions

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

Protected Functions

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

Protected Attributes

const std::string logger_prefix_
sdf::ElementPtr sdf_
physics::WorldPtr world_
sensors::GvmMulticameraSensorPtr sensor_
gazebo_ros::Node::SharedPtr ros_node_
rclcpp::Service<StartServiceT>::SharedPtr start_recording_service_
rclcpp::Service<StopServiceT>::SharedPtr stop_recording_service_
boost::filesystem::path save_path_