3 Commits
Author SHA1 Message Date
cristhian aguilera 69ba84e406 add markdownlint GitHub Actions workflow 2026-04-09 09:00:00 -04:00
cristhian aguileraandClaude Sonnet 4.6 a5f05ddc6f fix AGENTS.md line-length lint errors
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-09 08:52:13 -04:00
cristhian aguilera 1c7654e429 add markdownlint config and fix README lint errors
Add .markdownlint.json with 120-column line limit.
Fix MD060 table separator style to match padded header rows.
2026-04-02 14:19:05 -03:00
4 changed files with 47 additions and 9 deletions
+22
View File
@@ -0,0 +1,22 @@
name: markdownlint
on:
push:
paths:
- "**.md"
- ".markdownlint.json"
pull_request:
paths:
- "**.md"
- ".markdownlint.json"
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "22"
- run: npm install -g markdownlint-cli2
- run: markdownlint-cli2 "**/*.md"
+7
View File
@@ -0,0 +1,7 @@
{
"MD013": {
"line_length": 120,
"tables": false,
"code_blocks": false
}
}
+15 -6
View File
@@ -4,7 +4,11 @@ This file provides guidance to AI coding assistants when working with code in th
## What this is ## What this is
A dora-rs Python node that interfaces with a UFactory Lite6 robot arm. On each tick it reads joint angles and TCP pose from the robot and publishes them as dora outputs. It also accepts JSON commands (home, move_to, move_to_pose, vacuum_on/off) via a `command` input. A FastAPI REST server with a web UI runs in a background thread for manual control. The robot control wrapper lives in `dora_ulite6/main.py` as the `ULite6Helper` class, and the dora event loop is the `main()` function in the same file. A dora-rs Python node that interfaces with a UFactory Lite6 robot arm. On each tick it reads joint angles
and TCP pose from the robot and publishes them as dora outputs. It also accepts JSON commands
(home, move_to, move_to_pose, vacuum_on/off) via a `command` input. A FastAPI REST server with a web UI
runs in a background thread for manual control. The robot control wrapper lives in `dora_ulite6/main.py`
as the `ULite6Helper` class, and the dora event loop is the `main()` function in the same file.
## Build ## Build
@@ -21,15 +25,18 @@ dora up
dora start dataflow.yml dora start dataflow.yml
``` ```
Robot behavior is configured through environment variables (see README.md for the full list: ROBOT_IP, DEFAULT_SPEED, DEFAULT_UNITS, API_HOST, API_PORT, VACUUM_ENABLED, INIT_MODE, etc.). Robot behavior is configured through environment variables (see README.md for the full list:
ROBOT_IP, DEFAULT_SPEED, DEFAULT_UNITS, API_HOST, API_PORT, VACUUM_ENABLED, INIT_MODE, etc.).
## Architecture ## Architecture
- **`dora_ulite6/main.py`** -- Single-file implementation containing: - **`dora_ulite6/main.py`** -- Single-file implementation containing:
- `ULite6Helper`: Wraps the xArm Python SDK for motion control (go_home, move_to_pose, get_current_position, get_joint_angles_deg, get_pose_matrix, vacuum gripper, status, reset). - `ULite6Helper`: Wraps the xArm Python SDK for motion control (go_home, move_to_pose,
get_current_position, get_joint_angles_deg, get_pose_matrix, vacuum gripper, status, reset).
- `MoveToRequest` / `MoveToPoseRequest`: Pydantic models for API validation. - `MoveToRequest` / `MoveToPoseRequest`: Pydantic models for API validation.
- `create_api()`: FastAPI app factory with REST endpoints and embedded HTML/JS web UI for manual control. - `create_api()`: FastAPI app factory with REST endpoints and embedded HTML/JS web UI for manual control.
- `main()`: Dora event loop. Starts FastAPI in a daemon thread, then processes `tick` (publishes joint_pose and tcp_pose) and `command` (executes robot actions and publishes status) inputs. - `main()`: Dora event loop. Starts FastAPI in a daemon thread, then processes `tick` (publishes
joint_pose and tcp_pose) and `command` (executes robot actions and publishes status) inputs.
- **`dora_ulite6/__init__.py`** -- Package marker. - **`dora_ulite6/__init__.py`** -- Package marker.
- **`pyproject.toml`** -- Package metadata, dependencies, and entry point. - **`pyproject.toml`** -- Package metadata, dependencies, and entry point.
- **`dataflow.yml`** -- Example dora dataflow using the git: source format. - **`dataflow.yml`** -- Example dora dataflow using the git: source format.
@@ -37,12 +44,14 @@ Robot behavior is configured through environment variables (see README.md for th
## Key APIs ## Key APIs
- **dora Python API** (`dora`): `Node()`, `node.send_output()`, event iteration via `for event in node`. - **dora Python API** (`dora`): `Node()`, `node.send_output()`, event iteration via `for event in node`.
- **xArm SDK** (`xarm.wrapper.XArmAPI`): `connect()`, `motion_enable()`, `set_mode()`, `set_state()`, `set_position()`, `move_gohome()`, `get_position()`, `get_servo_angle()`, `set_vacuum_gripper()`. - **xArm SDK** (`xarm.wrapper.XArmAPI`): `connect()`, `motion_enable()`, `set_mode()`, `set_state()`,
`set_position()`, `move_gohome()`, `get_position()`, `get_servo_angle()`, `set_vacuum_gripper()`.
- Output data is sent as PyArrow arrays with metadata dicts. - Output data is sent as PyArrow arrays with metadata dicts.
## Tools ## Tools
- **Issue tracker:** Gitea. Use the Gitea MCP tools (`mcp__gitea__*`) to read and manage issues, pull requests, and other repository operations. - **Issue tracker:** Gitea. Use the Gitea MCP tools (`mcp__gitea__*`) to read and manage issues,
pull requests, and other repository operations.
## Rules ## Rules
+3 -3
View File
@@ -33,7 +33,7 @@ nodes:
## Configuration ## Configuration
| Env Variable | Default | Description | | Env Variable | Default | Description |
|--------------|---------|-------------| | ------------ | ------- | ----------- |
| `ROBOT_IP` | `192.168.1.192` | Robot IP address | | `ROBOT_IP` | `192.168.1.192` | Robot IP address |
| `DEFAULT_SPEED` | `30` | Movement speed (mm/s) | | `DEFAULT_SPEED` | `30` | Movement speed (mm/s) |
| `DEFAULT_UNITS` | `mm` | Position units (mm or m) | | `DEFAULT_UNITS` | `mm` | Position units (mm or m) |
@@ -61,7 +61,7 @@ Access at `http://localhost:8080/`
Interactive docs at `http://localhost:8080/docs` Interactive docs at `http://localhost:8080/docs`
| Method | Endpoint | Description | | Method | Endpoint | Description |
|--------|----------|-------------| | ------ | -------- | ----------- |
| GET | `/` | Web control interface | | GET | `/` | Web control interface |
| GET | `/api/status` | Robot status (connected, errors) | | GET | `/api/status` | Robot status (connected, errors) |
| GET | `/api/pose` | Current TCP pose | | GET | `/api/pose` | Current TCP pose |
@@ -76,7 +76,7 @@ Interactive docs at `http://localhost:8080/docs`
### Vacuum Gripper (when `VACUUM_ENABLED=true`) ### Vacuum Gripper (when `VACUUM_ENABLED=true`)
| Method | Endpoint | Description | | Method | Endpoint | Description |
|--------|----------|-------------| | ------ | -------- | ----------- |
| GET | `/api/vacuum` | Get vacuum status | | GET | `/api/vacuum` | Get vacuum status |
| POST | `/api/vacuum/on` | Turn vacuum on | | POST | `/api/vacuum/on` | Turn vacuum on |
| POST | `/api/vacuum/off` | Turn vacuum off | | POST | `/api/vacuum/off` | Turn vacuum off |