Metadata-Version: 2.4
Name: superbot2
Version: 0.1.2
Summary: A modular robotics framework for controlling various robots
Author-email: SuperBot Team <team@superbot.com>
License: MIT
Project-URL: Homepage, https://github.com/superbot/superbot
Project-URL: Repository, https://github.com/superbot/superbot.git
Project-URL: Documentation, https://superbot.readthedocs.io/
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Description-Content-Type: text/markdown
Requires-Dist: numpy>=1.21.0
Requires-Dist: scipy>=1.7.0
Requires-Dist: PyYAML>=6.0
Requires-Dist: pyzmq>=25.0.0
Requires-Dist: pyrealsense2; sys_platform == "linux"
Requires-Dist: pyorbbecsdk2; sys_platform == "linux"
Provides-Extra: dev
Requires-Dist: pytest>=6.0; extra == "dev"
Requires-Dist: black>=22.0; extra == "dev"
Requires-Dist: flake8>=4.0; extra == "dev"
Requires-Dist: mypy>=0.950; extra == "dev"
Provides-Extra: docs
Requires-Dist: sphinx>=4.0; extra == "docs"
Requires-Dist: sphinx-rtd-theme>=1.0; extra == "docs"

# SuperBot

SuperBot is a modern, modular robotics framework designed for controlling dual-arm piper robots and other robotic systems. It provides a clean, intuitive API for robot control, sensor integration, and utility functions.

## Features

- Modular architecture with separate modules for bots, sensors, and utilities
- Dual-arm piper robot control interface
- Sensor management system
- Utility functions for robotics operations
- Clean, well-documented API

## Installation

```bash
pip install superbot
```

## OpenCV 摄像头预览（Linux）

如果你只想快速查看 USB 摄像头画面，可以直接使用仓库里的 `see_umi.py`。

### 1) 安装依赖

```bash
pip install opencv-python
```

### 2) 查看可用摄像头编号

```bash
python find_opencv.py
```

输出会显示可用摄像头编号（如 `0`、`1`、`2`）。

### 3) 启动预览

默认打开 `source=0`：

```bash
python see_umi.py
```

指定摄像头编号：

```bash
python see_umi.py --source 1
```

推荐参数（兼容性较好）：

```bash
python see_umi.py --source 0 --format MJPG --backend v4l2 --width 640 --height 480 --fps 30
```

退出：按 `q` 或 `Esc`。

### 4) 常用参数

- `--source`：摄像头设备号（默认 `0`）
- `--format`：像素格式，支持 `AUTO` / `MJPG` / `YUYV`
- `--backend`：采集后端，支持 `v4l2` / `auto`
- `--width` `--height`：目标分辨率
- `--fps`：目标帧率

### 5) 画面异常排查

当出现花屏、偏色、卡顿时，通常是像素格式或分辨率不匹配：

1. 优先尝试 `MJPG`：

	```bash
	python see_umi.py --source 0 --format MJPG --backend v4l2 --width 640 --height 480
	```

2. 若仍异常，改为 `YUYV`：

	```bash
	python see_umi.py --source 0 --format YUYV --backend v4l2 --width 640 --height 480
	```

3. 观察程序启动时打印的实际参数（`format/size/fps`），确认驱动是否应用了你的设置。

## Quick Start

```python
from superbot import RobotWrapper

# Initialize the robot wrapper with CAN interfaces
robot = RobotWrapper(can_interfaces=("can_left", "can_right"))

# Move to a specific pose
import numpy as np
target_pose = np.eye(4)  # 4x4 identity matrix as example
robot.move_to_pose(left_target=target_pose, right_target=target_pose)

# Close the grippers halfway
robot.set_gripper(0.5, 0.5)

# Get current robot state
state = robot.get_current_state()
print(state)
```

## Architecture

SuperBot follows a modular design:

- **bots**: Contains robot-specific implementations (dual_piper, etc.)
- **sensors**: Sensor management and interfaces
- **utils**: Common utility functions for robotics operations
- **transport**: Zero-copy instant VLA data transportation lib powered by memap && zeromq, fastest solution to sending data to poliy server.



## Zero Transport

zero transport uses zmq and mmap for zero-copy data sharing, unlike most VLA policy server using http sending msgpack or binary, we are currently support data types contains:

- array;
- string (scalars);

Remote policy servers also expose a quick connectivity check by default:

```bash
curl http://<server-host>:8080/echo
# hello world, superbot
```



## Contributing

Contributions are welcome! Please see the contributing guidelines for details.

## 报错记录
load extensions from /home/lumos7/miniconda3/envs/startouch/lib/python3.10/site-packages/extensions
2026-03-23 19:14:56.429 | ERROR    | superbot.bots.dual_touch:_import_single_arm_right:107 - 无法导入 SingleArm，请确认 /home/lumos7/startouch-v1/interface_py 下存在 startouchclass.py: libstartouch.so: cannot open shared object file: No such file or directory
client.sh: 行 12: --instruction: 未找到命令

修复：
# 编辑库配置文件
sudo nano /etc/ld.so.conf.d/startouch.conf

# 在文件中添加一行库文件所在的目录路径（替换成你实际的路径）
/home/lumos7/startouch-v1/lib

# 保存退出（按 Ctrl+O 回车，再按 Ctrl+X）
# 更新系统库缓存
sudo ldconfig

# 验证（能看到 libstartouch.so 即可）
ldconfig -p | grep startouch
