BRobotAssistantLib is a core Android image processing library developed for PICO devices, providing key functionalities including OpenGL ES image processing, H.264 encoding/decoding, and network transmission. It is integrated into the main Unity project via an AAR package.
- OpenGL ES Image Processing: Supports FBO off-screen rendering and texture conversion
- H.264 Hardware Encoding: Enables 60 FPS low-latency video encoding
- Network Streaming: Real-time TCP video stream transmission
- Multithread Management: Dedicated encoding thread and socket connection pool
- Camera Control: Integrates PXRCamera SDK for camera parameter management
Core implementation directory:
- Camera Module
CameraHandle.java: Camera lifecycle management and encoding control
- Media Module
MediaDecoder.java: H.264 video decoder implementation
- Network Tools
ByteBufferUtils.java: Network packet protocol utilities
robotassistant_lib.aar: Main library
Renamed from
robotassistant_lib-i18n-release.aar
- Android Studio 2022.3.1+
- Gradle 8.0+
- Android SDK 34
- NDK 25.2.9519653
- PXRCamera SDK 0.0.7
dependencies {
implementation 'androidx.opengl:opengl:1.0.0'
compileOnly files('libs/unity-classes.jar')
}- NDK version must match Unity project configuration
- Video encoding requires dedicated thread context
- OES texture binding requires EGLContext consistency verification
- Minimum supported Android version: 9.0 (API 24)
- Build main library:
./gradlew :localmaven:publish ./gradlew :app:assembleRelease
app/build/outputs/aar/
└── robotassistant_lib-i18n-release.aar # Main library
└── robotassistant_lib-cn-release.aar # Main library
- Format:
major.minor.buildcodemajor: Architectural changesminor: Feature additionsbuildcode: Date + serial number (e.g., 220101001)
- Rename
robotassistant_lib-i18n-release.aartorobotassistant_lib.aar - Place
robotassistant_lib.aarinto Unity project'sAssets/Plugins/Androiddirectory - Requires Unity 2021.3.15f1 or later
- Enable
Multithreaded Renderingin Player Settings - Required permissions:
<uses-permission android:name="android.permission.CAMERA"/> <uses-permission android:name="android.permission.INTERNET"/>
startCamera: Start camerastopCamera: Stop camerasetCameraParam: Configure camera parametersgetCameraParam: Retrieve camera parameterssetCameraFocus: Adjust focussetCameraExposure: Set exposuresetCameraWhiteBalance: Configure WBStartPreview: Enable previewStartRecord: Begin local recording
startDecoder: Initialize decoderstopDecoder: Terminate decodersetDecoderCallback: Set frame callbacksetDecoderParam: Configure decodergetDecoderParam: Get decoder configgetDecoderStatus: Check decoder stategetDecoderError: Retrieve error codesinitialize: Setup decoderstartDecoding: Launch decoding thread
If you find this project useful, please consider citing it as follows.
@article{zhao2025xrobotoolkit,
title={XRoboToolkit: A Cross-Platform Framework for Robot Teleoperation},
author={Zhigen Zhao and Liuchuan Yu and Ke Jing and Ning Yang},
journal={arXiv preprint arXiv:2508.00097},
year={2025}
}