XGRIDSDocs
  • 简体中文
  • English
  • 繁體中文
  • 日本語
  • Deutsch
  • Español
  • Italiano
  • Français
  • Русский
  • Polski
  • Nederlands
  • 简体中文
  • English
  • 繁體中文
  • 日本語
  • Deutsch
  • Español
  • Italiano
  • Français
  • Русский
  • Polski
  • Nederlands
  • Lixel PortalCam Series

    • PortalCam P1

      • Product Overview
      • Basic Operation
      • Using the LCC Scan App
      • Maintenance and Care
      • FAQ
  • Lixel K Series

    • Lixel K1

      • Product Overview
      • Basic Operation
      • Device Activation and Connection
      • Scanning Workflow
      • Acquire Point Cloud Data with Absolute Coordinate
      • Map Fusion
      • Route Planning Suggestions for Typical Scenes
      • Precautions
      • FAQ
    • Lixel K2

      • Product Overview
      • Basic Operation
      • Device Activation and Connection
      • Scanning Workflow
      • Acquire Point Cloud Data with Absolute Coordinate
      • Map Fusion
      • Route Planning Suggestions for Typical Scenes
      • Precautions
      • FAQ
  • Lixel L Series

    • Lixel L2 Pro

      • Product Overview
      • Basic Operation
      • Device Activation and Connection
      • Scanning Workflow
      • Acquire Point Cloud Data with Absolute Coordinate
      • Measure Point
      • Appendix
      • FAQ
    • Lixel L3

      • Product Overview
      • Basic Device Functions
      • Device Activation and Connection
      • Data Capture
      • Capturing Absolute Coordinates
      • Appendix
      • FAQ
  • Robotics

    • Lixel OpenAPI

      • Overview
      • Connection & Authentication
      • Message Model & Codec
      • Interface Catalog
      • Real-time Data
      • Project File Access
      • Error Codes
      • Python

        • Quick Start
        • Client Wrapper & Tools
        • FAQ
      • C++

        • Quick Start
        • Client & Examples
        • FAQ
      • OpenAPI-XPanel
  • Accessories

    • Stick Light

      • Installation Guide
      • Basic Operation
      • FAQ
  • Lixel Studio

    • Version and Copyright
    • Installation and Activation
    • Software Interface
    • File Operations
    • Project Processing
    • Tools
    • 2D Drawing
    • Applications
    • Settings
    • Device Connection
    • FAQ
    • Usage Tips

      • Data Flow Overview
      • Software Licensing Guide
      • Understanding Scanner Accuracy Specifications
      • Point Cloud Registration Guide
  • Lixel CyberColor

    • LCC Studio

      • Getting Started
      • Version and Updates
      • Download and Installation
      • Interface Overview and Navigation
      • Before Reconstruction
      • Model Reconstruction
      • Single Model Reconstruction
      • Map Fusion
      • Aerial-Ground Fusion
      • Aerial Reconstruction
      • My Models
      • Other Features
      • Settings and Account
      • Converter
      • Publish to Third-Party Platforms
      • Video Reconstruction
      • FAQ
    • LCC Scene Editor

      • Version & Updates
      • Account & Login
      • Product Overview & Home
      • Editor Interface
      • Scene Navigation Modes
      • File
      • Settings
      • Edit Operations
      • Window
      • Global Toolbar
      • Assets & Properties
      • Left Toolbar
      • Viewpoints
      • Portal
      • Skybox
      • Annotations
      • Measurement
      • Flythrough
      • Scene Report
      • 3D Layout
      • Mini-Map
      • Preview Mode (Viewer)
      • Help
      • FAQ
      • Spawn Point
    • LCC Model Editor

      • Version and Updates
      • User Guide
      • Overview and Interface
      • File Operations
      • Selectors
      • Editing Operations
      • Measurement
      • Color Grading
      • Asset Management
      • Settings and Help
      • FAQ
    • Capture Guide

      • Overview
      • Capture Devices Overview
      • General Capture Principles
      • Indoor Scene Capture
      • Outdoor Scene Capture
      • Large-Scale Capture (Map Fusion)
      • Aerial-Ground Map Fusion Capture
      • Object Capture
      • People Capture
      • Video Reconstruction Capture
      • HD Enhancement
      • Control Points (Lixel P1)
      • FAQ and Troubleshooting
    • LCC Studio Linux

      • Product Overview
      • Architecture Guide
      • Installation and Deployment Guide
      • Container Startup Parameters Guide
      • CodeMeter Offline Licensing Deployment Guide
      • API Reference
      • Appendix - Developer Data Guide
      • Appendix - Error Code List
      • Single-Machine Multi-GPU Cluster Deployment QuickStart
    • Best Practices

      • Merging Multiple Large 3DGS Models
      • Aerial-Ground Map Fusion Workflow
      • Data Flow Overview
      • Software Licensing Guide
    • Version History
  • Plugin & SDK

    • Unreal

      • What's New
      • Introduction
      • Quick Start - Windows
      • Quick Start - Linux
      • Quick Start - Quest3
      • URL Data Loading (Pro)
      • Editions and Licensing
      • Rendering
      • Tiled Rasterization (Pro)
      • Visual Settings
      • Normals and Lighting
      • Scene Editing
      • Performance Parameters
      • Performance Guide
      • Third-party and Engine Plugin Integration
      • Proxy Mesh
      • Loading Animation
      • Collision
      • Navigation System Support
      • Single Layer Water Support
      • Localization
      • FAQ
      • Troubleshooting
      • Logging and Diagnostics
      • Contact Us
      • Best Practices

        • Relighting 3DGS with a LixelStudio Mesh
        • Per-camera Independent Rendering
      • API Reference

        • ALCCActorBase
        • ULCCComponentBase
        • ULCCComponent
        • ULCC2Component
        • SOG / SPZ / PLY Actors
        • ALCC2ProxyMesh
        • ALCCClippingVolume
        • ALCCSectionPlane
        • ALCCLoadVolume
        • ULCCUtilLibrary
        • Enums
        • Structs
      • Changelog

        • v3.6.0
        • v3.5.0
        • v3.4.0
        • v3.3.1
        • v3.0.0
        • v2.2.1
        • v1.0.0
        • v0.9.0
        • v0.8.0
        • v0.7.1
        • v0.6.1
        • v0.5.2
        • v0.4.1
        • v0.4.0
        • v0.3.0
        • v0.0.5
        • v0.0.4
        • v0.0.3
        • v0.0.2
        • v0.0.1
    • Unity

      • Unity SDK Introduction
      • Technical Features
      • Development Environment Requirements
      • PC Quick Start Guide
      • Project Settings Optimization Guide
      • Pico 4 Ultra Development Guide
      • Pico 4 Ultra PC Streaming Guide
      • Quest 3 Development Guide
      • Quest 3 PC Streaming Guide
      • Pico Space Pro Development Guide
      • Pico Space Pro Business Streaming Guide
      • OpenXR Development Guide
      • Pico 4 Ultra Business Streaming Guide
      • Glossary
      • FAQ
      • Contact Us
      • Feature Development Guide

        • Multi-Scene Mixed Rendering Development Guide
        • Shadow Receiving Development Guide
        • Real-Time Lighting Development Guide
        • Multi-Camera Rendering Development Guide
        • High-Resolution Image Rendering Development Guide
        • LCC and LCC2 Data Format Compatibility Development Guide
        • Loading Effect Development Guide
        • Mip Rendering Mode Switching Development Guide
        • Edge and Corner Snapping Development Guide
        • Projected Decal Development Guide
        • Video Projected Decal Development Guide
        • Highlight Development Guide
        • Real-Time Clipping Development Guide
        • Color Adjustment Development Guide
        • Getting Scene Mesh Data Development Guide
        • Editor Mode Development Guide
        • Render Performance Parameter Configuration Guide
        • Application and Data Co-packaging Development Guide
        • Collision System Development Guide
        • macOS Development Permission Issue Guide
        • iOS Device Compilation and Packaging Development Guide
      • API Reference

        • LCCManager
        • Renderer
        • Data Types
      • Changelog

        • v2.4.0
        • v2.3.0
        • v2.2.10
        • v2.2.0
        • v2.1.19
        • v2.0.14
    • Web

      • Introduction
      • Rendering Performance Optimization Guide
      • Graphics Configuration
      • WebGPU Development Guide
      • FAQ
      • API Reference

        • LCCObject::checkRenderNextFrame
        • LCCObject::clearRenderNextFrame
        • LCCObject::ecef2Prj
        • LCCObject::getBounds
        • LCCObject::getEnvInstancedMesh
        • LCCObject::getInstancedMesh
        • LCCObject::getLodInfos
        • LCCObject::getOriginPosition
        • LCCObject::getProjectionCoordinateSystemInfos
        • LCCObject::hasCollision
        • LCCObject::hasEnvironment
        • LCCObject::hasShcoef
        • LCCObject::intersectsCapsule
        • LCCObject::intersectsRayExt
        • LCCObject::intersectsRayFromOriginExt
        • LCCObject::intersectsSphere
        • LCCObject::lowerToBottom
        • LCCObject::prj2Ecef
        • LCCObject::raiseToTop
        • LCCObject::raycast
        • LCCObject::raycastFromOrigin
        • LCCObject::setAlpha
        • LCCObject::setClipBox
        • LCCObject::setClipPlane
        • LCCObject::setClipPrism
        • LCCObject::setEndLod
        • LCCObject::setLodAutoLevelUp
        • LCCObject::setMaxDistance
        • LCCObject::setMaxNodeSplats
        • LCCObject::setMaxSplats
        • LCCObject::setMinSplatSize
        • LCCObject::setMipFilter
        • LCCObject::setOriginPosition
        • LCCObject::setPointsColor
        • LCCObject::setRenderState
        • LCCObject::setRotation
        • LCCObject::setScale
        • LCCObject::setSemantic
        • LCCObject::setSemanticColor
        • LCCObject::setSmooth
        • LCCObject::setStartLod
        • LCCObject::setTranslation
        • LCCObject::setVisible
        • LCCObject::togglePointsDisplayMode
        • LCCObject::useEnvironment
        • LCCObject::useShcoef
        • LCCRender::clearIndexDB
        • LCCRender::dispose
        • LCCRender::load
        • LCCRender::setCamera
        • LCCRender::unload
        • LCCRender::update
      • Changelog

        • v0.6.6
        • v0.6.4
        • v0.6.3
        • v0.6.2
        • v0.6.1
        • v0.6.0
        • v0.5.5
        • v0.5.4
        • v0.5.3
        • v0.5.2
        • v0.5.1
        • v0.5.0
        • v0.4.1
        • v0.4.0
        • v0.3.1
        • v0.3.0
        • v0.2.0
  • API

    • Structured Spatial Modeling

      • Access Guide
      • Modeling Workflow
      • API Reference
      • Temporary Upload Credentials
      • Error Codes

