chrono::sensor::ChFilterVisualizePointCloud Class Reference

Description

A filter that, when applied to a sensor, creates a GUI window to visualize the sensor (using GLFW).

This visualizes data as a point cloud. Will only work on data that can be interpreted as point cloud data.

#include <ChFilterVisualizePointCloud.h>

Inheritance diagram for chrono::sensor::ChFilterVisualizePointCloud:
Collaboration diagram for chrono::sensor::ChFilterVisualizePointCloud:

Public Member Functions

 ChFilterVisualizePointCloud (int w, int h, float zoom, std::string name="ChFilterVisualizePointCloud")
 Class constructor. More...
 
virtual ~ChFilterVisualizePointCloud ()
 Class destructor.
 
virtual void Apply ()
 Apply function. Visualizes data as an image.
 
virtual void Initialize (std::shared_ptr< ChSensor > pSensor, std::shared_ptr< SensorBuffer > &bufferInOut)
 Initializes all data needed by the filter access apply function. More...
 
- Public Member Functions inherited from chrono::sensor::ChFilterVisualize
 ChFilterVisualize (int w, int h, std::string name="ChFilterVisualize", bool fullscreen=false)
 Class constructor. More...
 
virtual ~ChFilterVisualize ()
 Class destructor.
 
- Public Member Functions inherited from chrono::sensor::ChFilter
virtual ~ChFilter ()
 Virtual class desctructor.
 
std::string & Name ()
 Accesses the name of the filter. More...
 

Additional Inherited Members

- Protected Member Functions inherited from chrono::sensor::ChFilterVisualize
void CreateGlfwWindow (std::string m_name)
 Creates a GLFW window for this filter.
 
- Protected Member Functions inherited from chrono::sensor::ChFilter
 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.
 
- Static Protected Member Functions inherited from chrono::sensor::ChFilterVisualize
static void OnNewWindow ()
 Helper function for when new window is created.
 
static void OnCloseWindow ()
 Helper function for when window is closed.
 
- Protected Attributes inherited from chrono::sensor::ChFilterVisualize
std::shared_ptr< SensorDeviceR8Bufferm_bufferR8
 
std::shared_ptr< SensorDeviceRGBA8Bufferm_bufferRGBA8
 
std::shared_ptr< SensorDeviceSemanticBufferm_bufferSemantic
 
std::shared_ptr< SensorDeviceDIBufferm_bufferDI
 
std::shared_ptr< SensorDeviceRadarBufferm_bufferRadar
 
std::shared_ptr< SensorHostR8Bufferm_hostR8
 
std::shared_ptr< SensorHostRGBA8Bufferm_hostRGBA8
 
std::shared_ptr< SensorHostSemanticBufferm_hostSemantic
 
std::shared_ptr< SensorHostDIBufferm_hostDI
 
std::shared_ptr< SensorHostRadarBufferm_hostRadar
 
CUstream m_cuda_stream
 reference to the cuda stream
 
unsigned int m_gl_tex_id = 0
 reference data for the GL context and texture
 
bool m_window_disabled = false
 for checking if window is not allowed on sysmtem (e.g. headless rendering)
 
int m_w
 width of the window
 
int m_h
 height of the window
 
bool m_fullscreen
 toggle for fullscreen mode
 
- Static Protected Attributes inherited from chrono::sensor::ChFilterVisualize
static int s_windowCount = 0
 keeps track of the window count
 
static std::mutex s_glfwMutex
 mutex to prevent us making two windows at the exact same time
 

Constructor & Destructor Documentation

◆ ChFilterVisualizePointCloud()

CH_SENSOR_API chrono::sensor::ChFilterVisualizePointCloud::ChFilterVisualizePointCloud ( int  w,
int  h,
float  zoom,
std::string  name = "ChFilterVisualizePointCloud" 
)

Class constructor.

Parameters
wWidth of the window to create
hHeight of the window to create
zoomValue to multiply by the default box in which points are viewed
nameString name of the filter

Member Function Documentation

◆ Initialize()

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

Initializes all data needed by the filter access apply function.

Parameters
pSensorA pointer to the sensor on which the filter is attached.
bufferInOutA buffer that is passed into the filter.

Reimplemented from chrono::sensor::ChFilterVisualize.


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