Description

Collaboration diagram for OptiX-Based Code:

Classes

struct  PointLight
 Packed parameters of a point light. More...
 
struct  CameraMissParameters
 The parameters associated with camera miss data. A.K.A background data. More...
 
struct  MissParameters
 The parameters for a camera miss record. More...
 
struct  CameraParameters
 The parameters needed to define a camera. More...
 
struct  SemanticCameraParameters
 Parameters need to define a camera that generates semantic segmentation data. More...
 
struct  LidarParameters
 Parameters used to define a lidar. More...
 
struct  RadarParameters
 Parameters used to define a radar. More...
 
struct  RaygenParameters
 Parameters for specifying raygen programs. More...
 
struct  MeshParameters
 All the data to specific a triangle mesh. More...
 
struct  MaterialParameters
 All parameters for specifying a material in optix. More...
 
struct  ContextParameters
 Parameters associated with the entire optix scene. More...
 
struct  MaterialRecordParameters
 Parameters associated with a single object in the scnee. More...
 
struct  PerRayData_camera
 Data associated with a single camera ray. More...
 
struct  PerRayData_semantic
 Data associated with a single segmentation camera ray. More...
 
struct  PerRayData_shadow
 Data associated with a single shadow ray. More...
 
struct  PerRayData_lidar
 Data associated with a single lidar ray. More...
 
struct  PerRayData_radar
 Data associated with a single radar ray. More...
 
class  chrono::sensor::ChOptixEngine
 Optix Engine that is responsible for managing all render-based sensors. More...
 
struct  chrono::sensor::Transform
 Transform struct for packing a translation, rotation, and scale. More...
 
class  chrono::sensor::ChOptixGeometry
 Optix Geometry class that is responsible for managing all geometric information in the optix scene This handles the acceleration structure and transforms. More...
 
class  chrono::sensor::ChOptixPipeline
 Class to hold all the Shader Binding Table parameters adnd manage the ray tracing pipeline, materials, ray gen programs. More...
 
struct  chrono::sensor::ProgramString
 holds string values for ptx file and ray generation program More...
 
struct  chrono::sensor::ByteImageData
 stores image data More...
 

Macros

#define OPTIX_ERROR_CHECK(result)
 Checks the output of an optix call for any error, will throw a runtime error if not success. More...
 
#define CUDA_ERROR_CHECK(result)
 Checks the output of a cuda call for any error, will throw a runtime error if not success. More...
 

Enumerations

enum  RayType {
  CAMERA_RAY_TYPE = 0, SHADOW_RAY_TYPE = 1, LIDAR_RAY_TYPE = 2, RADAR_RAY_TYPE = 3,
  SEGMENTATION_RAY_TYPE = 4
}
 Ray types, used to determine the shading and miss functions for populating ray information. More...
 
enum  BackgroundMode { BackgroundMode::SOLID_COLOR, BackgroundMode::GRADIENT, BackgroundMode::ENVIRONMENT_MAP }
 Type of background to be spherically mapped when rays miss all objects in the scene. More...
 
enum  LidarBeamShape { LidarBeamShape::RECTANGULAR, LidarBeamShape::ELLIPTICAL }
 The shape of a lidar beam. More...
 
enum  RadarReturnMode { RadarReturnMode::RETURN, RadarReturnMode::TRACK }
 The mode used when determining what data the radar should return. More...
 
enum  chrono::sensor::PipelineType {
  chrono::sensor::PipelineType::CAMERA_PINHOLE, chrono::sensor::PipelineType::CAMERA_FOV_LENS, chrono::sensor::PipelineType::SEGMENTATION_PINHOLE, chrono::sensor::PipelineType::SEGMENTATION_FOV_LENS,
  chrono::sensor::PipelineType::LIDAR_SINGLE, chrono::sensor::PipelineType::LIDAR_MULTI, chrono::sensor::PipelineType::RADAR
}
 The type of ray tracing used to model the sensor. More...
 

Functions