Client Wrapper & Tools

The project provides a reusable client wrapper and example scripts, covering everything from "a few lines of code to call an interface" to a runnable script for each interface. For manual debugging in a GUI, see OpenAPI-XPanel.

Client wrapper

The wrapper does not depend on any GUI library and is the recommended entry point for secondary development. Install it from a checkout of the repository with pip install -e "python[dev]" and generate the protobuf module with python python/src/generate_proto.py (see Quick Start). Modules:

ModuleDescription
api_catalog.pySingle source of truth for the interface catalog (ApiInterface / Endpoint / Direction)
proto_codec.pyProtoCodec: JSON ↔ Protobuf codec, default template
openapi_client.pyOpenApiClient / ClientOptions: MQTT connection, request-response, subscription

ClientOptions

from example.core import ClientOptions

opts = ClientOptions(
    host="192.168.55.1",
    port=1883,
    use_tls=False,          # set True for MQTTS
    username="",
    password="",
    openapi_key="",         # optional; if set, written into header.openapi_key automatically
    device_id="",
    client_id="",           # MQTT client ID, auto-generated when empty
    connect_timeout=10.0,
    request_timeout=10.0,
)

Request-response

from example.core import OpenApiClient, ClientOptions

with OpenApiClient(ClientOptions(host="192.168.55.1")) as client:
    rsp = client.request(
        req_topic="lixel/application/request/device_info",
        req_message="DeviceInfoRequest",
        payload={},                       # dict or JSON string
        rsp_topic="lixel/application/response/device_info",
        rsp_message="DeviceInfoResponse",
    )
    print(rsp)                            # decoded dict

