Skip to main content

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.

License Python

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:

  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

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

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

dexsensor-0.3.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (754.4 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

dexsensor-0.3.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (698.3 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ ARM64

dexsensor-0.3.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (753.2 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

dexsensor-0.3.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (697.7 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64

dexsensor-0.3.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (701.6 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

dexsensor-0.3.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (658.9 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64

dexsensor-0.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (713.4 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

dexsensor-0.3.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (673.0 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64

File details

Details for the file dexsensor-0.3.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for dexsensor-0.3.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 acdd15417e856b46e10086575d768f33a3f608e6d2f75ca45384d81050e56f7b
MD5 b8b43c9bde937d164887a8d3a7ab606a
BLAKE2b-256 8fdd62443615a7daf8ca3948073eae15b139bc2fba522578f222ee8f61912db6

See more details on using hashes here.

File details

Details for the file dexsensor-0.3.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for dexsensor-0.3.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 68efc29ad810a86c5cb52a3ebdda422f34dc4ae136cd210b6f3edf19aa1c967f
MD5 b4cba1b9c233f950fade74e454c7b14d
BLAKE2b-256 75063cfd158988f209bee9c8dd12f2af689b1e12fe3fbd7b875fc510858deab5

See more details on using hashes here.

File details

Details for the file dexsensor-0.3.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for dexsensor-0.3.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1d192166d8e15bff69da34d370d4ed970f70ddc6d26e6cc051a458b308ef7235
MD5 5b84acc77671872dabef441c9af22d47
BLAKE2b-256 e1e3808d8462bb608b580011f0beb60f489e0445c29d5cdcfa0d656d9ee1ccfb

See more details on using hashes here.

File details

Details for the file dexsensor-0.3.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for dexsensor-0.3.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 7fd3bfd9e53a093d6d7db4007a1f37e88e624ee34d1dd4f0eb70dc08f478d9cc
MD5 0b5509d498e8fee75a6e4131b4bc85fb
BLAKE2b-256 325b153a34167431f491b393543fa4c369941842dd5d873e936bf639f8c446a6

See more details on using hashes here.

File details

Details for the file dexsensor-0.3.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for dexsensor-0.3.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cdcebc161cc278b546c9759f8f7ac5e88504a1c82c5e80729daffd4aea4dda7d
MD5 9657f0e9f382db97b317b3d56acb07d3
BLAKE2b-256 5efc959887ab912b588b428a7837ad8b256da41703c222c9adc28323702e7562

See more details on using hashes here.

File details

Details for the file dexsensor-0.3.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for dexsensor-0.3.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 d1956f9f9f4822859942c2370d56a7438103e3ef80c1ac21655c838c6567780f
MD5 f2e2fc6c3bda61321264517ade918c36
BLAKE2b-256 6c22d1cb8e927e5de4ec8ecdc5e34d046a4e79558e87b01f87fe6299041bffa0

See more details on using hashes here.

File details

Details for the file dexsensor-0.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for dexsensor-0.3.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5fc7a292accc0ed7439d4dc43268a72c6b56900c65db845d1ffcd5a0d82a405b
MD5 e9fb7f874999fcc04e2847f7ccbe8ec4
BLAKE2b-256 fdddc96a63819716576b39945785d8339e923d933792a11b360fd816a1ad79cd

See more details on using hashes here.

File details

Details for the file dexsensor-0.3.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for dexsensor-0.3.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 3caf601b4e04f9b8d6c7f00d3f990c033d7d9909370142af61b350734b5046db
MD5 d91a461f41e168352dc05a7221b1d910
BLAKE2b-256 337262997f6a817a69be3fca84003638595bfc0f8de3a89c6e7ec3eb4b03bfed

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page