ShivamMathtech/Robo-Motion-Studio

A full-stack MVC robotic-arm simulation application for advanced inverse kinematics, 3D visualization, trajectory authoring, and animation playback.

★ 0Forks 0JavaScriptGitHub ↗Compare

README

Robo-Motion Studio

A full-stack MVC robotic-arm simulation application for advanced inverse kinematics, 3D visualization, trajectory authoring, and animation playback.

This project is simulation-first. It does not directly command physical robot hardware. Add vendor-specific safety, interlocks, authentication, and real-time control layers before connecting to equipment.

Features

  • Enterprise-style dark engineering UI based on the supplied concept mockup
  • Interactive Three.js 3D 6-DOF robot visualization with orbit camera
  • Damped Least Squares (DLS) numerical inverse-kinematics solver
  • Position + orientation weighting
  • Joint limits and iterative convergence controls
  • Forward-kinematics endpoint calculation
  • Target TCP position/orientation editor
  • Joint inspector and per-joint manual positioning
  • Waypoint creation/removal
  • Smooth trajectory playback using cubic smoothstep interpolation
  • 3D TCP path visualization
  • Live FPS, position error, iteration, workspace, and joint-limit metrics
  • JSON-backed project persistence through REST APIs
  • MVC separation between model, controllers, routes, services, views, and static client code
  • Node built-in tests for FK and IK behavior

MVC Architecture

robo-motion-studio/
├── server.js
├── package.json
├── src/
│   ├── app.js
│   ├── config/
│   │   └── defaultRobot.js
│   ├── models/
│   │   └── projectModel.js
│   ├── controllers/
│   │   ├── projectController.js
│   │   └── ikController.js
│   ├── routes/
│   │   ├── webRoutes.js
│   │   └── apiRoutes.js
│   ├── services/
│   │   └── ikService.js
│   ├── utils/
│   │   └── math3d.js
│   ├── data/
│   │   └── projects.json
│   └── views/
│       └── index.ejs
├── public/
│   ├── css/app.css
│   └── js/
│       ├── api.js
│       ├── app.js
│       └── robotScene.js
├── tests/
│   └── ikService.test.js
└── docs/
    └── ui-reference.png

Run locally

Requirements: Node.js 20+ and npm.

npm install
npm start

Open:

http://localhost:3000

For development with Node watch mode:

npm run dev

Run tests:

npm test

REST API

Health

GET /api/health

Get project

GET /api/projects/default

Save project

PUT /api/projects/default

Example body:

{
  "jointAngles": [20, -35, 55, -10, 35, 12],
  "target": {
    "position": [3.35, 0.95, 1.25],
    "orientation": [0, 20, 20]
  }
}

Forward kinematics

POST /api/ik/fk

{
  "angles": [20, -35, 55, -10, 35, 12]
}

Solve inverse kinematics

POST /api/ik/solve

{
  "initialAngles": [20, -35, 55, -10, 35, 12],
  "target": {
    "position": [3.35, 0.95, 1.25],
    "orientation": [0, 20, 20]
  },
  "options": {
    "iterations": 120,
    "tolerance": 0.0005,
    "damping": 0.08,
    "positionWeight": 1,
    "orientationWeight": 0.35
  }
}

IK Mathematics

The solver estimates a 6×6 numerical Jacobian and applies a damped least-squares update:

Δq = Jᵀ (J Jᵀ + λ²I)⁻¹ e

where:

  • q is the six-joint configuration vector
  • J is the numerical pose Jacobian
  • e is the weighted position/orientation error vector
  • λ is the damping factor

Each iteration clamps the update step and enforces the configured joint limits.

Production upgrade path

For a larger deployment, replace the JSON model with PostgreSQL, add authentication/RBAC, versioned robot definitions (URDF/SDF), WebSocket telemetry, collision geometry, RRT*/CHOMP/MoveIt-style planning, audit logs, job queues, and a hardware adapter that remains separated from the simulation domain.

Contributors

ShivamMathtech

Issues