chrono::sensor Namespace Reference

Description

Namespace for Chrono::Sensor.

Classes

struct  ByteImageData
 stores image data More...
 
class  ChCameraSensor
 Camera class. More...
 
class  ChDynamicsManager
 class for managing dynamic sensors. More...
 
class  ChFilter
 Base class for all filters that can be applied to a sensor after initial rendering. More...
 
class  ChFilterAccess
 Filter for accessing data from the sensor. More...
 
class  ChFilterCameraNoiseConstNormal
 A filter that adds Gaussian noise across an image with constant mean and standard deviation. More...
 
class  ChFilterCameraNoisePixDep
 A filter that adds pixel dependent gaussian noise across an image. Method summarized in paper: () More...
 
class  ChFilterGPSUpdate
 Class for generating GPS data for a GPS sensor. More...
 
class  ChFilterGrayscale
 A filter that, when applied to a sensor, changes the RGB buffer to grayscale. More...
 
class  ChFilterImageResize
 A filter that, when applied to a sensor, resizes the image to the specified dimensions. More...
 
class  ChFilterImgAlias
 A filter that, when applied to a sensor, reduces the resolution for antialiasing. More...
 
class  ChFilterIMUUpdate
 Class for generating IMU data. More...
 
class  ChFilterLidarNoiseXYZI
 A filter that adds noise based on depth and intensity given data in point cloud format. More...
 
class  ChFilterONNX
 A filter that processes data through a pre-trained neural network, based on ONNX format. More...
 
class  ChFilterOptixRender
 A filter that generates data for a ChOptixSensor. More...
 
class  ChFilterPCfromDepth
 A filter that, when applied to a sensor, generates point cloud data from depth values. More...
 
class  ChFilterSave
 A filter that, when applied to a sensor, saves the data as an image. More...
 
class  ChFilterSavePtCloud
 A filter that, when applied to a sensor, saves point cloud data. More...
 
class  ChFilterUFF
 A filter that processes data through a pre-trained neural network, based on UFF format. More...
 
class  ChFilterVisualize
 A filter that, when applied to a sensor, creates a GUI window to visualize the sensor (using GLFW). More...
 
class  ChFilterVisualizePointCloud
 A filter that, when applied to a sensor, creates a GUI window to visualize the sensor (using GLFW). More...
 
class  ChGPSNoiseModel
 GPS Noise Model base class. All GPS noise models should inherit from here. More...
 
class  ChGPSNoiseNone
 GPS Noise model: individually parameterized independent gaussian distribution. More...
 
class  ChGPSNoiseNormal
 GPS Noise model: individually parameterized independent gaussian distribution. More...
 
class  ChGPSSensor
 GPS class. More...
 
class  ChIMUNoiseModel
 IMU Noise Model base class. More...
 
class  ChIMUNoiseNone
 IMU Noise model: no noise. More...
 
class  ChIMUNoiseNormalDrift
 IMU Noise model: gaussian drifting noise with noncorrelated equal distributions. More...
 
class  ChIMUSensor
 IMU class. More...
 
class  ChLidarSensor
 Lidar class. This corresponds to a scanning lidar. More...
 
class  ChOptixEngine
 Optix Engine that is responsible for managing all render-based sensors. More...
 
class  ChOptixSensor
 Optix sensor class - the base class for all sensors that interface with OptiX to generate and render their data. More...
 
class  ChScene
 Scene class used for camera renderings. Includes environment colors, lights, etc. More...
 
class  ChSensor
 GPS data format (4 doubles total) More...
 
class  ChSensorManager
 class for managing sensors. This is the Sensor system class. More...
 
struct  GPSData
 GPS data in generic format. More...
 
struct  IMUData
 IMU data in generic format. More...
 
class  Logger
 Inference Logger for TensorRT. More...
 
struct  PixelDI
 Depth and intensity data in generic format. More...
 
struct  PixelRGBA8
 A pixel as defined by RGBA 8bpp format. More...
 
