2025-09-04 15:57:42 -04:00
# LivoxGen1Lidar Device Attachment Protocol (DAP) Specification
## Overview
2025-09-05 01:22:02 -04:00
The LivoxGen1Lidar DAP specification defines how to attach to Livox Gen1 LiDAR devices and access their various data streams using a unified API with mode-based parameter selection.
2025-09-04 15:57:42 -04:00
2025-09-05 01:22:02 -04:00
## API Structure
2025-09-04 15:57:42 -04:00
2025-09-05 01:22:02 -04:00
The LivoxGen1Lidar DAP uses a unified API name `livoxGen1` with mode-based parameters to specify which data interface to present.
2025-09-04 15:57:42 -04:00
## Device Attachment Specifications
2025-09-05 01:22:02 -04:00
### 1. Point Cloud Intensity Data Device (Interoceptor)
2025-09-04 15:57:42 -04:00
2025-09-05 01:22:02 -04:00
**Purpose ** : Provides light intensity/reflectivity data from the LiDAR point cloud.
2025-09-04 15:57:42 -04:00
**Syntax ** :
```
2025-09-05 01:22:02 -04:00
+idev | avia0 | structural-implexor | livoxGen1(mode=pointCloudIntensity) | livoxProto1(retry-delay-ms=3000) | 3JEDK380010Z39
2025-09-04 15:57:42 -04:00
```
2025-09-05 01:22:02 -04:00
**Alternative Syntax ** (all equivalent):
```
+idev | avia0 | structural-implexor | livoxGen1(stim=pcloudIntensity) | livoxProto1(retry-delay-ms=3000) | 3JEDK380010Z39
+idev | avia0 | structural-implexor | livoxGen1(affordance=pCloudI) | livoxProto1(retry-delay-ms=3000) | 3JEDK380010Z39
```
2025-09-04 15:57:42 -04:00
2025-09-05 01:22:02 -04:00
**Mode Parameter Values ** (synonymous):
- `pointCloudIntensity`
2025-09-06 08:51:17 -04:00
- `pcloudIntensity`
2025-09-05 01:22:02 -04:00
- `pCloudIntensity`
- `pCloudI`
- `pcloudI`
2025-09-04 15:57:42 -04:00
2025-09-05 01:22:02 -04:00
### 2. Point Cloud Coordinate Data Device (Extrospector)
2025-09-04 15:57:42 -04:00
2025-09-05 01:22:02 -04:00
**Purpose ** : Provides spatial coordinate data from the LiDAR point cloud.
2025-09-04 15:57:42 -04:00
**Syntax ** :
```
2025-09-05 01:22:02 -04:00
+edev | avia0 | structural-implexor | livoxGen1(mode=pcloud,format=xyz) | livoxProto1(retry-delay-ms=3000) | 3JEDK380010Z39
2025-09-04 15:57:42 -04:00
```
2025-09-05 01:22:02 -04:00
**Mode Parameter Values ** (synonymous):
- `pcloud`
- `pCloud`
- `pointCloud`
**Format Parameter ** (for point cloud modes):
- `xyz` : Standard Cartesian coordinates (X, Y, Z)
- `spherical` : Raw spherical coordinates
- `spherical-cartesian` : Spherical coordinates converted to Cartesian
- `dual-cartesian` : Dual Cartesian coordinate system
- `dual-spherical` : Dual spherical coordinate system
2025-09-04 15:57:42 -04:00
2025-09-05 01:22:02 -04:00
**Alternative Format Parameter Names ** (synonymous):
- `format` or `fmt`
2025-09-04 15:57:42 -04:00
### 3. IMU Gyroscope Data Device (Interoceptor)
**Purpose ** : Provides gyroscope data from the LiDAR's internal IMU.
**Syntax ** :
```
2025-09-05 01:22:02 -04:00
+idev | avia0 | gyro-implexor | livoxGen1(mode=gyro) | livoxProto1(retry-delay-ms=3000) | 3JEDK380010Z39
2025-09-04 15:57:42 -04:00
```
2025-09-05 01:22:02 -04:00
**Mode Parameter Values ** :
- `gyro`
2025-09-04 15:57:42 -04:00
### 4. IMU Accelerometer Data Device (Interoceptor)
**Purpose ** : Provides accelerometer data from the LiDAR's internal IMU.
**Syntax ** :
```
2025-09-05 01:22:02 -04:00
+idev | avia0 | accel-implexor | livoxGen1(mode=accel) | livoxProto1(retry-delay-ms=3000) | 3JEDK380010Z39
2025-09-04 15:57:42 -04:00
```
2025-09-05 01:22:02 -04:00
**Mode Parameter Values ** :
- `accel`
## Provider Parameters
### livoxProto1 Provider
The `livoxProto1` provider accepts the following parameters:
2025-09-04 15:57:42 -04:00
2025-09-06 09:34:03 -04:00
**retry-delay-ms ** (optional):
2025-09-05 01:22:02 -04:00
- Specifies how long to wait for broadcast messages to arrive after attempting an initial direct connection
- Value: Integer number of milliseconds
- Example: `retry-delay-ms=3000` (wait 3 seconds)
- Default: 3000ms if not specified
2025-09-04 15:57:42 -04:00
2025-09-06 09:34:03 -04:00
**data-port ** (optional):
- Specifies the UDP port for receiving point cloud data from the device
- Value: Integer port number
- Example: `data-port=56000`
- Default: 56000 if not specified
**cmd-port ** (optional):
- Specifies the UDP port for receiving command responses from the device
- Value: Integer port number
- Example: `cmd-port=56001`
- Default: 56001 if not specified
**imu-port ** (optional):
- Specifies the UDP port for receiving IMU data from the device
- Value: Integer port number
- Example: `imu-port=56002`
- Default: 56002 if not specified
2025-09-05 01:22:02 -04:00
## Parameter Summary
2025-09-04 15:57:42 -04:00
2025-09-05 01:22:02 -04:00
### Mode/Stim/Affordance Parameter Values
2025-09-04 15:57:42 -04:00
2025-09-05 01:22:02 -04:00
| Data Type | Mode Values | Description |
|-----------|-------------|-------------|
| Point Cloud Intensity | `pointCloudIntensity` , `pcloudIntensity` , `pCloudIntensity` , `pCloudI` , `pcloudI` | Light intensity/reflectivity data |
| Point Cloud Coordinates | `pcloud` , `pCloud` , `pointCloud` | Spatial coordinate data |
| Gyroscope | `gyro` | Angular velocity measurements |
| Accelerometer | `accel` | Linear acceleration measurements |
2025-09-04 15:57:42 -04:00
2025-09-05 01:22:02 -04:00
### Format Parameter Values (for point cloud modes)
2025-09-04 15:57:42 -04:00
2025-09-05 01:22:02 -04:00
| Format | Description |
|--------|-------------|
| `xyz` | Standard Cartesian coordinates (X, Y, Z) |
| `spherical` | Raw spherical coordinates (range, azimuth, elevation) |
| `spherical-cartesian` | Spherical coordinates converted to Cartesian |
| `dual-cartesian` | Dual Cartesian coordinate system |
| `dual-spherical` | Dual spherical coordinate system |
## Device Discovery and Connection
The specification uses a retry-based connection strategy:
1. **Initial Check ** : Check if device is already known from broadcasts
2. **Direct Connect ** : Attempt direct connection based on calculated IP address
3. **Retry Wait ** : If direct connect fails, wait for `retry-delay-ms` for broadcast messages
4. **Final Check ** : Check known devices again after retry delay
5. **Report Result ** : Success or failure based on final check
2025-09-04 15:57:42 -04:00
## Data Formats
### Point Cloud Coordinate Formats
1. **XYZ Format ** : Standard 3D Cartesian coordinates
- X, Y, Z in meters
- Standard coordinate system orientation
2025-09-05 01:22:02 -04:00
2. **Spherical Format ** : Raw spherical coordinates
2025-09-04 15:57:42 -04:00
- Range (distance) in meters
- Azimuth angle in degrees/radians
- Elevation angle in degrees/radians
2025-09-05 01:22:02 -04:00
3. **Spherical-Cartesian Format ** : Spherical coordinates converted to Cartesian
- Range, azimuth, elevation converted to X, Y, Z
- Maintains spherical measurement precision
2025-09-04 15:57:42 -04:00
4. **Dual Formats ** : Support for dual-coordinate systems
- Useful for devices with multiple measurement modes
- Provides redundancy and validation capabilities
### Intensity Data
- Reflectivity values typically in the range 0-255
- Normalized intensity measurements
- Calibrated for material reflectivity analysis
### IMU Data
- **Gyroscope**: Angular velocity measurements (rad/s)
- **Accelerometer**: Linear acceleration measurements (m/s²)
- Timestamped data synchronized with point cloud measurements
## Error Handling
The specification includes comprehensive error handling for:
- Network connectivity issues
- Device communication timeouts
- Invalid coordinate format requests
- IMU data stream interruptions
- Device discovery failures
2025-09-05 01:22:02 -04:00
- Connection retry timeouts