24 using Ptr = std::shared_ptr<SensorBase>;
52 const std::map<std::string, std::string>& varValues);
55 const std::shared_ptr<mrpt::obs::CObservation>& obs,
64 #define DECLARES_REGISTER_SENSOR(CLASS_NAME) \ 65 DECLARES_REGISTER_CLASS2( \ 66 CLASS_NAME, SensorBase, VehicleBase&, const rapidxml::xml_node<char>*) 68 #define REGISTER_SENSOR(TEXTUAL_NAME, CLASS_NAME) \ 70 TClassFactory_sensors, classFactory_sensors, TEXTUAL_NAME, CLASS_NAME)
static SensorBase::Ptr factory(VehicleBase &parent, const rapidxml::xml_node< char > *xml_node)
std::string publishTopic_
bool parseSensorPublish(const rapidxml::xml_node< char > *node, const std::map< std::string, std::string > &varValues)
void registerOnServer(mvsim::Client &c) override
(in seconds) (Default = 0.1)
SensorBase(VehicleBase &vehicle)
VehicleBase & m_vehicle
The vehicle this sensor is attached to.
void reportNewObservation(const std::shared_ptr< mrpt::obs::CObservation > &obs, const TSimulContext &context)
std::shared_ptr< SensorBase > Ptr
virtual ~SensorBase()
which the sensor is attached.
virtual void loadConfigFrom(const rapidxml::xml_node< char > *root)=0
TClassFactory_sensors classFactory_sensors
ClassFactory< SensorBase, VehicleBase &, const rapidxml::xml_node< char > * > TClassFactory_sensors
double m_sensor_last_timestamp