struct  PixelXYZI
 Point cloud and intensity data in generic format. More...
 
struct  ProgramString
 holds string values for ptx file and ray generation program More...
 
class  Sensor
 Sensor class for constructing sensors from a JSON specification file. More...
 
struct  SensorBuffer
 The base buffer class that contains sensor data (contains meta data of the buffer and pointer to raw data) More...
 
struct  SensorBufferT
 Base class of 2D buffers. More...
 
struct  TRTDestroyer
 destructor for tensorRT pointers More...
 

Typedefs

using SensorOptixBuffer = SensorBufferT< optix::Buffer >
 Wrapper of an optix buffer as a sensor buffer for homogeneous use in sensor filters.
 
using SensorHostRGBA8Buffer = SensorBufferT< std::shared_ptr< PixelRGBA8[]> >
 RGBA host buffer to be used for managing data on the host.
 
using DeviceRGBA8BufferPtr = std::shared_ptr< PixelRGBA8[]>
 RGBA device buffer to be used by camera filters in the graph.
 
using SensorDeviceRGBA8Buffer = SensorBufferT< DeviceRGBA8BufferPtr >
 Sensor buffer wrapper of a DeviceRGBA8BufferPtr.
 
using UserRGBA8BufferPtr = std::shared_ptr< SensorHostRGBA8Buffer >
 pointer to an RGBA image on the host that has been moved for safety and can be given to the user
 
using SensorHostR8Buffer = SensorBufferT< std::shared_ptr< char[]> >
 Greyscale host buffer to be used by camera filters in the graph.
 
using DeviceR8BufferPtr = std::shared_ptr< char[]>
 Greyscale device buffer to be used by camera filters in the graph.
 
using SensorDeviceR8Buffer = SensorBufferT< DeviceR8BufferPtr >
 Sensor buffer wrapper of a DeviceR8BufferPtr.
 
using UserR8BufferPtr = std::shared_ptr< SensorHostR8Buffer >
 pointer to a greyscale image on the host that has been moved for safety and can be given to the user
 
using SensorHostDIBuffer = SensorBufferT< std::shared_ptr< PixelDI[]> >
 Depth-intensity host buffer to be used by lidar filters in the graph.
 
using DeviceDIBufferPtr = std::shared_ptr< PixelDI[]>
 Depth-intensity device buffer to be used by lidar filters in the graph.
 
using SensorDeviceDIBuffer = SensorBufferT< DeviceDIBufferPtr >
 Sensor buffer wrapper of a DeviceDIBufferPtr.
 
using UserDIBufferPtr = std::shared_ptr< SensorHostDIBuffer >
 pointer to a depth-intensity buffer on the host that has been moved for safety and can be given to the user
 
using SensorHostXYZIBuffer = SensorBufferT< std::shared_ptr< PixelXYZI[]> >
 Point cloud host buffer to be used by lidar filters in the graph.
 
using DeviceXYZIBufferPtr = std::shared_ptr< PixelXYZI[]>
 Point cloud device buffer to be used by lidar filters in the graph.
 
using SensorDeviceXYZIBuffer = SensorBufferT< DeviceXYZIBufferPtr >
 Sensor buffer wrapper of a DeviceXYZIBufferPtr.
 
using UserXYZIBufferPtr = std::shared_ptr< SensorHostXYZIBuffer >
 pointer to a point cloud buffer on the host that has been moved for safety and can be given to the user
 
using SensorHostIMUBuffer = SensorBufferT< std::shared_ptr< IMUData[]> >
 IMU host buffer to be used by IMU filters in the graph.
 
using UserIMUBufferPtr = std::shared_ptr< SensorHostIMUBuffer >
 pointer to an IMU buffer on the host that has been moved for safety and can be given to the user
 
using SensorHostGPSBuffer = SensorBufferT< std::shared_ptr< GPSData[]> >
 GPS host buffer to be used by GPS filters in the graph.
 
