chrono::sensor Namespace Reference

Description

Namespace for Chrono::Sensor.

Classes

struct  AccelData
 Accelerometer data. More...
 
struct  Background
 Information about the background of the scene. More...
 
struct  ByteImageData
 stores image data More...
 
class  ChAccelerometerSensor
 Accelerometer class. More...
 
class  ChCameraSensor
 Camera class. More...
 
class  ChDepthCamera
 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  ChFilterAccelerometerUpdate
 Class for generating IMU data. More...
 
class  ChFilterAccess
 Filter for accessing data from the sensor. More...
 
class  ChFilterCameraExposureCorrect
 A filter that adjust the brightness of the image according to exposure time and sensitivity coefficients. 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  ChFilterDepthToRGBA8
 A filter that converts Depth values to RGBA8. 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  ChFilterGyroscopeUpdate
 Class for generating IMU data. More...
 
class  ChFilterImageHalf4ToRGBA16
 A filter that converts RGBA Half4 to RGBA16. More...
 
class  ChFilterImageHalf4ToRGBA8
 A filter that converts RGBA Float4 to RGBA8. 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  ChFilterLidarNoiseXYZI
 A filter that adds noise based on depth and intensity given data in point cloud format. More...
 
class  ChFilterMagnetometerUpdate
 Class for generating IMU data. More...
 
class  ChFilterNormalToRGBA8
 A filter that converts normal map to RGBA8. 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  ChFilterPhysCameraAggregator
 A filter that adjust the brightness of the image according to exposure time and sensitivity coefficients. More...
 
class  ChFilterPhysCameraDefocusBlur
 A filter that adjust the brightness of the image according to exposure time and sensitivity coefficients. More...
 
class  ChFilterPhysCameraExpsrToDV
 A filter that convert exposure to digital values with considering ISO, through camera response function (CRF) More...
 
class  ChFilterPhysCameraNoise
 A filter that adjust the brightness of the image according to exposure time and sensitivity coefficients. More...
 
class  ChFilterPhysCameraVignetting
 A filter that adjust the brightness of the image according to exposure time and sensitivity coefficients. More...
 
class  ChFilterRadarProcess
 A filter that, when applied to a sensor, converts the depth values to pointcloud, clusters, and calculates velocity and centroid. More...
 
class  ChFilterRadarSavePC
 A filter that, when applied to a sensor, saves point cloud data. More...
 
class  ChFilterRGBDHalf4ToImageHalf4
 A filter that converts RGB channels in RGBD Half4 to RGBA Half4. More...
 
class  ChFilterRGBDHalf4ToR8
 A filter that converts D-channel in RGBD Half4 to R8. 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  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  ChGPSSensor
 GPS class. More...
 
class  ChGyroscopeSensor
 Gyroscope class. More...
 
class  ChLidarSensor
 Lidar class. More...
 
class  ChMagnetometerSensor
 Magnetometer class. More...
 
class  ChNoiseModel
 Noise model base class. More...
 
class  ChNoiseNone
 Class implementing no noise model. More...
 
class  ChNoiseNormal
 Noise model based on a normal distribution. More...
 
class  ChNoiseNormalDrift
 IMU Noise model: Gaussian drifting noise with noncorrelated equal distributions. More...
 
class  ChNoiseRandomWalks
 GPS Noise model based on Random Walks. More...
 
class  ChNormalCamera
 Camera class. More...
 
class  ChOptixEngine
 Optix Engine that is responsible for managing all render-based sensors. More...
 
class  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  ChOptixPipeline
 Class to hold all the Shader Binding Table parameters adnd manage the ray tracing pipeline, materials, ray gen programs. More...
 
class  ChOptixSensor
 Optix sensor class - base class for all sensors that interface with OptiX to generate and render their data. More...
 
class  ChPhysCameraSensor
 Camera class. More...
 
class  ChRadarSensor
 Radar class - corresponds to a FMCW radar. More...
 
class  ChScene
 Scene class used for camera renderings. Includes environment colors, lights, etc. More...
 
class  ChSegmentationCamera
 Camera class. More...
 
class  ChSensor
 Base class for a Chrono sensor. More...
 
class  ChSensorManager
 class for managing sensors. This is the Sensor system class. More...
 
class  ChTachometerSensor
 Tachometer class. More...
 
struct  GPSData
 GPS data in generic format. More...
 
struct  GyroData
 Gyroscope data. More...
 
