Metadata-Version: 2.4
Name: dexsensor
Version: 0.1.12
Summary: A Python library for processing sensor data on Dexmate Robots
Author-email: Dexmate <contact@dexmate.ai>
Keywords: robot,robotics,sensors,camera,imu,python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Operating System :: OS Independent
Classifier: Typing :: Typed
Requires-Python: <3.14,>=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE
Requires-Dist: numpy>=2.2.1
Requires-Dist: eclipse-zenoh>=1.0.1
Requires-Dist: hydra-core>=1.3.2
Requires-Dist: omegaconf>=2.3.0
Requires-Dist: loguru>=0.7.3
Requires-Dist: tyro>=0.9.24
Requires-Dist: colorama>=0.4.6
Requires-Dist: pyserial>=3.5
Requires-Dist: scipy>=1.15.0
Requires-Dist: pyrplidarsdk>=0.1.0
Requires-Dist: opencv-python>=4.8.0
Requires-Dist: aiortc>=1.6.0
Requires-Dist: websockets>=11.0
Requires-Dist: aiofiles>=23.0.0
Requires-Dist: uvloop>=0.17.0
Requires-Dist: av>=14.4.0
Dynamic: license-file

# 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.

![License](https://img.shields.io/badge/license-Proprietary-red.svg)
![Python](https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12%20%7C%203.13-blue)

## 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
- **Flexible Configuration**: Easy configuration management with YAML files
- **Command Line Interface**: Simple CLI for sensor control and configuration

## Installation

DexSensor is distributed as a pre-built package for Dexmate robot systems.

```bash
# Install DexSensor package
pip install dexsensor

# Verify installation
dexsensor --help
```

## Quick Start

### Automatic Robot Detection

Set your robot model and launch sensors:

```bash
# Launch sensors with automatic detection
dexsensor launch
```

### Manual Robot Selection

```bash
# 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

```bash
# Basic usage
dexsensor launch


# 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

# 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

```bash
# 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`, `--sensor all`, or `--sensor base_camera` |
| `--config` | Use custom config file | `--config config.yaml` |
| `--set` | Override config values | `--set head_camera.fps=60` |
| `--zenoh` | Custom Zenoh config | `--zenoh zenoh.json5` |

## Configuration

### Configuration Files

DexSensor uses YAML configuration files with the following precedence:

1. **Command line overrides** (`--set key=value`)
2. **Custom configuration files** (`--config file.yaml`)
3. **Default configuration file** (`~/.dexmate/sensors/default_config.yaml`)
4. **Robot variant defaults** (based on detected/specified robot model)

### Configuration Example

```yaml
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
```


## 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](./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