using UserGPSBufferPtr = std::shared_ptr< SensorHostGPSBuffer >
 pointer to a GPS buffer on the host that has been moved for safety and can be given to the user
 
using ChFilterR8Access = ChFilterAccess< SensorHostR8Buffer, UserR8BufferPtr >
 Access to greyscale data.
 
using ChFilterRGBA8Access = ChFilterAccess< SensorHostRGBA8Buffer, UserRGBA8BufferPtr >
 Access to RGBA8 data.
 
using ChFilterXYZIAccess = ChFilterAccess< SensorHostXYZIBuffer, UserXYZIBufferPtr >
 Access to point cloud data.
 
using ChFilterDIAccess = ChFilterAccess< SensorHostDIBuffer, UserDIBufferPtr >
 Access to depth/intensity data.
 
using ChFilterIMUAccess = ChFilterAccess< SensorHostIMUBuffer, UserIMUBufferPtr >
 Access to IMU data.
 
using ChFilterGPSAccess = ChFilterAccess< SensorHostGPSBuffer, UserGPSBufferPtr >
 Access to GPS data.
 

Enumerations

enum  CameraLensModelType { PINHOLE, SPHERICAL }
 The type of lens model that camera can use for rendering. More...
 
enum  LidarModelType { RAYCAST }
 Lidar model type. Currently supports a ray cast model that does not include material properties.
 
enum  LidarReturnMode { LidarReturnMode::STRONGEST_RETURN, LidarReturnMode::MEAN_RETURN, LidarReturnMode::FIRST_RETURN, LidarReturnMode::LAST_RETURN }
 Lidar return mode when multiple objects are seen. More...
 
enum  LoggerVerbosity { NONE, PARTIAL, ALL }
 Logger verbosity enumerator. More...
 

Functions

void cuda_camera_noise_const_normal (unsigned char *bufPtr, int width, int height, float mean, float stdev, curandState_t *rng)
 Kernel for applying uniform Gaussian noise to an image. More...
 
void cuda_camera_noise_pixel_dependent (unsigned char *bufPtr, int width, int height, float gain, float sigma_read, float sigma_adc, curandState_t *rng)
 Kernel for applying pixel dependent Gaussian noise to an image. More...
 
__global__ void init_random_states (unsigned int seed, curandState_t *rng_states, int n_generators)
 Device function for initialing random values for cuRAND. More...
 
void init_cuda_rng (unsigned int seed, curandState_t *rng_states, int n_generators)
 Host function for initialing random values for cuRAND. More...
 
void cuda_grayscale (void *bufRGBA, void *bufOut, int width, int height)
 RGB 8 bpp image of uchar to greyscale image conversion. More...
 
void cuda_image_alias (void *bufIn, void *bufOut, int w_out, int h_out, int factor, int pix_size)
 An antialiasing helper function that reduces image quality by performing mean reduction of image. More...
 
void cuda_image_gauss_blur_char (void *buf, int w, int h, int c, int factor)
 An image blurring function that reduces performs Gaussian blur. More...
 
void cuda_lidar_clip (float *buf, int width, int height, float threshold, float default_dist)
 Function for reduction of data when multiple samples are used per beam. More...
 
void cuda_lidar_noise_normal (float *bufPtr, int width, int height, float stdev_range, float stdev_v_angle, float stdev_h_angle, float stdev_intensity, curandState_t *rng)
 Function for applying Gaussian noise to raw ground truth lidar data. More...
 
void cuda_lidar_mean_reduce (void *bufIn, void *bufOut, int width, int height, int radius)
 Function for reduction of data when multiple samples are used per beam. More...
 
void cuda_lidar_strong_reduce (void *bufIn, void *bufOut, int width, int height, int radius)
 Function for reduction of data when multiple samples are used per beam. More...
 
void preprocess_RGBA8_to_FLOAT3 (void *bufIn, void *bufOut, int h, int w)
 Function that converts uchar RGBA8 image to float3 image. More...
 