struct  MagnetData
 Magnetometer data. 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
 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  Transform
 Transform struct for packing a translation, rotation, and scale. More...
 

Typedefs

using ChFilterAccelAccess = ChFilterAccess< SensorHostAccelBuffer, UserAccelBufferPtr >
 Access to accelerometer data.
 
using ChFilterGyroAccess = ChFilterAccess< SensorHostGyroBuffer, UserGyroBufferPtr >
 Access to gyroscope data.
 
using ChFilterMagnetAccess = ChFilterAccess< SensorHostMagnetBuffer, UserMagnetBufferPtr >
 Access to magnetometer data.
 
using ChFilterGPSAccess = ChFilterAccess< SensorHostGPSBuffer, UserGPSBufferPtr >
 Access to GPS data.
 
using ChFilterTachometerAccess = ChFilterAccess< SensorHostTachometerBuffer, UserTachometerBufferPtr >
 Access to Tachoemter data.
 
using SensorHostAccelBuffer = SensorBufferT< std::shared_ptr< AccelData[]> >
 Acclerometer host buffer to be used by acclerometer filters in the graph.
 
using UserAccelBufferPtr = std::shared_ptr< SensorHostAccelBuffer >
 Pointer to an acclerometer buffer on the host that has been moved for safety and can be given to the user.
 
using SensorHostGyroBuffer = SensorBufferT< std::shared_ptr< GyroData[]> >
 Acclerometer host buffer to be used by acclerometer filters in the graph.
 
using UserGyroBufferPtr = std::shared_ptr< SensorHostGyroBuffer >
 Pointer to an acclerometer buffer on the host that has been moved for safety and can be given to the user.
 
using SensorHostMagnetBuffer = SensorBufferT< std::shared_ptr< MagnetData[]> >
 acclerometer host buffer to be used by acclerometer filters in the graph.
 
using UserMagnetBufferPtr = std::shared_ptr< SensorHostMagnetBuffer >
 Pointer to an acclerometer buffer on the host that has been moved for safety and can be given to the user.
 
using SensorHostTachometerBuffer = SensorBufferT< std::shared_ptr< TachometerData[]> >
 Tachometer host buffer to be used by tachometer filters in the graph.
 
using UserTachometerBufferPtr = std::shared_ptr< SensorHostTachometerBuffer >
 Pointer to a tachometer 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.
 

Enumerations

enum  PipelineType {
  PipelineType::CAMERA, PipelineType::PHYS_CAMERA, PipelineType::SEGMENTATION, PipelineType::DEPTH_CAMERA,
  PipelineType::NORMAL_CAMERA, PipelineType::LIDAR_SINGLE, PipelineType::LIDAR_MULTI, PipelineType::RADAR
}
 The type of ray tracing used to model the sensor. More...
 
enum  LidarReturnMode {
  LidarReturnMode::STRONGEST_RETURN, LidarReturnMode::MEAN_RETURN, LidarReturnMode::FIRST_RETURN, LidarReturnMode::LAST_RETURN,
  LidarReturnMode::DUAL_RETURN
}
 Lidar return mode when multiple objects are seen. More...
 
enum  Axis { X, Y, Z }
 

Functions

void cuda_camera_noise_const_normal (unsigned char *bufPtr, int width, int height, float mean, float stdev, curandState_t *rng, CUstream &stream)
 Kernel for applying uniform Gaussian noise to an image. More...
 
void cuda_camera_noise_pixel_dependent (unsigned char *bufPtr, int width, int height, float variance_slope, float variance_intercept, curandState_t *rng, CUstream &stream)
 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, CUstream &stream)
 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, CUstream &stream)
 An antialiasing helper function that reduces image quality by performing mean reduction of image. More...
 
void cuda_image_alias_float (void *bufIn, void *bufOut, int w_out, int h_out, int factor, int pix_size, CUstream &stream)
 An antialiasing helper function that reduces image quality by performing mean reduction of image. More...
 
void cuda_image_alias_rgba16 (void *bufIn, void *bufOut, int w_out, int h_out, int factor, int channel_num, CUstream &stream)
 An anti-aliasing helper function that reduces RGBA16 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, CUstream &stream)
 An image blurring function that reduces performs Gaussian blur. More...
 
void cuda_image_half4_to_uchar4 (void *bufIn, void *bufOut, int w, int h, CUstream &stream)
 Conversion from half4 to uchar4. More...
 
