Metadata-Version: 2.4
Name: roboreactor
Version: 0.1.3
Summary: A unified Python client for Roboreactor edge devices and robot simulators.
Author-email: Your Name <kornbot380@hotmail.com>
Project-URL: Homepage, https://roboreactor.com
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.25.0
Dynamic: license-file

# roboreactor

Official Python client library for connecting edge devices, emulators, and robot controls directly to the RoboReactor ecosystem.

## Installation

```bash
pip install roboreactor
```

## Digital Twin Motion Control

To stream joint motion feedback and synchronize with the motion twin simulation, use the following example:

```python
from roboreactor import RoboReactor
import time

# Initialize the synchronized connection client
client = RoboReactor(
    email="kornbot380@hotmail.com",
    project_name="Smart_Robots",
    base_url="https://roboreactor.com"  # Defaults to https://roboreactor.com if omitted
)

print("[INFO] Initiating joint loop feedback sequence...")

# Emulating a real-world physical sweeping path (0° to 269°)
for angle in range(0, 270):
    joint_telemetry = {
        'wrist': {'Analog-read': float(angle)},
        'shoulder': {'Analog-read': float(angle)},
        'base': {'Analog-read': float(angle)}
    }
    
    # Broadcast state variables directly to the cloud dashboard
    response = client.update_feedback_sensors(joint_telemetry)
    print(f"[TX] Angle: {angle}° | Status Response: {response}")
    time.sleep(0.01)
```

## Absolute Target Kinematics & Orientation Control in Navigation simulation digital twin sync on the web

To sync high-level coordinates, orientations, and specific target angles to the navigation simulator rendering engine:

```python
import math
from roboreactor import RoboReactor

# Initialize the client
client = RoboReactor(
    email="kornbot380@hotmail.com",
    project_name="Smart_Robots",
    base_url="https://roboreactor.com"
)

# Define targeted joint spatial layout arrays (configured in Radians)
joint_targets = {
    "shoulder": math.radians(150),
    "base": math.radians(45),
    "wrist": math.radians(20)
}

# Fire absolute multi-axis coordinate trajectories into the rendering engine
response = client.send_navigation_control(
    x=1.5,
    y=0.0,
    z=1.5,
    roll_deg=0.0,
    pitch_deg=0.0,
    yaw_deg=0.0,
    joint_targets_rad=joint_targets,
    robot_name="Robot_arm_01"
)

print(f"[NAV-TX] Kinematics Status Update: {response}")
```

## Heterogeneous Multi-Sensor Payload Ingestion

Leverage the standard unified telemetry pipeline (`post_sensor_data`) to ingest complex multidimensional arrays, spatial matrices, audio streams, or specialized hardware telemetry.

```python
import random
import math
from roboreactor import RoboReactor

# Initialize the client
client = RoboReactor(
    email="kornbot380@hotmail.com",
    project_name="Smart_Robots",
    base_url="https://roboreactor.com"
)

# --- Category 1: Battery Management Systems (BMS Telemetry) ---
bms_payload = {
    "BMS_sensor": {
        "main_pack": 88.5, 
        "aux_cell_1": 86.5, 
        "temp_sensor_5": 35.5
    }
}
client.post_sensor_data(bms_payload)

# --- Category 2: Inertial Measurement Units (IMU Kinematics) ---
imu_payload = {
    "Motion_sensor": {
        "imu_1": {
            "x": random.uniform(-0.1, 0.1),
            "y": random.uniform(-0.1, 0.1),
            "z": 1.015
        },
        "radar_2": 3.45
    }
}
client.post_sensor_data(imu_payload)

# --- Category 3: Spatial Matrices (2D Tactile Arrays / Temperature Heatmaps) ---
# Constructs a standard 10x10 floating matrix grid 
tactile_matrix = [[round(random.uniform(8.5, 9.0), 4) for _ in range(10)] for _ in range(10)]
matrix_payload = {
    "Array_sensor": {
        "Tactile_finger_sensor_1": tactile_matrix
    }
}
client.post_sensor_data(matrix_payload)

# --- Category 4: High-Frequency Audio Signals (Digital Signal Processing Vectors) ---
audio_waveform = [round(math.sin(i * 0.5) * 0.05, 4) for i in range(50)]
audio_payload = {
    "Audio_sensor": {
        "mic_1": audio_waveform
    }
}
client.post_sensor_data(audio_payload)

print("[SUCCESS] Multi-category sensory dataset dispatched.")
```