void chrono::sensor::GetShaderFromFile (OptixDeviceContext context, OptixModule &module, std::string file_name, OptixModuleCompileOptions &module_compile_options, OptixPipelineCompileOptions &pipeline_compile_options)
 launches ray generation program More...
 
void chrono::sensor::optix_log_callback (unsigned int level, const char *tag, const char *message, void *)
 
ByteImageData chrono::sensor::LoadByteImage (std::string filename)
 loads image to struct ByteImageData, returns an empty struct with 0 values if loading failed More...
 
void chrono::sensor::SetSensorShaderDir (std::string path)
 

Macro Definition Documentation

◆ CUDA_ERROR_CHECK

#define CUDA_ERROR_CHECK (   result)
Value:
{ \
if (result != cudaSuccess) { \
std::string error_name = std::string(cudaGetErrorName(result));\
std::string error_string = std::string(cudaGetErrorString(result));\
std::string file = std::string(__FILE__);\
std::string line = std::to_string(__LINE__);\
throw std::runtime_error(error_name + ": " + error_string + " at " + file + ":" + line);\
}\
}

Checks the output of a cuda call for any error, will throw a runtime error if not success.

◆ OPTIX_ERROR_CHECK

#define OPTIX_ERROR_CHECK (   result)
Value:
{ \
if (result != OPTIX_SUCCESS) { \
std::string error_name = std::string(optixGetErrorName(result)); \
std::string error_string = std::string(optixGetErrorString(result)); \
std::string file = std::string(__FILE__); \
std::string line = std::to_string(__LINE__); \
throw std::runtime_error(error_name + ": " + error_string + " at " + file + ":" + line); \
} \
} \

Checks the output of an optix call for any error, will throw a runtime error if not success.

Enumeration Type Documentation

◆ BackgroundMode

enum BackgroundMode
strong

Type of background to be spherically mapped when rays miss all objects in the scene.

Enumerator
SOLID_COLOR 

single solid color defined by RGB

GRADIENT 

color gradient used for upper hemisphere

ENVIRONMENT_MAP 

image used for spherical sky map

◆ LidarBeamShape

enum LidarBeamShape
strong

The shape of a lidar beam.

Enumerator
RECTANGULAR 

rectangular beam (inclusive of square beam)

ELLIPTICAL 

elliptical beam (inclusive of circular beam)

◆ PipelineType

The type of ray tracing used to model the sensor.

Enumerator
CAMERA_PINHOLE 

pinhole camera model

CAMERA_FOV_LENS 

FOV lens model.

SEGMENTATION_PINHOLE 

pinhole segmentation camera

SEGMENTATION_FOV_LENS 

FOV lens segmentation camera.

LIDAR_SINGLE 

single sample lidar

LIDAR_MULTI 

multi sample lidar

RADAR 

radar model

◆ RadarReturnMode

enum RadarReturnMode
strong

The mode used when determining what data the radar should return.

Enumerator
RETURN 

raw data mode

TRACK 

object tracking mode

◆ RayType

enum RayType

Ray types, used to determine the shading and miss functions for populating ray information.

Enumerator
SHADOW_RAY_TYPE 

camera rays

LIDAR_RAY_TYPE 

shadow rays

RADAR_RAY_TYPE 

lidar rays

SEGMENTATION_RAY_TYPE 

radar rays

Function Documentation

◆ GetShaderFromFile()

CH_SENSOR_API void chrono::sensor::GetShaderFromFile ( OptixDeviceContext  context,
OptixModule &  module,
std::string  file_name,
OptixModuleCompileOptions &  module_compile_options,
OptixPipelineCompileOptions &  pipeline_compile_options 
)

launches ray generation program

Parameters
contextoptix device context
moduleoptix module that will be created
file_namethe file where the shader program is implemented
module_compile_optionscompile options for the module
pipeline_compile_optionscompile options for the pipeline

◆ LoadByteImage()

CH_SENSOR_API ByteImageData chrono::sensor::LoadByteImage ( std::string  filename)

loads image to struct ByteImageData, returns an empty struct with 0 values if loading failed

Parameters
filename