chrono::sensor::ChSensorManager Class Reference

Description

class for managing sensors. This is the Sensor system class.

#include <ChSensorManager.h>

Public Member Functions

 ChSensorManager (ChSystem *chrono_system)
 Class constructor. More...
 
 ~ChSensorManager ()
 Class destructor.
 
void Update ()
 Update function that will prompt the manager to update its sensors if they need to be updated according to the current time of the chrono simulation.
 
void AddSensor (std::shared_ptr< ChSensor > sensor)
 Add a sensor to the manager. More...
 
std::vector< std::shared_ptr< ChSensor > > GetSensorList ()
 Get the list of sensors for which this manager is responsible. More...
 
void SetDeviceList (std::vector< unsigned int > device_ids)
 Set the list of devices (GPUs) that should be used for rendering. More...
 
std::vector< unsigned int > GetDeviceList ()
 Get the list of devices that are intended for use. More...
 
int GetNumEngines ()
 Get the number of engines the manager is currently using. More...
 
std::shared_ptr< ChOptixEngineGetEngine (int context_id)
 Get a pointer to the engine based on the id of the engine. More...
 
void ReconstructScenes ()
 Calls on the sensor manager to rebuild the scene, translating all objects from the Chrono system into their appropriate optix objects.
 
int GetMaxEngines ()
 Get the maximum number of allowed OptiX Engines for the manager. More...
 
void SetMaxEngines (int num_groups)
 Set the maximum number of allowable optix engines. More...
 
void SetRayRecursions (int rec)
 Set the number of recursions for ray tracing. More...
 
int GetRayRecursions ()
 Get the number of recursions used in ray tracing. More...
 
void SetVerbose (bool verbose)
 Set if the sensor framework should print all info. More...
 
bool GetVerbose ()
 Get the verbose setting. More...
 

Public Attributes

std::shared_ptr< ChScenescene
 Public pointer to the scene. More...
 

Constructor & Destructor Documentation

◆ ChSensorManager()

CH_SENSOR_API chrono::sensor::ChSensorManager::ChSensorManager ( ChSystem chrono_system)

Class constructor.

Parameters
chrono_systemThe chrono system with which the sensor manager is associated. Used for time management. created.

Member Function Documentation

◆ AddSensor()

CH_SENSOR_API void chrono::sensor::ChSensorManager::AddSensor ( std::shared_ptr< ChSensor sensor)

Add a sensor to the manager.

Parameters
sensorThe sensor that should be added to the system

◆ GetDeviceList()

CH_SENSOR_API std::vector< unsigned int > chrono::sensor::ChSensorManager::GetDeviceList ( )

Get the list of devices that are intended for use.

Returns
List of device IDs that the manager will try to use when rendering.

◆ GetEngine()

CH_SENSOR_API std::shared_ptr< ChOptixEngine > chrono::sensor::ChSensorManager::GetEngine ( int  context_id)

Get a pointer to the engine based on the id of the engine.

Parameters
context_idThe ID of the engine to be returned
Returns
A shared pointer to an OptiX engine the manager is using

◆ GetMaxEngines()

int chrono::sensor::ChSensorManager::GetMaxEngines ( )
inline

Get the maximum number of allowed OptiX Engines for the manager.

Returns
An integer specifying the maximum number of engines the manager is allowed to create.

◆ GetNumEngines()

int chrono::sensor::ChSensorManager::GetNumEngines ( )
inline

Get the number of engines the manager is currently using.

Returns
An integer number of OptiX engines

◆ GetRayRecursions()

int chrono::sensor::ChSensorManager::GetRayRecursions ( )
inline

Get the number of recursions used in ray tracing.

Returns
The max number of recursions used in ray tracing

◆ GetSensorList()

std::vector<std::shared_ptr<ChSensor> > chrono::sensor::ChSensorManager::GetSensorList ( )
inline

Get the list of sensors for which this manager is responsible.

Returns
The list of sensors for which the manager is responsible and updates

◆ GetVerbose()

bool chrono::sensor::ChSensorManager::GetVerbose ( )
inline

Get the verbose setting.

Returns
The verbose setting

◆ SetDeviceList()

CH_SENSOR_API void chrono::sensor::ChSensorManager::SetDeviceList ( std::vector< unsigned int >  device_ids)

Set the list of devices (GPUs) that should be used for rendering.

Parameters
device_idsList of IDs corresponding to the devices (GPUs) that should be used.

◆ SetMaxEngines()

CH_SENSOR_API void chrono::sensor::ChSensorManager::SetMaxEngines ( int  num_groups)

Set the maximum number of allowable optix engines.

The manager will spawn up to this number of optix engines (separate threads for rendering) based on the update rate of the sensors. Sensors with similar update rates will be grouped on the same engine to reduce the number of scene updates that are required as this is a major bottleneck in the multithreading paradigm of the render engine.

Parameters
num_groupsThe maximum number of optix engines the manager is allowed to create.

◆ SetRayRecursions()

CH_SENSOR_API void chrono::sensor::ChSensorManager::SetRayRecursions ( int  rec)

Set the number of recursions for ray tracing.

Parameters
recThe max number of recursions allowed in ray tracing

◆ SetVerbose()

void chrono::sensor::ChSensorManager::SetVerbose ( bool  verbose)
inline

Set if the sensor framework should print all info.

Parameters
verboseWhether the framework should print info

Member Data Documentation

◆ scene

std::shared_ptr<ChScene> chrono::sensor::ChSensorManager::scene

Public pointer to the scene.

This is used to specify additional componenets include lights, background colors, etc


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