void cuda_image_float4_to_uchar4 (void *bufIn, void *bufOut, int w, int h, CUstream &stream)
 Conversion from float4 to uchar4. More...
 
void cuda_image_half4_to_uint16_t4 (void *bufIn, void *bufOut, int w, int h, CUstream &stream)
 Conversion from half4 to uint16_t4. More...
 
void cuda_image_RGBDhalf4_to_Half4 (void *bufIn, void *bufOut, int w, int h, CUstream &stream)
 Conversion from RGBD half4 to RGBA half4. More...
 
void cuda_depth_to_uchar4 (void *bufIn, void *bufOut, int w, int h, CUstream &stream)
 Conversion from float depth value to uchar4. More...
 
void cuda_RGBDhalf4_to_uchar (void *bufIn, void *bufOut, int w, int h, CUstream &stream)
 Conversion from RGBD half4 to D-channel uchar. More...
 
void cuda_normal_to_uchar4 (void *bufIn, void *bufOut, int width, int height, CUstream &stream)
 Conversion from normal map to RGBA uchar4. More...
 
void cuda_camera_exposure_correct (unsigned char *bufPtr, size_t width, size_t height, float a, float a1, float b, float b1, CUstream &stream)
 Host function for applying exposure correction to an image. More...
 
void cuda_lidar_clip (float *buf, int width, int height, float threshold, float default_dist, CUstream &stream)
 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, CUstream &stream)
 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, CUstream &stream)
 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, CUstream &stream)
 Function for reduction of data when multiple samples are used per beam. More...
 
void cuda_lidar_first_reduce (void *bufIn, void *bufOut, int width, int height, int radius, CUstream &stream)
 Function for reduction of data when multiple samples are used per beam. More...
 
void cuda_lidar_dual_reduce (void *bufIn, void *bufOut, int width, int height, int radius, CUstream &stream)
 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_phys_cam_defocus_blur (void *buf_in, void *buf_out, unsigned int img_w, unsigned int img_h, float f, float U, float N, float C, float defocus_gain, float defocus_bias, CUstream &stream)
 host function for applying defocus blur to an image based on the depth map More...
 
void cuda_phys_cam_vignetting (void *buf_in_out, unsigned int img_w, unsigned int img_h, float f, float L, float G_vignet, CUstream &stream)
 host function for applying vignetting to an image based on camera control and model parameters More...
 
void cuda_phys_cam_aggregator (void *buf_in_out, unsigned int img_w, unsigned int img_h, float N, float t, float C, float P, float *host_rgb_QEs, float G_aggregator, CUstream &stream)
 host function for applying amplification to an image, based on camera control and model parameters More...
 
void cuda_phys_cam_noise (void *buf_in_out, unsigned int img_w, unsigned int img_h, float t, float *host_dark_cuurents, float *host_noise_gains, float *host_sigma_reads, curandState_t *rng_shot, curandState_t *rng_FPN, CUstream &stream)
 host function for applying noise model to the image, based on camera control and model parameters More...
 
void cuda_phys_cam_expsr2dv (void *buf_in, void *buf_out, unsigned int img_w, unsigned int img_h, float ISO, float *host_gains, float *host_biases, float gamma, int crf_type, CUstream &stream)
 host function for converting exposure to digital values More...
 
void cuda_pointcloud_from_depth (void *bufDI, void *bufOut, int width, int height, float hfov, float max_v_angle, float min_v_angle, CUstream &stream)
 Converts depth data to point cloud data for a lidar. More...
 
void cuda_pointcloud_from_depth_dual_return (void *bufDI, void *bufOut, int width, int height, float hfov, float max_v_angle, float min_v_angle, CUstream &stream)
 Converts depth data to point cloud data for a lidar when the mode is dual return. More...
 
void cuda_radar_angles (void *bufIn, void *bufOut, int width, int height, float hfov, float vfov, CUstream &stream)
 
void cuda_radar_pointcloud_from_angles (void *bufIn, void *bufOut, int width, int height, float hfov, float vfov, CUstream &stream)
 
void cuda_radar_pointcloud_from_depth (void *bufDI, void *bufOut, int width, int height, float hfov, float vfov, CUstream &stream)
 
bool WriteRGBA16ToBinary (const std::string &file_path, uint16_t width, uint16_t height, const void *data)
 Helper function to write an image data in RGBA 16-bit format to a binary file. More...
 
bool WriteFloatToBinary (const std::string &file_path, uint16_t width, uint16_t height, const void *data)
 Helper function to write a float map (ex: depth map) to a binary file. More...
 
