Description

Base class for all filters that can be applied to a sensor after initial rendering.

Any filters that will be added to a sensor must inherit from here.

#include <ChFilter.h>

Inheritance diagram for chrono::sensor::ChFilter:

Public Member Functions

virtual ~ChFilter ()
 Virtual class desctructor.
 
virtual void Apply ()=0
 Virtual apply function. More...
 
virtual void Initialize (std::shared_ptr< ChSensor > pSensor, std::shared_ptr< SensorBuffer > &bufferInOut)=0
 Virtual initialize function. More...
 
std::string & Name ()
 Accesses the name of the filter. More...
 

Protected Member Functions

 ChFilter (std::string name)
 protected constructor for the filter which requires a name as input. More...
 
void InvalidFilterGraphNullBuffer (std::shared_ptr< ChSensor > pSensor)
 Error function for invalid filter graph: null buffer found.
 
void InvalidFilterGraphBufferTypeMismatch (std::shared_ptr< ChSensor > pSensor)
 Error function for invalid filter graph: type mismatch in graph.
 
void InvalidFilterGraphSensorTypeMismatch (std::shared_ptr< ChSensor > pSensor)
 Error function for invalid filter graph: type mismatch in graph.
 

Constructor & Destructor Documentation

◆ ChFilter()

chrono::sensor::ChFilter::ChFilter ( std::string  name)
inlineprotected

protected constructor for the filter which requires a name as input.

Parameters
nameA string name of the filter.

Member Function Documentation

◆ Apply()

virtual void chrono::sensor::ChFilter::Apply ( )
pure virtual

Virtual apply function.

This will be called sequentially for all filters in a filter list. This should contain the necessary processing during the simulation. This must be threadsafe when applied to a ChOptixSensor.

Implemented in chrono::sensor::ChFilterAccess< BufferType, UserBufferType >, chrono::sensor::ChFilterAccess< BufferType, UserBufferType >, chrono::sensor::ChFilterAccess< BufferType, UserBufferType >, chrono::sensor::ChFilterAccess< BufferType, UserBufferType >, chrono::sensor::ChFilterAccess< BufferType, UserBufferType >, chrono::sensor::ChFilterAccess< BufferType, UserBufferType >, chrono::sensor::ChFilterAccess< BufferType, UserBufferType >, chrono::sensor::ChFilterAccess< BufferType, UserBufferType >, chrono::sensor::ChFilterAccess< BufferType, UserBufferType >, chrono::sensor::ChFilterAccess< BufferType, UserBufferType >, chrono::sensor::ChFilterMagnetometerUpdate, chrono::sensor::ChFilterImgAlias, chrono::sensor::ChFilterCameraNoisePixDep, chrono::sensor::ChFilterOptixRender, chrono::sensor::ChFilterGyroscopeUpdate, chrono::sensor::ChFilterAccess< BufferType, UserBufferType >, chrono::sensor::ChFilterImageResize, chrono::sensor::ChFilterAccess< BufferType, UserBufferType >, chrono::sensor::ChFilterVisualize, chrono::sensor::ChFilterAccelerometerUpdate, chrono::sensor::ChFilterVisualizePointCloud, chrono::sensor::ChFilterLidarNoiseXYZI, chrono::sensor::ChFilterGPSUpdate, chrono::sensor::ChFilterRadarSavePC, chrono::sensor::ChFilterSave, chrono::sensor::ChFilterSavePtCloud, chrono::sensor::ChFilterRadarProcess, chrono::sensor::ChFilterUFF, chrono::sensor::ChFilterCameraNoiseConstNormal, chrono::sensor::ChFilterONNX, chrono::sensor::ChFilterGrayscale, chrono::sensor::ChFilterImageHalf4ToRGBA8, chrono::sensor::ChFilterPCfromDepth, and chrono::sensor::ChFilterAccess< BufferType, UserBufferType >.

◆ Initialize()

virtual void chrono::sensor::ChFilter::Initialize ( std::shared_ptr< ChSensor pSensor,
std::shared_ptr< SensorBuffer > &  bufferInOut 
)
pure virtual

Virtual initialize function.

This will be called once when added to the ChSensorManager. It should create all the necessary memory space and setup any data that will be needed in the apply function. This function does not need to be threadsafe so can be used to access and store any sensor specific information that is needed later.

Parameters
pSensorA pointer to the sensor to which it is attached
bufferInOutThe pointer that is passed from one filter to the next. Can be changed by the filter when augmentation does not happen in place.

Implemented in chrono::sensor::ChFilterMagnetometerUpdate, chrono::sensor::ChFilterImgAlias, chrono::sensor::ChFilterCameraNoisePixDep, chrono::sensor::ChFilterOptixRender, chrono::sensor::ChFilterGyroscopeUpdate, chrono::sensor::ChFilterImageResize, chrono::sensor::ChFilterAccess< BufferType, UserBufferType >, chrono::sensor::ChFilterVisualize, chrono::sensor::ChFilterVisualizePointCloud, chrono::sensor::ChFilterAccelerometerUpdate, chrono::sensor::ChFilterLidarNoiseXYZI, chrono::sensor::ChFilterGPSUpdate, chrono::sensor::ChFilterRadarSavePC, chrono::sensor::ChFilterSave, chrono::sensor::ChFilterSavePtCloud, chrono::sensor::ChFilterRadarProcess, chrono::sensor::ChFilterCameraNoiseConstNormal, chrono::sensor::ChFilterUFF, chrono::sensor::ChFilterGrayscale, chrono::sensor::ChFilterONNX, chrono::sensor::ChFilterImageHalf4ToRGBA8, and chrono::sensor::ChFilterPCfromDepth.

◆ Name()

std::string& chrono::sensor::ChFilter::Name ( )
inline

Accesses the name of the filter.

Name not used for any critical processes. Optional use for clarity. A string reference to the filter's name.


The documentation for this class was generated from the following files:
  • /builds/uwsbel/chrono/src/chrono_sensor/filters/ChFilter.h
  • /builds/uwsbel/chrono/src/chrono_sensor/filters/ChFilter.cpp