Go to the documentation of this file.
93 const std::string& iniSection);
123 void bindIO(
const std::shared_ptr<mrpt::io::CStream>& streamIO);
130 bool& outThereIsObservation,
132 bool& hardwareError);
143 bool& outThereIsObservation,
145 bool& hardwareError) = 0;
mrpt::gui::CDisplayWindow3D::Ptr m_win
#define INVALID_TIMESTAMP
Represents an invalid timestamp, where applicable.
bool internal_notifyNoScanReceived()
Must be called from doProcessSimple() implementations.
A "CObservation"-derived class that represents a 2D range scan measurement (typically from a laser sc...
void bindIO(const std::shared_ptr< mrpt::io::CStream > &streamIO)
Binds the object to a given I/O channel.
~C2DRangeFinderAbstract() override
Destructor.
virtual bool turnOn()=0
Enables the scanning mode (which may depend on the specific laser device); this must be called before...
virtual void doProcessSimple(bool &outThereIsObservation, mrpt::obs::CObservation2DRangeScan &outObservation, bool &hardwareError)=0
Specific laser scanner "software drivers" must process here new data from the I/O stream,...
void filterByExclusionAngles(mrpt::obs::CObservation2DRangeScan &obs) const
Mark as invalid those ranges in a set of forbiden angle ranges.
Contains classes for various device interfaces.
void internal_notifyGoodScanNow()
Must be called from doProcessSimple() implementations.
void showPreview(bool enable=true)
Enables GUI visualization in real-time.
int m_failure_waiting_scan_counter
Used in internal_notifyNoScanReceived()
mrpt::system::TTimeStamp m_last_good_scan
Used in internal_notifyGoodScanNow()
std::shared_ptr< mrpt::obs ::CObservation2DRangeScan > Ptr
C2DRangeFinderAbstract()
Default constructor.
void getObservation(bool &outThereIsObservation, mrpt::obs::CObservation2DRangeScan &outObservation, bool &hardwareError)
Get the last observation from the sensor, if available, and unmarks it as being "the last one" (thus ...
This is the base, abstract class for "software drivers" interfaces to 2D scanners (laser range finder...
virtual bool turnOff()=0
Disables the scanning mode (this can be used to turn the device in low energy mode,...
mrpt::obs::CObservation2DRangeScan::TListExclusionAreasWithRanges m_lstExclusionPolys
A list of optional exclusion polygons, in coordinates relative to the vehicle, that is,...
This class allows loading and storing values and vectors of different types from a configuration text...
std::vector< std::pair< mrpt::math::CPolygon, std::pair< double, double > >> TListExclusionAreasWithRanges
Used in filterByExclusionAreas.
void loadCommonParams(const mrpt::config::CConfigFileBase &configSource, const std::string &iniSection)
Should be call by derived classes at "loadConfig" (loads exclusion areas AND exclusion angles).
mrpt::obs::CObservation2DRangeScan::Ptr m_nextObservation
A dynamic object used as buffer in doProcess.
std::mutex m_csChangeStream
For being thread-safe.
std::shared_ptr< CDisplayWindow3D > Ptr
bool m_lastObservationIsNew
mrpt::Clock::time_point TTimeStamp
A system independent time type, it holds the the number of 100-nanosecond intervals since January 1,...
int m_max_missed_scan_failures
double m_estimated_scan_period
Updated in internal_notifyGoodScanNow()
A generic interface for a wide-variety of sensors designed to be used in the application RawLogGrabbe...
bool m_showPreview
If true, shows a 3D window with a preview of the grabber data.
Versatile class for consistent logging and management of output messages.
void processPreview(const mrpt::obs::CObservation2DRangeScan &obs)
Must be called inside the capture method to allow optional GUI preview of scans.
mrpt::obs::CObservation2DRangeScan m_lastObservation
std::vector< std::pair< double, double > > m_lstExclusionAngles
A list of pairs of angles <init,end> such as all sensor ranges falling in those forbiden angles will ...
std::shared_ptr< mrpt::io::CStream > m_stream
The I/O channel (will be nullptr if not bound).
double getEstimatedScanPeriod() const
Returns the empirical, filtered estimation for the period at which whole scans are being returned fro...
std::mutex m_csLastObservation
void doProcess() override
Main method for a CGenericSensor.
void filterByExclusionAreas(mrpt::obs::CObservation2DRangeScan &obs) const
Mark as invalid those points which (x,y) coordinates fall within the exclusion polygons.
Page generated by Doxygen 1.8.18 for MRPT 2.0.4 at Thu Sep 24 07:14:18 UTC 2020 | |