void SetSensorShaderDir (const std::string &path)
 
const std::string & GetSensorShaderDir ()
 
void GetShaderFromFile (OptixDeviceContext context, OptixModule &module, const std::string &file_name, OptixModuleCompileOptions &module_compile_options, OptixPipelineCompileOptions &pipeline_compile_options)
 launches ray generation program More...
 
void optix_log_callback (unsigned int level, const char *tag, const char *message, void *)
 
ByteImageData LoadByteImage (const std::string &filename)
 loads image to struct ByteImageData, returns an empty struct with 0 values if loading failed More...
 
void BuildCDFOnDevice (const ByteImageData &img, EnvironmentLightData &env_light_data)
 -— Environment light -— /// More...
 
ChVector3f ChLerp (ChVector3f &a, ChVector3f &b, double x)
 Interpolate between two vectors. More...
 
void Cartesian2GPS (ChVector3d &coords, ChVector3d &ref)
 Utility function for calculating Cartesian coordinates from GPS coordinates given the simulation's reference point. More...
 
void GPS2Cartesian (ChVector3d &coords, ChVector3d &ref)
 Utility function for calculating GPS coordinates from Cartesian coordinates given the simulation's reference point. More...
 
void Cartesian2ENU (ChVector3d &coords, ChVector3d &ref)
 Utility function for calculating East-North-Up (ENU) coordinates from Cartesian coordinates given the simulation's reference point. More...
 
void ENU2Cartesian (ChVector3d &coords, ChVector3d &ref)
 Utility function for calculating Cartesian coordinates from ENU coordinates given the simulation's reference point. More...
 
void GPS2ENU (ChVector3d &coords, ChVector3d &ref)
 Utility function for calculating ENU coordinates from GPS coordinates given the simulation's reference point. More...
 
void ENU2GPS (ChVector3d &coords, ChVector3d &ref)
 Utility function for calculating GPS coordinates from ENU coordinates given the simulation's reference point. More...
 
void ReadFileJSON (const std::string &filename, Document &d)
 
ChVector3d 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< ChBody > parent, ChFrame< double > offsetPose)
 Load and return a sensor from the specified JSON file. More...
 
std::shared_ptr< ChGPSSensorReadGPSSensorJSON (const std::string &filename, std::shared_ptr< ChBody > parent, ChFrame< double > offsetPose)
 Load and return a gps sensor from the specified JSON file. More...
 
std::shared_ptr< ChAccelerometerSensorReadAccelerometerSensorJSON (const std::string &filename, std::shared_ptr< ChBody > parent, ChFrame< double > offsetPose)
 Load and return a accelerometer sensor from the specified JSON file. More...
 
std::shared_ptr< ChGyroscopeSensorReadGyroscopeSensorJSON (const std::string &filename, std::shared_ptr< ChBody > parent, ChFrame< double > offsetPose)
 Load and return a gyroscope sensor from the specified JSON file. More...
 
std::shared_ptr< ChMagnetometerSensorReadMagnetometerSensorJSON (const std::string &filename, std::shared_ptr< ChBody > parent, ChFrame< double > offsetPose)
 Load and return a magnetometer 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< ChNoiseModelCreateNoiseJSON (const Value &value)
 
std::string GetStringMemberWithDefault (const Value &value, const char *member, const char *def)
 
CH_SENSOR_API void ReadFileJSON (const std::string &filename, rapidjson::Document &d)
 Load and return a RapidJSON document from the specified file. More...
 
CH_SENSOR_API ChVector3d ReadVectorJSON (const rapidjson::Value &a)
 Load and return a ChVector3d 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< ChNoiseModelCreateNoiseJSON (const rapidjson::Value &value)
 Load and return a 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...
 
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...
 
template<class T >
T * cudaHostMallocHelper (unsigned int size)
 Function for creating a chunk of memory that will implicitely desconstruct itself. More...
 
template<class T >
void cudaHostFreeHelper (T *ptr)
 The desconstructor that will be called to free memory from the device pointer. More...
 

Variables

const char ChFilterXYZIAccessName [] = "ChFilterXYZIAccess"
 4 channel float array (XYZ positions+intensity)
 
const char ChFilterAccelAccessName [] = "ChFilterAccelAccess"
 Accelerometer data format (3 doubles total)
 
const char ChFilterGyroAccessName [] = "ChFilterGyroAccess"
 Gyroscope data format (3 doubles total)
 
