Description
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 ChVector3d | chrono::sensor::ReadVectorJSON (const rapidjson::Value &a) |
Load and return a ChVector3d 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< 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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. 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< ChFilter > | chrono::sensor::CreateFilterJSON (const rapidjson::Value &value) |
Load and return a sensor filter from the specified JSON value. More... | |
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. 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
-
value The 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
-
value The JSON value to be parsed
- Returns
- A ChNoiseModel parsed from the JSON value
◆ cudaFreeHelper()
|
inline |
The desconstructor that will be called to free memory from the device pointer.
- Parameters
-
ptr The pointer to the object that should be freed.
◆ cudaHostFreeHelper()
|
inline |
The desconstructor that will be called to free memory from the device pointer.
- Parameters
-
ptr The pointer to the object that should be freed.
◆ cudaHostMallocHelper()
|
inline |
Function for creating a chunk of memory that will implicitely desconstruct itself.
- Parameters
-
size The number of values for which we should have space. Full memory length will be size*sizeof(T)
◆ cudaMallocHelper()
|
inline |
Function for creating a chunk of memory that will implicitely desconstruct itself.
- Parameters
-
size The 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
-
value The JSON value to be parsed member A member from the file to be read def A 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
-
filename The name/path to the JSON file defining the accelerometer sensor parameters parent The ChBody to which the sensor should be attached offsetPose The 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
-
filename The name/path to the JSON file defining the camera sensor parameters parent The ChBody to which the sensor should be attached offsetPose The 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
-
filename The path to the file to be parsed d The 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
-
filename The name/path to the JSON file defining the filters for a sensor sensor The sensor to which the filters will be added
◆ ReadFrameJSON()
CH_SENSOR_API ChFrame chrono::sensor::ReadFrameJSON | ( | const rapidjson::Value & | a | ) |
◆ 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
-
filename The name/path to the JSON file defining the GPS sensor parameters parent The ChBody to which the sensor should be attached offsetPose The 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
-
filename The name/path to the JSON file defining the gyroscope sensor parameters parent The ChBody to which the sensor should be attached offsetPose The 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
-
filename The name/path to the JSON file defining the lidar sensor parameters parent The ChBody to which the sensor should be attached offsetPose The 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
-
filename The name/path to the JSON file defining the magnetometer sensor parameters parent The ChBody to which the sensor should be attached offsetPose The 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
-
a The value to be read
- Returns
- A ChQuaternion 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
-
filename The name/path to the JSON file defining the radar sensor parameters parent The ChBody to which the sensor should be attached offsetPose The 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
-
filename The name/path to the JSON file defining the sensor parameters parent The ChBody to which the sensor should be attached offsetPose The position and rotation of the Sensor
- Returns
- A shared pointer to a ChSensor constructed from the JSON file
◆ ReadVectorJSON()
CH_SENSOR_API ChVector3d chrono::sensor::ReadVectorJSON | ( | const rapidjson::Value & | a | ) |
Load and return a ChVector3d from the specified JSON array.
- Parameters
-
a The value to be read
- Returns
- A ChVector3d containing the values in ChVector format