Description
Functions | |
Document | chrono::sensor::ReadFileJSON (const std::string &filename) |
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< ChIMUSensor > | chrono::sensor::ReadIMUSensorJSON (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< 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... | |
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< ChIMUNoiseModel > | chrono::sensor::CreateIMUNoiseJSON (const rapidjson::Value &value) |
Load and return a imu noise model from the specified JSON value. More... | |
CH_SENSOR_API std::shared_ptr< ChGPSNoiseModel > | chrono::sensor::CreateGPSNoiseJSON (const rapidjson::Value &value) |
Load and return a gps 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... | |
Function Documentation
◆ ConvertToModernAssets() [1/2]
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]
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
◆ CreateGPSNoiseJSON()
CH_SENSOR_API std::shared_ptr<ChGPSNoiseModel> chrono::sensor::CreateGPSNoiseJSON | ( | const rapidjson::Value & | value | ) |
Load and return a gps noise model from the specified JSON value.
- Parameters
-
value The JSON value to be parsed
- Returns
- A ChGPSNoiseModel parsed from the JSON value
◆ CreateIMUNoiseJSON()
CH_SENSOR_API std::shared_ptr<ChIMUNoiseModel> chrono::sensor::CreateIMUNoiseJSON | ( | const rapidjson::Value & | value | ) |
Load and return a imu noise model from the specified JSON value.
- Parameters
-
value The JSON value to be parsed
- Returns
- A ChIMUNoiseModel parsed from the JSON value
◆ CreateModernMeshAssets()
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
◆ 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.
◆ 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
◆ 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 rapidjson::Document chrono::sensor::ReadFileJSON | ( | const std::string & | filename | ) |
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
- Returns
- A 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
◆ ReadIMUSensorJSON()
CH_SENSOR_API std::shared_ptr< ChIMUSensor > chrono::sensor::ReadIMUSensorJSON | ( | 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.
- Parameters
-
filename The name/path to the JSON file defining the IMU sensor parameters parent The ChBody to which the sensor should be attached offsetPose The position and rotation of the IMU Sensor
- Returns
- A shared pointer to a ChIMUSensor 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
◆ 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
◆ 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