All Exwayz nodes are set up by a .yaml configuration file, which contain multiple keys, maps and sequences. We’ve introduced a validation mechanism to make sure that


Allowed keys

Each node has an internal set of allowed keys depending on its properties.

If a key is found in the input YAML file of a node and was not expected among the allowed keys, the node will crash at start with an explicit message indicating what (wrong) key was found and the set of allowed keys instead.

Example

Trying to launch a lidar_decoder node with the following configuration

lidar_decoder:
    manufacturer: Hesai
    sensor_model: PandarXT-32

    ros:
        namespace: /exwayz/lidar_decoder
        input_packets:
            queue_size: 5000
            topic: /exwayz/udp_listener/packet
        output_pointcloud2:
            frame_id: lidar_decoder
            topic: /pointcloud2

will crash with the following error

[ERROR] [1746629459.063264870]: Exception in onInit: yaml error (line: 2, col: 5): invalid key "manufacturer", allowed keys are {"vendor", "output_timestamp_hw", "timestamp_hw_offset", "timestamp_hw_auto_offset", "sensor_model", "angle_correction", "lookup_table", "start_angle", "frame_duration", "mid_70", "metadata", "row_stride", "col_stride", "output_pc_type", "num_accum", "ros", "rtmaps"}

In this case, the user should have used the key vendor instead of manufacturer at line 2 of the YAML configuration file.


Dupliacted keys

A check is performed when parsing the YAML to make sure no keys are duplicated. This aims at preventing specifying a parameters twice by accident and having the wrong parameter set in the processing class without knowing it.

If any duplication is found, the node will crash at start with an explicit message indicating what key was duplicated.

Example

Trying to launch a slam node with the following configuration

slam:
    enable_motion_compensation: true

    pre_process:
        num_threads: 2

        grid_resolution: 0.3

        num_rows : 16
        num_cols : 512
        keep_strategy : farthest

        range_min: 2.0
        range_max: 150.0

        center: [0.0, 0.0, 0.0]
        size: [5.0, 5.0, 5.0]

        grid_resolution: 0.1

    icp:
        num_threads: 2
        num_iter: 5
        d_max: 0.2

    map_local:
        d_update: 0.5
        d_prune: 200.0
        normals_knn: 30
        resolution: 0.2

    checks:
        input_rejection_ratio: 0.7

    output:
        pc_mode: 2

    ros:
        input_pointcloud2:
            topic: /exwayz/lidar_decoder/pointcloud2