Project Chrono: chrono::sensor::ChSensorManager Class Reference

Public Member Functions | Public Attributes | List of all members
chrono::sensor::ChSensorManager Class Reference
SENSOR module

## Description

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

`#include <ChSensorManager.h>`

## Public Member Functions
| ChSensorManager (ChSystem *chrono_system)
| Class constructor.
| ~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.
std::vector< std::shared_ptr< ChSensor > > | GetSensorList ()
| Get the list of sensors for which this manager is responsible.
void | SetDeviceList (std::vector< unsigned int > device_ids)
| Set the list of devices (GPUs) that should be used for rendering.
std::vector< unsigned int > | GetDeviceList ()
| Get the list of devices that are intended for use.
int | GetNumEngines ()
| Get the number of engines the manager is currently using.
std::shared_ptr< ChOptixEngine > | GetEngine (int context_id)
| Get a pointer to the engine based on the id of the engine.
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.
void | SetMaxEngines (int num_groups)
| Set the maximum number of allowable optix engines.
void | SetRayRecursions (int rec)
| Set the number of recursions for ray tracing.
int | GetRayRecursions ()
| Get the number of recursions used in ray tracing.
void | SetVerbose (bool verbose)
| Set if the sensor framework should print all info.
bool | GetVerbose ()
| Get the verbose setting.

## Public Attributes
std::shared_ptr< ChScene > | scene
| Public pointer to the scene.

## Constructor & Destructor Documentation

## ◆ ChSensorManager()

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

Class constructor.

Parameters

  chrono_system | The 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

  sensor | The 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_id | The 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_ids | List 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_groups | The 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

  rec | The 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

  verbose | Whether 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:

- D:/W/B/src/chrono-9.0.1/src/chrono_sensor/ChSensorManager.h
- D:/W/B/src/chrono-9.0.1/src/chrono_sensor/ChSensorManager.cpp