#include <SensorBase.h>
|
void | make_sure_we_have_a_name (const std::string &prefix) |
| Assign a sensible default name/sensor label if none is provided: More...
|
|
bool | parseSensorPublish (const rapidxml::xml_node< char > *node, const std::map< std::string, std::string > &varValues) |
|
void | reportNewObservation (const std::shared_ptr< mrpt::obs::CObservation > &obs, const TSimulContext &context) |
|
void | reportNewObservation_lidar_2d (const std::shared_ptr< mrpt::obs::CObservation2DRangeScan > &obs, const TSimulContext &context) |
|
bool | should_simulate_sensor (const TSimulContext &context) |
|
World * | world () |
|
const World * | world () const |
|
void | addCustomVisualization (const mrpt::opengl::CRenderizable::Ptr &glModel, const mrpt::poses::CPose3D &modelPose={}, const float modelScale=1.0f, const std::string &modelName="group", const std::optional< std::string > &modelURI=std::nullopt, const bool initialShowBoundingBox=false) |
|
virtual void | internalGuiUpdate (const mrpt::optional_ref< mrpt::opengl::COpenGLScene > &viz, const mrpt::optional_ref< mrpt::opengl::COpenGLScene > &physical, bool childrenOnly=false)=0 |
|
bool | parseVisual (const rapidxml::xml_node< char > &rootNode) |
| Returns true if there is at least one <visual>...</visual> entry. More...
|
|
bool | parseVisual (const JointXMLnode<> &rootNode) |
|
void | setCollisionShape (const Shape2p5 &cs) |
|
Definition at line 26 of file SensorBase.h.
◆ Ptr
◆ SensorBase()
SensorBase::SensorBase |
( |
Simulable & |
vehicle | ) |
|
Ctor takes a ref to the vehicle to which the sensor is attached.
Definition at line 83 of file SensorBase.cpp.
◆ ~SensorBase()
SensorBase::~SensorBase |
( |
| ) |
|
|
virtualdefault |
◆ factory()
Class factory: Creates a sensor from XML description of type "<sensor
class='CLASS_NAME'>...</sensor>".
Definition at line 92 of file SensorBase.cpp.
◆ GetAllSensorsFOVViz()
mrpt::opengl::CSetOfObjects::Ptr SensorBase::GetAllSensorsFOVViz |
( |
| ) |
|
|
static |
◆ GetAllSensorsOriginViz()
mrpt::opengl::CSetOfObjects::Ptr SensorBase::GetAllSensorsOriginViz |
( |
| ) |
|
|
static |
◆ loadConfigFrom()
◆ make_sure_we_have_a_name()
void SensorBase::make_sure_we_have_a_name |
( |
const std::string & |
prefix | ) |
|
|
protected |
Assign a sensible default name/sensor label if none is provided:
Definition at line 271 of file SensorBase.cpp.
◆ parseSensorPublish()
bool SensorBase::parseSensorPublish |
( |
const rapidxml::xml_node< char > * |
node, |
|
|
const std::map< std::string, std::string > & |
varValues |
|
) |
| |
|
protected |
◆ registerOnServer()
◆ RegisterSensorFOVViz()
void SensorBase::RegisterSensorFOVViz |
( |
const std::shared_ptr< mrpt::opengl::CSetOfObjects > & |
o | ) |
|
|
static |
◆ RegisterSensorOriginViz()
void SensorBase::RegisterSensorOriginViz |
( |
const std::shared_ptr< mrpt::opengl::CSetOfObjects > & |
o | ) |
|
|
static |
◆ reportNewObservation()
void SensorBase::reportNewObservation |
( |
const std::shared_ptr< mrpt::obs::CObservation > & |
obs, |
|
|
const TSimulContext & |
context |
|
) |
| |
|
protected |
◆ reportNewObservation_lidar_2d()
void SensorBase::reportNewObservation_lidar_2d |
( |
const std::shared_ptr< mrpt::obs::CObservation2DRangeScan > & |
obs, |
|
|
const TSimulContext & |
context |
|
) |
| |
|
protected |
◆ sensor_period()
double mvsim::SensorBase::sensor_period |
( |
| ) |
const |
|
inline |
◆ should_simulate_sensor()
bool SensorBase::should_simulate_sensor |
( |
const TSimulContext & |
context | ) |
|
|
protected |
Should be called within each derived class simul_post_timestep() method to update sensor_last_timestamp_ and check if the sensor should be simulated now, given the current simulation time, and the sensor rate in sensor_period_.
- Returns
- true if it is now time to simulate a new sensor reading, false otherwise.
Definition at line 283 of file SensorBase.cpp.
◆ simulateOn3DScene()
virtual void mvsim::SensorBase::simulateOn3DScene |
( |
[[maybe_unused] ] mrpt::opengl::COpenGLScene & |
gl_scene | ) |
|
|
inlinevirtual |
◆ world() [1/2]
World* mvsim::SensorBase::world |
( |
| ) |
|
|
inlineprotected |
◆ world() [2/2]
const World* mvsim::SensorBase::world |
( |
| ) |
const |
|
inlineprotected |
◆ publishTopic_
std::string mvsim::SensorBase::publishTopic_ |
|
protected |
Publish to MVSIM ZMQ topic stream, if not empty (default)
Definition at line 89 of file SensorBase.h.
◆ rawlog_io_
std::shared_ptr<mrpt::io::CFileGZOutputStream> mvsim::SensorBase::rawlog_io_ |
|
protected |
◆ save_to_rawlog_
std::string mvsim::SensorBase::save_to_rawlog_ |
|
protected |
◆ sensor_last_timestamp_
double mvsim::SensorBase::sensor_last_timestamp_ = 0 |
|
protected |
The last sensor reading timestamp. See sensor_period_
Definition at line 86 of file SensorBase.h.
◆ sensor_period_
double mvsim::SensorBase::sensor_period_ = 0.1 |
|
protected |
Generate one sensor reading every this period s
Definition at line 80 of file SensorBase.h.
◆ varValues_
std::map<std::string, std::string> mvsim::SensorBase::varValues_ |
|
protected |
◆ vehicle_
The vehicle this sensor is attached to.
Definition at line 74 of file SensorBase.h.
The documentation for this class was generated from the following files: