Struct ZoneSet
Defined in File zone_monitor.h
Struct Documentation
-
struct ZoneSet
Configuration for a complete set of zones to be monitored.
Represents a collection of zones, including active zones and sensor extrinsics. Provides serialization and deserialization utilities to/from zip archives (files or memory), as well as conversion to JSON.
Public Functions
-
void render(const SensorInfo &sensor_info)
Renders all zones in this ZoneSet.
Note
Do not use this method if you intend to use STL-based zones on the sensor, as the sensor will render them as needed. This updates each Zone’s ZRB and sets the ZoneSet’s type to ZRB.
- Parameters:
sensor_info[in] – SensorInfo containing beam configuration and sensor to body transform for rendering.
-
explicit ZoneSet(const std::string &zip_path)
Instantiates ZoneSet from a zip file.
- Throws:
std::invalid_argument – zip archive does not exist or contains invalid configuration.
- Parameters:
zip_path – [in] path to the zip file
-
explicit ZoneSet(const std::vector<uint8_t> &zip_bytes)
Instantiates ZoneSet from a zip archive in memory.
- Throws:
std::invalid_argument – zip archive is malformed or contains invalid configuration.
- Parameters:
zip_bytes – [in] binary blob containing zip archive
-
void save(const std::string &zip_path, ZoneSetOutputFilter zone_set_output_filter) const
Serializes this ZoneSet to a zip file.
- Parameters:
zip_path[in] – the file path to write the .zip archive to.
zone_set_output_filter[in] – specifies which files to include in the resulting zip archive.
- Throws:
std::runtime_error – on failing to produce zip archive or missing critical data.
-
std::vector<uint8_t> to_zip_blob(ZoneSetOutputFilter zone_set_output_filter) const
Serializes this ZoneSet as a zip blob.
- Parameters:
zone_set_output_filter[in] – specifies which files to include in the resulting zip archive.
- Throws:
std::runtime_error – on failing to produce zip archive or missing critical data.
- Returns:
binary blob containing zip archive
-
std::string to_json(ZoneSetOutputFilter zone_set_output_filter) const
Retrieves zone monitor metadata as json.
- Parameters:
zone_set_output_filter[in] – specifies which files to include in the JSON output.
- Returns:
json string containing zone monitor metadata
Public Members
-
std::unordered_map<uint32_t, ouster::sdk::core::Zone> zones = {}
Map of zones available for monitoring.
Max 128 zones.
-
std::vector<uint32_t> power_on_live_ids = {}
Default active zones after configuration.
-
void render(const SensorInfo &sensor_info)