A Python library for processing sensor data on Dexmate Robots
Project description
Dexsensor
A unified sensor management system for Dexmate robots. Dexsensor provides automatic robot detection and configuration for cameras, IMU, LiDAR, and other sensors through an easy-to-use command line interface.
Features
- Automatic Robot Detection: Detects robot model and loads appropriate sensor configuration
- Multiple Robot Variants: Support for different robot models with optimized sensor configurations
- Unified Sensor Management: Consistent interface for cameras, IMU, LiDAR, and other sensors
- Real-time Communication: High-performance sensor data streaming with Zenoh and WebRTC
- Hardware Timestamps: Synchronized timestamps from camera hardware (ZED) and system time
- Multi-process Support: Robust sensor isolation with spawn-based multiprocessing
- Flexible Configuration: Easy configuration management with YAML files
- Command Line Interface: Simple CLI for sensor control and configuration
Installation
# Install DexSensor package
pip install dexsensor
# Verify installation
dexsensor --help
Quick Start
Automatic Robot Detection
Set your robot model and launch sensors:
# Launch sensors with automatic detection
dexsensor launch
Manual Robot Selection
# Launch specific sensors only
dexsensor launch --sensor head_camera base_front_camera
# Override configuration values
dexsensor launch --set head_camera.fps=60 lidar.enable=true
Command Line Interface
Launch Sensors
# Basic usage
dexsensor launch
# With specific robot model
dexsensor launch --robot vega-1
# Launch specific sensors
dexsensor launch --sensor head_camera lidar
# Launch all sensors (enables all sensors regardless of default config)
dexsensor launch --sensor all
# Launch all base cameras (base_left, base_right, base_front, base_back)
dexsensor launch --sensor base_camera
# Single-process mode (useful for debugging or ZED cameras)
dexsensor launch --single-process
# Override configuration
dexsensor launch --set head_camera.fps=60 lidar.enable=true
# Use custom configuration file
dexsensor launch --config /path/to/config.yaml
# Combine options
dexsensor launch --set head_camera.fps=30 --sensor head_camera
Configuration Management
# Generate configuration template
dexsensor gen-cfg
# Save to custom location
dexsensor gen-cfg --output /path/to/config.yaml
Command Options
| Option | Description | Example |
|---|---|---|
--robot |
Specify robot variant | --robot vega-1 |
--sensor |
Launch specific sensors, "all", or "base_camera" | --sensor head_camera lidar |
--config |
Use custom config file | --config config.yaml |
--set |
Override config values | --set head_camera.fps=60 |
--single-process |
Run in single-process mode | --single-process |
--zenoh |
Custom Zenoh config | --zenoh zenoh.json5 |
Configuration
Configuration Files
DexSensor uses YAML configuration files with the following precedence:
- Command line overrides (
--set key=value) - Custom configuration files (
--config file.yaml) - Default configuration file (
~/.dexmate/sensors/default_config.yaml) - Robot variant defaults (based on detected/specified robot model)
Configuration Example
head_camera:
enable: true
fps: 30
resolution: HD1080
depth_mode: NEURAL
base_front_camera:
enable: true
width: 640
height: 480
fps: 30
format: MJPG
lidar:
enable: false
ip_address: "192.168.50.41"
udp_port: 8089
base_imu:
enable: true
head_imu:
enable: true
Recent Updates (v0.3.1)
Performance & Reliability
- Hardware Timestamps: All camera and depth streams now include synchronized timestamps from hardware (ZED) or system time
- Multiprocess Improvements: Fixed ZED SDK compatibility with spawn-based multiprocessing for better stability
- WebRTC Enhancements: Improved real-time streaming with automatic BGR to RGB conversion and better connection handling
Data Serialization
- Protobuf Support: LiDAR data now uses efficient protobuf serialization from DexComm
- Timestamp Integration: All sensor data includes nanosecond-precision timestamps for synchronization
- Future-Ready Architecture: Prepared infrastructure for 3D LiDAR and additional sensor types
Sensor Types
- Cameras:
- RGB cameras with JPEG/PNG compression
- Stereo cameras (ZED) with depth sensing
- RGBD cameras with synchronized timestamps
- WebRTC streaming support for low-latency video
- IMU: Inertial measurement units for head and base
- LiDAR:
- 2D laser range finders with protobuf serialization
- Support for RPLIDAR and network-based LiDARs
- Additional sensors: Extensible architecture for future sensor types
System Requirements
- Operating System: Linux (Ubuntu 20.04+ recommended)
- Python: 3.10, 3.11, 3.12, or 3.13
- Hardware: Compatible Dexmate robot hardware or USB cameras
- Optional: ZED SDK for ZED camera support
Troubleshooting
Common Issues
ZED camera malloc errors:
# Use single-process mode for ZED cameras to avoid fork() issues
dexsensor launch --sensor head_camera --single-process
USB device permissions:
# Add user to dialout group for serial device access
sudo usermod -a -G dialout $USER
# Log out and back in for changes to take effect
Camera not detected:
# List available cameras
ls /dev/video*
# Check camera permissions
ls -l /dev/video*
Network sensor connectivity:
# Test LiDAR network connection
ping 192.168.50.41 # Replace with your sensor IP
Licensing
This project is dual-licensed:
Open Source License
This software is available under the GNU Affero General Public License v3.0 (AGPL-3.0). See the LICENSE file for details.
Commercial License
For businesses that want to use this software in proprietary applications without the AGPL requirements, commercial licenses are available. Contact us for commercial licensing: contact@dexmate.ai
Commercial licenses provide:
- Right to use in closed-source applications
- No source code disclosure requirements
- Priority support options
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dexsensor-0.3.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: dexsensor-0.3.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 754.4 kB
- Tags: CPython 3.13, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
acdd15417e856b46e10086575d768f33a3f608e6d2f75ca45384d81050e56f7b
|
|
| MD5 |
b8b43c9bde937d164887a8d3a7ab606a
|
|
| BLAKE2b-256 |
8fdd62443615a7daf8ca3948073eae15b139bc2fba522578f222ee8f61912db6
|
File details
Details for the file dexsensor-0.3.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: dexsensor-0.3.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 698.3 kB
- Tags: CPython 3.13, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
68efc29ad810a86c5cb52a3ebdda422f34dc4ae136cd210b6f3edf19aa1c967f
|
|
| MD5 |
b4cba1b9c233f950fade74e454c7b14d
|
|
| BLAKE2b-256 |
75063cfd158988f209bee9c8dd12f2af689b1e12fe3fbd7b875fc510858deab5
|
File details
Details for the file dexsensor-0.3.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: dexsensor-0.3.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 753.2 kB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1d192166d8e15bff69da34d370d4ed970f70ddc6d26e6cc051a458b308ef7235
|
|
| MD5 |
5b84acc77671872dabef441c9af22d47
|
|
| BLAKE2b-256 |
e1e3808d8462bb608b580011f0beb60f489e0445c29d5cdcfa0d656d9ee1ccfb
|
File details
Details for the file dexsensor-0.3.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: dexsensor-0.3.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 697.7 kB
- Tags: CPython 3.12, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7fd3bfd9e53a093d6d7db4007a1f37e88e624ee34d1dd4f0eb70dc08f478d9cc
|
|
| MD5 |
0b5509d498e8fee75a6e4131b4bc85fb
|
|
| BLAKE2b-256 |
325b153a34167431f491b393543fa4c369941842dd5d873e936bf639f8c446a6
|
File details
Details for the file dexsensor-0.3.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: dexsensor-0.3.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 701.6 kB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cdcebc161cc278b546c9759f8f7ac5e88504a1c82c5e80729daffd4aea4dda7d
|
|
| MD5 |
9657f0e9f382db97b317b3d56acb07d3
|
|
| BLAKE2b-256 |
5efc959887ab912b588b428a7837ad8b256da41703c222c9adc28323702e7562
|
File details
Details for the file dexsensor-0.3.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: dexsensor-0.3.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 658.9 kB
- Tags: CPython 3.11, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d1956f9f9f4822859942c2370d56a7438103e3ef80c1ac21655c838c6567780f
|
|
| MD5 |
f2e2fc6c3bda61321264517ade918c36
|
|
| BLAKE2b-256 |
6c22d1cb8e927e5de4ec8ecdc5e34d046a4e79558e87b01f87fe6299041bffa0
|
File details
Details for the file dexsensor-0.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: dexsensor-0.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 713.4 kB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5fc7a292accc0ed7439d4dc43268a72c6b56900c65db845d1ffcd5a0d82a405b
|
|
| MD5 |
e9fb7f874999fcc04e2847f7ccbe8ec4
|
|
| BLAKE2b-256 |
fdddc96a63819716576b39945785d8339e923d933792a11b360fd816a1ad79cd
|
File details
Details for the file dexsensor-0.3.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: dexsensor-0.3.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 673.0 kB
- Tags: CPython 3.10, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3caf601b4e04f9b8d6c7f00d3f990c033d7d9909370142af61b350734b5046db
|
|
| MD5 |
d91a461f41e168352dc05a7221b1d910
|
|
| BLAKE2b-256 |
337262997f6a817a69be3fca84003638595bfc0f8de3a89c6e7ec3eb4b03bfed
|