Install the SENSOR module

Chrono::Sensor is an optional module that enables the modeling and simulation of sensors for the purpose of simulating robotics and autonomous agents within Chrono.

Features

The SENSOR module allows users to model and simulate sensors for robotics and autonomous agents.

For more detail, read the Chrono::Sensor section of the reference manual.

Required Dependencies

  • To build applications based on this module, the following are required:
    • CUDA
    • OptiX - version 9.0 or 9.1 (will NOT work with older versions)
    • GLFW - version 3.0 or newer
    • GLEW - version 1.0 or newer
    • OpenGL
  • To run applications based on this module, the following are required:
    • NVIDIA GPU, Turing or newer - capable of running OptiX
    • NVIDIA Graphics driver R580 or newer - appropriate for the OptiX version
OptiX support in Chrono::Sensor is now optional. If OptiX is not available, sensor models that require ray-tracing (e.g., camera, lidar, radar) will not be included in the Chrono::Sensor library. Availability of OptiX support is indicated via the macro CHRONO_HAS_OPTIX in the configuration header ChConfigSensor.h.
Even if OptiX is available, users can disable the ray-tracing-based sensor (by setting the CH_USE_SENSOR_OPTIX CMake variable to OFF).

Building instructions

  1. Repeat the instructions for the full installation, but when you see the CMake window, you must add the following steps:
  2. Set the CH_ENABLE_MODULE_SENSOR as 'on', then press 'Configure' (to refresh the variable list)
  3. Set the OptiX_INSTALL_DIR and OptiX_ROOT_DIR variables to the root of the OptiX directory installed on the system (directory that includes include/) and press 'Configure' to refresh the variable list. If a refresh does not correctly set the following variable: OptiX_Include manually set it accordingly (e.g. OptiX_INSTALL_DIR/include).
  4. Set all the values for GLEW_..., GLFW_... to proper directory or file values if not automatically found by cmake.
  5. Optionally set CH_USE_SENSOR_NVRTC to 'on' to enable runtime compilation of the Optix RT Kernels. Press 'Configure' to refresh the variable list. If set to 'off', the RT Kernels will be compiled at runtime. Depending on the system, you may need to set CMAKE_CUDA_ARCHITECTURES to the specific target architecture since this will result in RT Kernels being compiled to PTX.
  6. Press 'Configure' again, then 'Generate', and proceed as usual in the installation instructions.

NOTE: an installed Chrono::Sensor locates its shaders and the headers needed for runtime (NVRTC) compilation of the RT kernels relative to its own library, so it keeps working if the installation is moved, including to another machine. The OptiX SDK and CUDA toolkit headers are taken from the locations used to build Chrono; if these do not exist on the machine running the program, set the OptiX_INSTALL_DIR and CUDA_PATH environment variables to the root directories of the OptiX SDK and CUDA toolkit installed there. To use shaders from a different location, call the following at the top of the program:

//function to set the shader location (include ChOptixUtils.h)
chrono::sensor::SetSensorShaderDir("path/to/sensor/shaders");

How to use it

  • Consult the reference manual.
  • Look at the API section of this module for documentation about classes and functions.
  • Look at the C++ and Python source of demos to learn how to use the functions of this module.