# Evaluation and Testing System for Automotive LiDAR Sensors
## 3 LiDAR Evaluation and Testing
### ROS Software Architecture  
The system's software stack is based on an ROS environment on top of a Linux operating system (OS), with both supported by the embedded system and the workstation. Despite each distribution being different for each platform (due to hardware resource asymmetry, processor architectures, etc. ), the combination of Linux and ROS creates the required abstraction layer to develop software packages regardless of their target platform. Alongside the required ROS core components, our software architecture is composed of eight software packages, as depicted by Figure 9.  
Launch files packageThis package was developed to ease the system's launch with the correct testing setup. It allows for flexible debug sessions with different LiDAR sensors, different sensor configurations, and several system setups in which one or more components (e.g., RotGon, the rail system) may not be used. This package only presents launch files without services or topics available. RotGonThe RotGon package enables tilting/rotating of LiDAR sensors in three distinct angles. Therefore, this package provides three services, one for each axis, to move the sensor to the desired position/angle: _move_r_to, _move_r_0_to_, and _move_g_to_. Additionally, it provides a self-reset service that moves all axes to the 0\({}^{\circ}\) degree position: _go_home_, as well as a _power_ service to turn the device on and off. The RotGon package publishes information on two topics: one to display the current RotGon status regarding errors (_status_) and another to output the current angle position in real time (_position_). RailsystemThis package is responsible for moving the target within the sensor's FoV. Therefore, it provides three moving services: one to send the target to a desired position, _move_to_; one to move the target away from the sensor at a constant speed and acceleration, _jog_plus_; and another to move the target towards the sensor, _jog_minus_. All can be interrupted by calling the _stop_ service. Two more services are available: one to control the system regarding errors (_reset_errors_) and another to handle communication issues (_restart_). As with RotGon, this package has two other topics, one with status information (_state_) and another that publishes the current platform's position (_position_). PowersuplyThis package is responsible for controlling the sensor's power source. It provides three services to individually control each channel: one for turning on the power source, _power_on_; one for turning off the power source, _power_off_; and another for resetting the power supply, _power_cycle_. In addition, it can set different voltage and current values, providing real-time measurements of the channel powering the sensor. Figure 9: Software stack overview. Sanity Check:This package consists of a set of tools used to verify the full operation of the main system used for testing a sensor, i.e., the rail system, RotGon, and power supply. It provides one service to individually test each core component, _<equipment>__test;_ one that tests the connectivity with the nodes, _check_live_nodes;_ and another that sequentially tests the whole setup. Sensor driver:This package depends on the sensor that is currently under test. Because most manufacturers provide an ROS-based driver and packages to interface with their sensors, the evaluation and testing platform can easily support a broad number of devices. Nonetheless, each driver package has to be manually installed and configured before changing the sensor and any test configuration. Target detection:This package is required for tests that depend on the target's visibility inside the sensor's FoV, and consequently its visibility in the point cloud. It supports a set of services that are used to enable and configure several filters applied to the point cloud, such as the target's distance, the software-based FoV, etc. Such filters are further explained in the next section.