chrono::sensor::ChOptixSensor Class Reference

Description

Optix sensor class - the base class for all sensors that interface with OptiX to generate and render their data.

#include <ChOptixSensor.h>

Inheritance diagram for chrono::sensor::ChOptixSensor:
Collaboration diagram for chrono::sensor::ChOptixSensor:

Public Member Functions

 ChOptixSensor (std::shared_ptr< chrono::ChBody > parent, float updateRate, chrono::ChFrame< double > offsetPose, unsigned int w, unsigned int h)
 Constructor for the base camera class that defaults to a pinhole lens model. More...
 
virtual ~ChOptixSensor ()
 camera class destructor
 
ProgramStringRenderProgramString ()
 virtual function for getting the string used for generating the ray-laucnh program More...
 
RTformat & RenderBufferFormat ()
 virtual function of getting the format for the output buffer More...
 
std::vector< std::tuple< std::string, RTobjecttype, void * > > & RayLaunchParameters ()
 virtual function for getting any additional render parameters need by the sensor More...
 
- Public Member Functions inherited from chrono::sensor::ChSensor
 ChSensor (std::shared_ptr< chrono::ChBody > parent, float updateRate, chrono::ChFrame< double > offsetPose)
 Constructor for the base sensor class. More...
 
virtual ~ChSensor ()
 Class destructor.
 
void SetOffsetPose (chrono::ChFrame< double > pose)
 Set the sensor's relative position and orientation. More...
 
ChFrame< double > GetOffsetPose ()
 Get the sensor's relative position and orientation. More...
 
std::shared_ptr< ChBodyGetParent () const
 Get the object to which the sensor is attached. More...
 
void SetName (std::string name)
 Set the sensor's name. More...
 
std::string GetName () const
 Get the name of the sensor. More...
 
float GetUpdateRate () const
 Get the sensor update rate (Hz) More...
 
void SetLag (float t)
 Set the lag parameter. More...
 
float GetLag () const
 Get the sensor lag (seconds) More...
 
void SetCollectionWindow (float t)
 Set the collection window. More...
 
float GetCollectionWindow () const
 Get the sensor data collection window (seconds) More...
 
void SetUpdateRate (float updateRate)
 Set the sensor update rate (Hz) More...
 
unsigned int GetNumLaunches ()
 Get the number of times the sensor has been updated. More...
 
void IncrementNumLaunches ()
 Increments the count of number of updates.
 
std::list< std::shared_ptr< ChFilter > > GetFilterList () const
 Get the sensor's list of filters. More...
 
void PushFilter (std::shared_ptr< ChFilter > filter)
 Add a filter to the sensor. More...
 
void LockFilterList ()
 Gives ability to lock the filter list to prevent race conditions. More...
 
template<class UserBufferType >
UserBufferType GetMostRecentBuffer ()
 Get the last filter in the list that matches the template type. More...
 
template<>
CH_SENSOR_API UserR8BufferPtr GetMostRecentBuffer ()
 
template<>
CH_SENSOR_API UserRGBA8BufferPtr GetMostRecentBuffer ()
 
template<>
CH_SENSOR_API UserDIBufferPtr GetMostRecentBuffer ()
 
template<>
CH_SENSOR_API UserXYZIBufferPtr GetMostRecentBuffer ()
 
template<>
CH_SENSOR_API UserIMUBufferPtr GetMostRecentBuffer ()
 
template<>
CH_SENSOR_API UserGPSBufferPtr GetMostRecentBuffer ()
 

Protected Attributes

ProgramString m_program_string
 the string tuple that specifies the file and name of the ray generation program
 
RTformat m_buffer_format
 the format of the output buffer
 
std::vector< std::tuple< std::string, RTobjecttype, void * > > m_ray_launch_params
 holder of any additional ray generation parameters we need to pass to OptiX
 
- Protected Attributes inherited from chrono::sensor::ChSensor
float m_updateRate
 sensor update rate
 
float m_lag
 sensor lag from the time all scene information is available (sensor processing time)
 
float m_collection_window
 time over which data is collected. More...
 
float m_timeLastUpdated
 time since previous update
 
std::shared_ptr< chrono::ChBodym_parent
 object to which the sensor is attached
 
chrono::ChFrame< double > m_offsetPose
 position and orientation of the sensor relative to its parent
 
std::string m_name
 name of the sensor
 
unsigned int m_num_launches
 number of times the sensor has been updated
 
std::list< std::shared_ptr< ChFilter > > m_filters
 filter list for post-processing sensor data
 
bool m_filter_list_locked = false
 gives ability to lock the filter list to prevent race conditions
 

Friends

class ChFilterOptixRender
 ChFilterOptixRender is allowed to set and use the private members.
 
class ChOptixEngine
 ChOptixEngine is allowed to set and use the private members.
 

Constructor & Destructor Documentation

◆ ChOptixSensor()

CH_SENSOR_API chrono::sensor::ChOptixSensor::ChOptixSensor ( std::shared_ptr< chrono::ChBody parent,
float  updateRate,
chrono::ChFrame< double >  offsetPose,
unsigned int  w,
unsigned int  h 
)

Constructor for the base camera class that defaults to a pinhole lens model.

Parameters
parentBody to which the sensor is attached.
updateRateRate at which the sensor should update.
offsetPoseRelative position and orientation of the sensor with respect to its parent object.
wWidth of the data the sensor should generate
hHeight of the data the sensor should generate

Member Function Documentation

◆ RayLaunchParameters()

std::vector<std::tuple<std::string, RTobjecttype, void*> >& chrono::sensor::ChOptixSensor::RayLaunchParameters ( )
inline

virtual function for getting any additional render parameters need by the sensor

Returns
the list of parameters that need to be passed to the ray launch program of the sensor.

◆ RenderBufferFormat()

RTformat& chrono::sensor::ChOptixSensor::RenderBufferFormat ( )
inline

virtual function of getting the format for the output buffer

Returns
The buffer format type that the sensor uses.

◆ RenderProgramString()

ProgramString& chrono::sensor::ChOptixSensor::RenderProgramString ( )
inline

virtual function for getting the string used for generating the ray-laucnh program

Returns
The combination of file name and function name that specifies the render program

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