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< ChOptixEngine > | GetEngine (int context_id) |
Get a pointer to the engine based on the id of the engine. More... | |
void | AddInstancedStaticSceneMeshes (std::vector< ChFrame<>> &frames, std::shared_ptr< ChTriangleMeshShape > mesh) |
Add many environment meshes that bypass the requirement to have them in the Chrono system. 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 | SetKeyframeSize (int size) |
Set the max number of keyframes to use when rendering motion blur. More... | |
int | GetKeyframeSize () |
Get the max number of keyframes to use when rendering motion blur. More... | |
void | SetKeyframeSizeFromTimeStep (float min_timestep, float max_collection_window) |
Set the max key frame size from a simulation time step and the largest collection window. 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< ChScene > | scene |
Public pointer to the scene. More... | |
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
◆ AddInstancedStaticSceneMeshes()
CH_SENSOR_API void chrono::sensor::ChSensorManager::AddInstancedStaticSceneMeshes | ( | std::vector< ChFrame<>> & | frames, |
std::shared_ptr< ChTriangleMeshShape > | mesh | ||
) |
Add many environment meshes that bypass the requirement to have them in the Chrono system.
This adds meshes that only exist in OptiX. Meshes will be removed upon call to ReconstructScenes().
◆ 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
◆ GetKeyframeSize()
|
inline |
Get the max number of keyframes to use when rendering motion blur.
- Returns
- the number of keyframes being used
◆ 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()
|
inline |
Get the number of engines the manager is currently using.
- Returns
- An integer number of OptiX engines
◆ GetRayRecursions()
|
inline |
Get the number of recursions used in ray tracing.
- Returns
- The max number of recursions used in ray tracing
◆ 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()
|
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.
◆ SetKeyframeSize()
CH_SENSOR_API void chrono::sensor::ChSensorManager::SetKeyframeSize | ( | int | size | ) |
Set the max number of keyframes to use when rendering motion blur.
- Parameters
-
size The number of keyframes
◆ SetKeyframeSizeFromTimeStep()
CH_SENSOR_API void chrono::sensor::ChSensorManager::SetKeyframeSizeFromTimeStep | ( | float | min_timestep, |
float | max_collection_window | ||
) |
Set the max key frame size from a simulation time step and the largest collection window.
- Parameters
-
min_timestep The estimated timestep to be used in the simulation max_collection_window The largest collection window of any rendering sensor (camera or lidar)
◆ 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()
|
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:
- /builds/uwsbel/chrono/src/chrono_sensor/ChSensorManager.h
- /builds/uwsbel/chrono/src/chrono_sensor/ChSensorManager.cpp