Description

Collaboration diagram for Utilities:

Functions

CH_SENSOR_API void chrono::sensor::ReadFileJSON (const std::string &filename, rapidjson::Document &d)
 Load and return a RapidJSON document from the specified file. More...
 
CH_SENSOR_API ChVector chrono::sensor::ReadVectorJSON (const rapidjson::Value &a)
 Load and return a ChVector from the specified JSON array. More...
 
CH_SENSOR_API ChQuaternion chrono::sensor::ReadQuaternionJSON (const rapidjson::Value &a)
 Load and return a ChQuaternion from the specified JSON array. More...
 
CH_SENSOR_API ChFrame chrono::sensor::ReadFrameJSON (const rapidjson::Value &a)
 Load and return a ChFrame from the specified JSON array. More...
 
std::shared_ptr< ChSensorchrono::sensor::ReadSensorJSON (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< ChCameraSensorchrono::sensor::ReadCameraSensorJSON (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< ChGPSSensorchrono::sensor::ReadGPSSensorJSON (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< ChAccelerometerSensorchrono::sensor::ReadAccelerometerSensorJSON (const std::string &filename, std::shared_ptr< chrono::ChBody > parent, chrono::ChFrame< double > offsetPose)
 Load and return a accelerometer sensor from the specified JSON file. More...
 
std::shared_ptr< ChGyroscopeSensorchrono::sensor::ReadGyroscopeSensorJSON (const std::string &filename, std::shared_ptr< chrono::ChBody > parent, chrono::ChFrame< double > offsetPose)
 Load and return a gyroscope sensor from the specified JSON file. More...
 
std::shared_ptr< ChMagnetometerSensorchrono::sensor::ReadMagnetometerSensorJSON (const std::string &filename, std::shared_ptr< chrono::ChBody > parent, chrono::ChFrame< double > offsetPose)
 Load and return a magnetometer sensor from the specified JSON file. More...
 
std::shared_ptr< ChLidarSensorchrono::sensor::ReadLidarSensorJSON (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...
 
std::shared_ptr< ChRadarSensorchrono::sensor::ReadRadarSensorJSON (const std::string &filename, std::shared_ptr< chrono::ChBody > parent, chrono::ChFrame< double > offsetPose)
 Load and return a radar sensor from the specified JSON file. More...
 
void chrono::sensor::ReadFilterListJSON (const std::string &filename, std::shared_ptr< ChSensor > sensor)
 Load and return a sensor filter list from the specified JSON file. More...
 
CH_SENSOR_API std::shared_ptr< ChFilterchrono::sensor::CreateFilterJSON (const rapidjson::Value &value)
 Load and return a sensor filter from the specified JSON value. More...
 
CH_SENSOR_API std::shared_ptr< ChNoiseModelchrono::sensor::CreateNoiseJSON (const rapidjson::Value &value)
 Load and return a noise model from the specified JSON value. More...
 
CH_SENSOR_API std::string chrono::sensor::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 * chrono::sensor::cudaMallocHelper (unsigned int size)
 Function for creating a chunk of memory that will implicitely desconstruct itself. More...
 
template<class T >
void chrono::sensor::cudaFreeHelper (T *ptr)
 The desconstructor that will be called to free memory from the device pointer. More...
 
template<class T >
T * chrono::sensor::cudaHostMallocHelper (unsigned int size)
 Function for creating a chunk of memory that will implicitely desconstruct itself. More...
 
template<class T >
void chrono::sensor::cudaHostFreeHelper (T *ptr)
 The desconstructor that will be called to free memory from the device pointer. More...
 

Function Documentation

◆ CreateFilterJSON()

CH_SENSOR_API std::shared_ptr<ChFilter> chrono::sensor::CreateFilterJSON ( const rapidjson::Value &  value)

Load and return a sensor filter from the specified JSON value.

Parameters
valueThe JSON value to be parsed
Returns
A ChFilter parsed from the JSON value

◆ CreateNoiseJSON()

CH_SENSOR_API std::shared_ptr<ChNoiseModel> chrono::sensor::CreateNoiseJSON ( const rapidjson::Value &  value)

Load and return a noise model from the specified JSON value.

Parameters
valueThe JSON value to be parsed
Returns
A ChNoiseModel parsed from the JSON value

◆ cudaFreeHelper()

template<class T >
void chrono::sensor::cudaFreeHelper ( T *  ptr)
inline

The desconstructor that will be called to free memory from the device pointer.

Parameters
ptrThe pointer to the object that should be freed.

◆ cudaHostFreeHelper()

template<class T >
void chrono::sensor::cudaHostFreeHelper ( T *  ptr)
inline

The desconstructor that will be called to free memory from the device pointer.

Parameters
ptrThe pointer to the object that should be freed.

◆ cudaHostMallocHelper()

template<class T >
T* chrono::sensor::cudaHostMallocHelper ( unsigned int  size)
inline

Function for creating a chunk of memory that will implicitely desconstruct itself.

Parameters
sizeThe number of values for which we should have space. Full memory length will be size*sizeof(T)

◆ cudaMallocHelper()

template<class T >
T* chrono::sensor::cudaMallocHelper ( unsigned int  size)
inline

Function for creating a chunk of memory that will implicitely desconstruct itself.

Parameters
sizeThe number of values for which we should have space. Full memory length will be size*sizeof(T)

◆ GetStringMemberWithDefault()

CH_SENSOR_API std::string chrono::sensor::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.

Parameters
valueThe JSON value to be parsed
memberA member from the file to be read
defA default value to use if not definted in JSON file
Returns
A string parsed from the JSON value or default if none exists

◆ ReadAccelerometerSensorJSON()

CH_SENSOR_API std::shared_ptr< ChAccelerometerSensor > chrono::sensor::ReadAccelerometerSensorJSON ( const std::string &  filename,
std::shared_ptr< chrono::ChBody parent,
chrono::ChFrame< double >  offsetPose 
)

Load and return a accelerometer sensor from the specified JSON file.

Parameters
filenameThe name/path to the JSON file defining the accelerometer sensor parameters
parentThe ChBody to which the sensor should be attached
offsetPoseThe position and rotation of the accelerometer Sensor
Returns
A shared pointer to a ChAccelerometerSensor constructed from the JSON file

◆ ReadCameraSensorJSON()

CH_SENSOR_API std::shared_ptr< ChCameraSensor > chrono::sensor::ReadCameraSensorJSON ( 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.

Parameters
filenameThe name/path to the JSON file defining the camera sensor parameters
parentThe ChBody to which the sensor should be attached
offsetPoseThe position and rotation of the Camera Sensor
Returns
A shared pointer to a ChCameraSensor constructed from the JSON file

◆ ReadFileJSON()

CH_SENSOR_API void chrono::sensor::ReadFileJSON ( const std::string &  filename,
rapidjson::Document &  d 
)

Load and return a RapidJSON document from the specified file.

A Null document is returned if the file cannot be opened.

Parameters
filenameThe path to the file to be parsed
dThe rapid JSON document corresponding to the file name

◆ ReadFilterListJSON()

CH_SENSOR_API void chrono::sensor::ReadFilterListJSON ( const std::string &  filename,
std::shared_ptr< ChSensor sensor 
)

Load and return a sensor filter list from the specified JSON file.

Parameters
filenameThe name/path to the JSON file defining the filters for a sensor
sensorThe sensor to which the filters will be added

◆ ReadFrameJSON()

CH_SENSOR_API ChFrame chrono::sensor::ReadFrameJSON ( const rapidjson::Value &  a)

Load and return a ChFrame from the specified JSON array.

Parameters
aThe value to be read
Returns
A ChFrame generated from the JSON value

◆ ReadGPSSensorJSON()

CH_SENSOR_API std::shared_ptr< ChGPSSensor > chrono::sensor::ReadGPSSensorJSON ( 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.

Parameters
filenameThe name/path to the JSON file defining the GPS sensor parameters
parentThe ChBody to which the sensor should be attached
offsetPoseThe position and rotation of the GPS Sensor
Returns
A shared pointer to a ChGPSSensor constructed from the JSON file

◆ ReadGyroscopeSensorJSON()

CH_SENSOR_API std::shared_ptr< ChGyroscopeSensor > chrono::sensor::ReadGyroscopeSensorJSON ( const std::string &  filename,
std::shared_ptr< chrono::ChBody parent,
chrono::ChFrame< double >  offsetPose 
)

Load and return a gyroscope sensor from the specified JSON file.

Parameters
filenameThe name/path to the JSON file defining the gyroscope sensor parameters
parentThe ChBody to which the sensor should be attached
offsetPoseThe position and rotation of the gyroscope Sensor
Returns
A shared pointer to a ChGyroscopeSensor constructed from the JSON file

◆ ReadLidarSensorJSON()

CH_SENSOR_API std::shared_ptr< ChLidarSensor > chrono::sensor::ReadLidarSensorJSON ( 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.

Parameters
filenameThe name/path to the JSON file defining the lidar sensor parameters
parentThe ChBody to which the sensor should be attached
offsetPoseThe position and rotation of the Lidar Sensr
Returns
A shared pointer to a ChLidarSensor constructed from the JSON file

◆ ReadMagnetometerSensorJSON()

CH_SENSOR_API std::shared_ptr< ChMagnetometerSensor > chrono::sensor::ReadMagnetometerSensorJSON ( const std::string &  filename,
std::shared_ptr< chrono::ChBody parent,
chrono::ChFrame< double >  offsetPose 
)

Load and return a magnetometer sensor from the specified JSON file.

Parameters
filenameThe name/path to the JSON file defining the magnetometer sensor parameters
parentThe ChBody to which the sensor should be attached
offsetPoseThe position and rotation of the magnetometer Sensor
Returns
A shared pointer to a ChMagnetometerSensor constructed from the JSON file

◆ ReadQuaternionJSON()

CH_SENSOR_API ChQuaternion chrono::sensor::ReadQuaternionJSON ( const rapidjson::Value &  a)

Load and return a ChQuaternion from the specified JSON array.

Parameters
aThe value to be read
Returns
A ChQuatertion generated from the JSON value

◆ ReadRadarSensorJSON()

CH_SENSOR_API std::shared_ptr< ChRadarSensor > chrono::sensor::ReadRadarSensorJSON ( const std::string &  filename,
std::shared_ptr< chrono::ChBody parent,
chrono::ChFrame< double >  offsetPose 
)

Load and return a radar sensor from the specified JSON file.

Parameters
filenameThe name/path to the JSON file defining the radar sensor parameters
parentThe ChBody to which the sensor should be attached
offsetPoseThe position and rotation of the radar Sensr
Returns
A shared pointer to a ChRadarSensor constructed from the JSON file

◆ ReadSensorJSON()

CH_SENSOR_API std::shared_ptr< ChSensor > chrono::sensor::ReadSensorJSON ( const std::string &  filename,
std::shared_ptr< chrono::ChBody parent,
chrono::ChFrame< double >  offsetPose 
)

Load and return a sensor from the specified JSON file.

Parameters
filenameThe name/path to the JSON file defining the sensor parameters
parentThe ChBody to which the sensor should be attached
offsetPoseThe position and rotation of the Sensor
Returns
A shared pointer to a ChSensor constructed from the JSON file

◆ ReadVectorJSON()

CH_SENSOR_API ChVector chrono::sensor::ReadVectorJSON ( const rapidjson::Value &  a)

Load and return a ChVector from the specified JSON array.

Parameters
aThe value to be read
Returns
A ChVector containing the values in ChVector format