Inside, request() subscribes to the response topic, publishes the request, blocks for the first response, and decodes the return; raises TimeoutError on timeout.

Subscribe to reports

import time
from example.core import ClientOptions, OpenApiClient


def on_status(topic, data):   # data is already decoded into a dict
    print(topic, data)


with OpenApiClient(ClientOptions(host="192.168.55.1")) as client:
    client.subscribe(
        "lixel/application/report/device_status",
        "DeviceStatusReport",
        on_status,
    )
    time.sleep(5)             # keep the connection alive to receive reports

For JSON payloads (heartbeat), pass an empty string for message and the callback receives a string. An exception raised in the callback is logged (Python prints to the terminal by default) and does not interrupt other subscriptions.

API overview

MethodDescription
connect() / disconnect()Connect / disconnect (supports the with context)
is_connectedConnection status
publish(topic, message, payload)Publish a message
subscribe(topic, message, callback)Subscribe and register a callback
subscribe_raw(topic_filter, callback)Subscribe by wildcard; the callback receives raw bytes
unsubscribe(topic)Unsubscribe
request(req_topic, req_message, payload, rsp_topic, rsp_message, timeout=None)Synchronous request-response call
codecBuilt-in ProtoCodec

Example scripts

python/example/usage/ provides a standalone, runnable script for each interface — the most direct reference for secondary development, all based on the client wrapper and GUI-free. After pip install -e python they run from any directory; inside the checkout they also run without installing, provided paho-mqtt and protobuf are available and the protobuf module has been generated:

