OpenMotion is a real-time 6 Degrees of Freedom (6-DOF) motion simulator that drives a Stewart platform across X, Y, Z, roll (φ), pitch (θ), and yaw (ψ). The desktop app (Qt + ImGui/ImPlot3D) computes inverse kinematics and streams servo commands to an Arduino-based motion base; it can be driven manually via sliders or live from X-Plane Flight Simulator over UDP.
If you scroll down, you will find some information on the journey I went through to put together the physical platform. But thanks to SolidWorks and some 3D printing, I can show you the first full system test with a Flight Simulator (X-Plane). If possible, try not to look at how I wired the power lines :P. Here's the clip:
OpenMotion_first_full_test.mp4
Here is the test for the new and updated GUI that includes a platform simulation independent of any physical platform:
OpenSim_alpha_demo_comp.mp4
- Physical platform assembled and online (servo-driven).
- Inverse kinematics hooked directly to Arduino; end-to-end motion path working.
- X-Plane integration: live telemetry wired in; platform can be driven “From Sim”.
- 3D visualization: ImGuiGLWidget + ImPlot3D render base/top/legs at ~60 Hz.
- Serial I/O: auto-detects Arduino, retries if unplugged, streams CSV angles.
- Telemetry Dock: live roll/pitch/yaw, body rates, and accelerations.
- Safety/robustness: stale-sim watchdog decays pose toward zero; home/zero capture.
Geometry changed slightly after build; the Qt/ImPlot3D model is being updated to match the final hardware layout.
Servo.test.rig.mp4
Platform.Quick.Test.mp4
- Manual mode (sliders) and From Sim mode (X-Plane UDP).
- Inverse kinematics → per-servo angles with pairing/inversion and clamps.
- Real-time rendering (~60 Hz) with fixed/auto world bounds.
- Serial protocol:
a,b,c,d,e,f\n(0–180°),HOME,PING, echo replies. - Home/zero from current sim pose; watchdog decays pose when telemetry stalls.
- Motion cueing filters (washout, gains, limits).
- Geometry/rig editor and calibration tools.
- Smoother servo drives (rate/accel limiting, deadband, microseconds mode).
- Logging, plots, and replay.
This project is built and run via Qt Creator using the provided OpenMotion.pro. No manual make steps needed.
Required
- Qt 6.x (or 5.15+) — Widgets + OpenGL
- C++17 toolchain (g++, clang, etc.)
- Eigen (header-only linear algebra)
- Dear ImGui (core + OpenGL3 backend)
- ImPlot3D (already vendored in this repo:
implot3d.*)
Recommended (Debian/Ubuntu/Kubuntu)
sudo apt update
sudo apt install qt6-base-dev build-essential cmake git libeigen3-dev
## Notes
- **ImPlot3D** is included; no extra install required.
- **Eigen** is header-only. If `libeigen3-dev` isn’t available, vendor headers into `Libraries/eigen/` and add that to your include path.
- **Dear ImGui** must be available in your include paths along with the OpenGL3 backend (`backends/imgui_impl_opengl3.*`). If you don’t already have it vendored:
```bash
git submodule add https://github.com/ocornut/imgui Libraries/imgui- Then ensure your
.proincludes the ImGui sources and backend.
- Launch Qt Creator.
- Open Project → select
OpenMotion.pro. - Select a Kit (Qt 6 preferred).
- Build → Run.
- Ensure Eigen is installed system-wide (
/usr/include/eigen3) or vendored atLibraries/eigen/. - Ensure
Libraries/imgui/exists (if you added it) and that the.profile includes ImGui sources andbackends/imgui_impl_opengl3.cpp. implot3d.*is part of this repo and is compiled with the app.
- In X-Plane, enable UDP Data Output and set the port to match
XP_UDP_REC_PORT(seeconfig.h). - Enable channels for roll/pitch/yaw (deg), p/q/r (rad/s), and accelerations (m/s²).
- In OpenMotion, toggle Drive From Sim to feed the platform from X-Plane.
- Sketch:
stewart_platform_arduino_code.ino
Pins:3, 5, 6, 9, 10, 11• Baud:115200 - Protocol:
- CSV:
90,90,90,90,90,90\n - Text:
HOME,PING
- CSV:
- Odd channels can be inverted; per-channel trims/clamps are available in the sketch.
- Power: Use an external 5–6 V PSU for servos and common GND with the Arduino.
Safety: Verify mechanical limits offline; keep a power cut-off within reach.
config.h— network ports, update rates, UI defaultsxplaneudpreceiver.h— minimal UDP receiver for X-Plane telemetryImGuiGLWidget.*— OpenGL + Dear ImGui + ImPlot3D renderermainwindow.*— UI, IK, serial, telemetry dock, drive modes
- Hardware assembled and servo-driven platform online
- IK engine driving servos directly (unfiltered signals)
- Platform motion synchronized with X-Plane via OpenMotion
- Geometry adjustments identified for Qt/ImPlot3D model refinement
- Update Qt visualization to match revised geometry
- Tune outputs for smoother, stable motion and alignment
- Implement motion cueing filters (washout, gains, limits)
GPL-3.0