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 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< 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... | |
void | chrono::sensor::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 | chrono::sensor::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 | chrono::sensor::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 * | 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
◆ ConvertToModernAssets() [1/2]
CH_SENSOR_API void chrono::sensor::ConvertToModernAssets | ( | ChSystem * | sys | ) |
Parse all assets of a chrono system to do a full conversion to assets needed by OptiX.
- Parameters
-
sys A pointer to the Chrono system that should be parsed for old assets.
◆ ConvertToModernAssets() [2/2]
CH_SENSOR_API void chrono::sensor::ConvertToModernAssets | ( | std::shared_ptr< ChBody > | body | ) |
Convert assets attached to a ChBody to modern assets by creating all necessary parameters for reflections, refractions, etc.
- Parameters
-
body The body which should be parsed for old assets
◆ 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
◆ CreateModernMeshAssets()
CH_SENSOR_API void chrono::sensor::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.
This includes information such as materials, normal mapping, etc that Chrono traditional wouldn't look for. Assets will be added directly to the mesh shape.
- Parameters
-
mesh_shape The ChTriangleMeshShape that contains a mesh for which we want to look up its additional information if any exist
◆ 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 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
-
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