Skip to main content
Loading navigation

Build a MoveIt Robot-Cell Trajectory Clearance Auditor — implementation

Prompt source

implementation98 lines11 sectionsNo variables1 code block
## Build
Evaluate dynamic obstacle bounding boxes against proposed MoveIt robotic trajectories. Flag path segments where clearance drops below minimum safety margins and generate validation reports detailing bottleneck coordinates requiring reprogramming.

## User
Manufacturing Quality Engineer

## Workflow
1. Ingest dynamic obstacle bounding volumes and proposed MoveIt robotic Cartesian trajectories.
2. Calculate minimum Euclidean clearance distances between trajectory waypoints and obstacle shapes.
3. Flag path segments where spatial clearance drops below defined robotic safety margins.
4. Generate path validation reports detailing bottleneck coordinates requiring reprogramming.

## Interface
Interactive clearance auditor presenting trajectory 3D coordinates, dynamic obstacle positions, and safety violation alerts.

## Data
Construct mock coordinate payloads using simplified geometric shapes. These normalized examples serve as simplified synthetic app records, not complete official schema files.
Starter examples below are synthetic. They are not downloaded records.

## Source
[MoveIt robotics](https://raw.githubusercontent.com/moveit/moveit2/main/README.md)
Leverages the kinematic planning and geometric shapes concepts from the MoveIt 2 manipulation platform for trajectory validation.

## Tools
langgraph, pydantic, numpy.
LangGraph manages the stateful evaluation logic of iterative waypoint checking against multiple obstacle bounds.
Requires reasoning over 3D coordinates and collision threshold criteria via hosted or local model.

## Deliverables
Submit runnable source, pinned dependencies, setup commands, a working interface, example outputs, and a recorded end-to-end demo. Include tests and an action log.

## Acceptance
- Correctly evaluates 3D waypoint coordinates against obstacle bounding spheres using Euclidean distance.
- Disapproves trajectories that violate minimum clearance thresholds (distance minus radius).
- Generates structured validation reports detailing the exact waypoint index and clearance value.
- Rejects inputs lacking waypoint lists or clearance margin configurations.

## Starter Examples
```json
[
  {
    "input": {
      "trajectory_id": "TRAJ-101",
      "waypoints": [
        {
          "x": 1,
          "y": 1,
          "z": 0
        }
      ],
      "obstacles": [
        {
          "id": "OBS-1",
          "x": 1,
          "y": 1.1,
          "z": 0,
          "radius": 0.05
        }
      ],
      "min_clearance_margin": 0.1
    },
    "expected_output": {
      "trajectory_id": "TRAJ-101",
      "status": "CLEARANCE_VIOLATION",
      "violations": [
        {
          "waypoint_index": 0,
          "obstacle_id": "OBS-1",
          "clearance": 0.05
        }
      ],
      "approved": false
    }
  },
  {
    "input": {
      "trajectory_id": "TRAJ-102",
      "waypoints": [
        {
          "x": 1,
          "y": 1,
          "z": 0
        }
      ],
      "obstacles": [
        {
          "id": "OBS-2",
          "x": 1,
          "y": 1.5,
          "z": 0,
          "radius": 0.05
        }
      ],
      "min_clearance_margin": 0.1
    },
    "expected_output": {
      "trajectory_id": "TRAJ-102",
      "status": "CLEAR",
      "violations": [],
      "approved": true
    }
  }
]
```

## Safety
Read-only trajectory validation; does not actuate robot arms or trigger real-time trajectory execution.
Use mock external writes. Require human review before any real deployment.