cd python/example/usage
python device_info.py --host 192.168.55.1 --port 1883
python modeling.py --host 192.168.55.1 --project demo --watch 5   # device must be in standby; a full run takes a minute or more
python heartbeat.py --host 192.168.55.1 --seconds 15
python openapi_license.py --host 192.168.55.1                     # query the authorization state and remaining minutes; no key needed
python device_info.py --host 192.168.55.1 --key <provided by XGRIDS>   # a device that needs a key

Common arguments: --host / --port / --tls / --username / --password / --key / --timeout. --key is optional: a device with an OpenAPI authorization needs none; other devices reject requests without a valid key with EC_ProtoError (openapi auth error, or openapi license exhausted when the authorization is used up), so add --key for such a device; without --host it defaults to the wired address 192.168.55.1.

modeling.py first confirms the device is in standby, starts the scan, waits until it is really scanning, watches for --watch seconds, then stops the scan and waits for standby; if the device is not in standby it exits with code 2. Exit codes: 0 success; 1 start or stop wait timeout; 2 device not in standby; 3 the AC_START response code is not success (e.g. the device needs a key and got no valid one); 4 no response to AC_START or AC_STOP; 130 interrupted with Ctrl-C. Once AC_START is sent, AC_STOP is always sent afterwards, except when AC_START gets no response (exit code 4), in which case the device state is unknown and you must check it yourself. The wait times are adjustable with --start-timeout (default 90 s) and --stop-timeout (default 180 s). For the full list of scripts, see python/example/usage/README.md in the repository.

Note: lio_pcl.py demonstrates point cloud decompression and needs pip install lz4 zstandard; without them the script prints a hint and skips point cloud decoding.