const char ChFilterMagnetAccessName [] = "ChFilterMagnetAccess"
 Magnetometer data format (3 doubles total)
 
const char ChFilterGPSAccessName [] = "ChFilterGPSAccess"
 GPS data format (4 doubles total)
 
const char ChFilterTachometerAccessName [] = "ChFilterTachometerAccess"
 

Function Documentation

◆ BuildCDFOnDevice()

void chrono::sensor::BuildCDFOnDevice ( const ByteImageData img,
EnvironmentLightData env_light_data 
)

-— Environment light -— ///

Build the cumulative distribution function (CDF) for importance sampling of the environment map on the device.

Parameters
imgthe environment map image data, assumed to be in RGB format with 8 bits per channel
dev_cdf_latdevice pointer to the CDF for latitude sampling, size = height x 2 Bytes, to be filled in this function
cdf_londevice pointer to the CDF for longitude sampling, size = height x width x 2 Bytes, to be filled in this function

◆ Cartesian2ENU()

CH_SENSOR_API void chrono::sensor::Cartesian2ENU ( ChVector3d coords,
ChVector3d ref 
)

Utility function for calculating East-North-Up (ENU) coordinates from Cartesian coordinates given the simulation's reference point.

Parameters
coordsThe ENU coordinates to be modified. This ChVector is modified and used as output
refThe simulation's reference location

◆ Cartesian2GPS()

CH_SENSOR_API void chrono::sensor::Cartesian2GPS ( ChVector3d coords,
ChVector3d ref 
)

Utility function for calculating Cartesian coordinates from GPS coordinates given the simulation's reference point.

Parameters
coordsThe Cartisian coordinates to be modified. This vector is modified and used as output
refThe simulation's reference location

◆ ChLerp()

ChVector3f chrono::sensor::ChLerp ( ChVector3f a,
ChVector3f b,
double  x 
)

Interpolate between two vectors.

Parameters
athe first vector
bthe second vector
xthe interpolation factor, between 0 and 1
Returns
the interpolated vector

◆ ENU2Cartesian()

CH_SENSOR_API void chrono::sensor::ENU2Cartesian ( ChVector3d coords,
ChVector3d ref 
)

Utility function for calculating Cartesian coordinates from ENU coordinates given the simulation's reference point.

Parameters
coordsThe Cartesian coordinates to be modified. This ChVector is modified and used as output
refThe simulation's reference location

◆ ENU2GPS()

CH_SENSOR_API void chrono::sensor::ENU2GPS ( ChVector3d coords,
ChVector3d ref 
)

Utility function for calculating GPS coordinates from ENU coordinates given the simulation's reference point.

Parameters
coordsThe GPS coordinates to be modified. This ChVector is modified and used as output
refThe simulation's reference location

◆ GPS2Cartesian()

CH_SENSOR_API void chrono::sensor::GPS2Cartesian ( ChVector3d coords,
ChVector3d ref 
)

Utility function for calculating GPS coordinates from Cartesian coordinates given the simulation's reference point.

Parameters
coordsThe GPS coordinates to be modified. This vector is modified and used as output
refThe simulation's reference location

◆ GPS2ENU()

CH_SENSOR_API void chrono::sensor::GPS2ENU ( ChVector3d coords,
ChVector3d ref 
)

Utility function for calculating ENU coordinates from GPS coordinates given the simulation's reference point.

Parameters
coordsThe ENU coordinates to be modified. This ChVector is modified and used as output
refThe simulation's reference location

◆ WriteFloatToBinary()

bool chrono::sensor::WriteFloatToBinary ( const std::string &  file_path,
uint16_t  width,
uint16_t  height,
const void *  data 
)

Helper function to write a float map (ex: depth map) to a binary file.

Parameters
file_pathThe path string to the output file
widthThe width of the image in pixels
heightThe height of the image in pixels
dataA pointer to the image data in float format
Returns
true if the file was successfully written, false otherwise

◆ WriteRGBA16ToBinary()

bool chrono::sensor::WriteRGBA16ToBinary ( const std::string &  file_path,
uint16_t  width,
uint16_t  height,
const void *  data 
)

Helper function to write an image data in RGBA 16-bit format to a binary file.

Parameters
file_pathThe path string to the output file
widthThe width of the image in pixels
heightThe height of the image in pixels
dataA pointer to the image data in RGBA 16-bit format (uint16_t)
Returns
true if the file was successfully written, false otherwise