Go to the documentation of this file. 1 #ifndef GAZEBO_CUSTOM_SENSOR_PRELOADER_CUSTOMSENSORPRELOADER_H
2 #define GAZEBO_CUSTOM_SENSOR_PRELOADER_CUSTOMSENSORPRELOADER_H
4 #include <gazebo/common/Plugin.hh>
9 #include <unordered_set>
21 public:
void Load(
int _argc,
char **_argv)
override;
22 public:
void Init()
override;
23 public:
void Reset()
override;
42 const std::string& _classname,
43 const std::string& _fullname);
49 typedef std::tuple<registerFuncType, std::string, std::string, std::string>
registerTuple;
56 #endif //GAZEBO_CUSTOM_SENSOR_PRELOADER_CUSTOMSENSORPRELOADER_H
void Load(int _argc, char **_argv) override
virtual void DeferredPreloadSensors()
We need to register the sensors a little bit later, so we defer the calls to a separate thread.
std::tuple< registerFuncType, std::string, std::string, std::string > registerTuple
Registration function, type, classname, fullname.
~CustomSensorPreloader() override
std::unique_ptr< std::thread > deferredLoadThread
This thread performs the deferred preloading.
Gazebo system plugin which allows using custom sensors.
void(* registerFuncType)()
Type of the RegisterCustomSensor function generated by GZ_REGISTER_STATIC_SENSOR.
virtual void ProcessCustomSensor(const std::string &_type, const std::string &_classname, const std::string &_fullname)
Store one custom sensor registration function for deferred loading.
std::unordered_set< std::shared_ptr< registerTuple > > sensorsToRegister
A set of sensors waiting for deferred registration.