void preprocess_RGBA8_to_FLOAT4 (void *bufIn, void *bufOut, int num_entries)
 Function that converts uchar RGBA8 image to float4 image. More...
 
void postprocess_FLOAT4_to_RGBA8 (void *bufIn, void *bufOut, int num_entries)
 Function that converts float4 image to uchar RGBA8 image. More...
 
void preprocess_RGBA8_to_FLOAT4_CHW (void *bufIn, void *bufOut, int c, int h, int w)
 Function that converts uchar RGBA8 image to float4 image with channels first. More...
 
void preprocess_normalize_float (void *bufIn, float add, float mult, int c, int h, int w)
 Function that normalized input data in float format. More...
 
void postprocess_FLOAT4_to_RGBA8_CHW (void *bufIn, void *bufOut, int c, int h, int w)
 Function that converts float4 image to uchar RGBA8 image with channels first. More...
 
void cuda_pointcloud_from_depth (void *bufDI, void *bufOut, int width, int height, float hfov, float max_v_angle, float min_v_angle)
 Converts depth data to point cloud data for a lidar. More...
 
CH_SENSOR_API optix::Program GetRTProgram (optix::Context context, std::string file_name, std::string program_name)
 launches ray generation program More...
 
ByteImageData LoadImage (std::string filename)
 loads image to struct ByteImageData, returns an empty struct with 0 values if loading failed More...
 
Transform CreateEmptyTransform (optix::Context context)
 creates an empty optix transform::node More...
 
Transform CreateTransform (optix::Context context, ChMatrix33< double > a, ChVector< double > b)
 creates an opti::transform node More...
 
Transform CreateTransform (optix::Context context, ChMatrix33< double > a, ChVector< double > b, ChVector< double > s)
 creates an optix::transform node More...
 
Transform CreateTransformFromEndPoints (optix::Context context, ChVector<> a, ChVector<> b, ChVector<> from)
 creatse an optix::transform node based on end points More...
 
Transform CreateTransformFromEndPoints (optix::Context context, ChVector<> a, ChVector<> b, ChVector<> from, ChVector<> s)
 
void UpdateTransform (optix::Transform t, ChMatrix33< double > a, ChVector< double > b)
 updates the projection matrix in the optix::transform object More...
 
void UpdateTransform (optix::Transform t, ChMatrix33< double > a, ChVector< double > b, ChVector< double > s)
 updates the projection matrix in the optix::transform object More...
 
optix::Transform CreateTransformFromEndPoints (optix::Context context, ChVector<> a, ChVector<> b, ChVector<> from, ChVector< double > s)
 creatse an optix::transform node based on end points More...
 
Document ReadFileJSON (const std::string &filename)
 Load and return a RapidJSON document from the specified file. More...
 
ChVector ReadVectorJSON (const Value &a)
 
ChQuaternion ReadQuaternionJSON (const Value &a)
 
ChFrame ReadFrameJSON (const Value &a)
 
std::shared_ptr< ChSensorReadSensorJSON (const std::string &filename, std::shared_ptr< chrono::ChBody > parent, chrono::ChFrame< double > offsetPose)
 Load and return a sensor from the specified JSON file. More...
 
std::shared_ptr< ChCameraSensorReadCameraSensorJSON (const std::string &filename, std::shared_ptr< chrono::ChBody > parent, chrono::ChFrame< double > offsetPose)
 Load and return a camera sensor from the specified JSON file. More...
 
std::shared_ptr< ChGPSSensorReadGPSSensorJSON (const std::string &filename, std::shared_ptr< chrono::ChBody > parent, chrono::ChFrame< double > offsetPose)
 Load and return a gps sensor from the specified JSON file. More...
 
std::shared_ptr< ChIMUSensorReadIMUSensorJSON (const std::string &filename, std::shared_ptr< chrono::ChBody > parent, chrono::ChFrame< double > offsetPose)
 Load and return a imu sensor from the specified JSON file. More...
 
std::shared_ptr< ChLidarSensorReadLidarSensorJSON (const std::string &filename, std::shared_ptr< chrono::ChBody > parent, chrono::ChFrame< double > offsetPose)
 Load and return a lidar sensor from the specified JSON file. More...
 
void ReadFilterListJSON (const std::string &filename, std::shared_ptr< ChSensor > sensor)
 Load and return a sensor filter list from the specified JSON file. More...
 
std::shared_ptr< ChFilterCreateFilterJSON (const Value &value)
 
std::shared_ptr< ChIMUNoiseModelCreateIMUNoiseJSON (const Value &value)
 
std::shared_ptr< ChGPSNoiseModelCreateGPSNoiseJSON (const Value &value)
 
std::string GetStringMemberWithDefault (const Value &value, const char *member, const char *def)
 
CH_SENSOR_API ChVector ReadVectorJSON (const rapidjson::Value &a)
 Load and return a ChVector from the specified JSON array. More...
 
CH_SENSOR_API ChQuaternion ReadQuaternionJSON (const rapidjson::Value &a)
 Load and return a ChQuaternion from the specified JSON array. More...
 
CH_SENSOR_API ChFrame ReadFrameJSON (const rapidjson::Value &a)
 Load and return a ChFrame from the specified JSON array. More...
 
CH_SENSOR_API std::shared_ptr< ChFilterCreateFilterJSON (const rapidjson::Value &value)
 Load and return a sensor filter from the specified JSON value. More...
 
CH_SENSOR_API std::shared_ptr< ChIMUNoiseModelCreateIMUNoiseJSON (const rapidjson::Value &value)
 Load and return a imu noise model from the specified JSON value. More...
 
CH_SENSOR_API std::shared_ptr< ChGPSNoiseModelCreateGPSNoiseJSON (const rapidjson::Value &value)
 Load and return a gps noise model from the specified JSON value. More...
 
CH_SENSOR_API std::string GetStringMemberWithDefault (const rapidjson::Value &value, const char *member, const char *def="")
 Load and return a std::string from the specified JSON value Will check if member exists and returns if it does, def if not. More...
 
void CreateModernMeshAssets (std::shared_ptr< ChTriangleMeshShape > mesh_shape)
 Generate a set of visual assets that works with OptiX and handles the most modern rendering information contained in the mesh as possible. More...
 
void ConvertToModernAssets (std::shared_ptr< ChBody > body)
 Convert assets attached to a ChBody to modern assets by creating all necessary parameters for reflections, refractions, etc. More...
 
void ConvertToModernAssets (ChSystem *sys)
 Parse all assets of a chrono system to do a full conversion to assets needed by OptiX. More...
 
template<class T >
T * cudaMallocHelper (unsigned int size)
 Function for creating a chunk of memory that will implicitely desconstruct itself. More...
 
template<class T >
void cudaFreeHelper (T *ptr)
 The desconstructor that will be called to free memory from the device pointer. More...
 

Variables

const char ChFilterR8AccessName [] = "ChFilterR8Access"
 global constanst for use in template parameters
 
const char ChFilterRGBA8AccessName [] = "ChFilterRGBA8Access"
 single channel 8 bit array
 
const char ChFilterDIAccessName [] = "ChFilterDIAccess"
 4 channel 8 bit array
 
const char ChFilterXYZIAccessName [] = "ChFilterXYZIAccess"
 2 channel float array (Depth+Intenisty)
 
const char ChFilterIMUAccessName [] = "ChFilterIMUAccess"
 4 channel float array (XYZ positions+Intensity)
 
const char ChFilterGPSAccessName [] = "ChFilterGPSAccess"
 IMU data format (6 floats total)
 
const std::string ptx_pre = "ChronoEngine_sensor_generated_"
 prefix for ptx file
 
const std::string ptx_suff = ".cu.ptx"
 suffix for ptx file