Inverse-kinematics-based position control system for a 6-RSS (Rotary-Symmetric Stewart) parallel robot platform.
It computes inverse kinematics through the KIMMSPKernel library developed by KIMM (Korea Institute of Machinery and Materials) and drives six Dynamixel X-Series servo motors to control the platform in 6 DOF (Rx, Ry, Rz, Tx, Ty, Tz).
6RSS-main/
├── sp_control.py # Main Stewart Platform position control script
├── RL_multi_robotis_control.py # Dynamixel servo motor communication module
├── dynamixel_sdk/ # Dynamixel SDK (Protocol 2.0)
├── KIMMSPKernel.dll # Inverse kinematics kernel (Windows)
├── libKIMMSPKernel.so # Inverse kinematics kernel (Linux/Ubuntu)
└── requirements.txt
- Python 3.7+
- ROBOTIS U2D2 interface
- 6x Dynamixel X-Series servo motors (ID: 101-106)
| OS | Kernel File | Note |
|---|---|---|
| Windows | KIMMSPKernel.dll |
Included in project root |
| Ubuntu/Linux | libKIMMSPKernel.so |
Included in project root |
The script automatically detects the OS at runtime and loads the appropriate library. No separate installation is required -- just place the corresponding file in the same directory as the script.
pip install -r requirements.txt
dynamixel_sdkis bundled with the project, so no separate installation is needed.
Edit the SERIAL_PORT value in sp_control.py to match your environment:
# Windows
SERIAL_PORT = "COM4"
# Linux
SERIAL_PORT = "/dev/ttyUSB1"python sp_control.pyThe default demo moves the platform in the x axis up to +30 mm and back to -30 mm.
Watch the video...
You can import the functions from sp_control.py for custom use:
import ctypes
from sp_control import init_stewart_platform, move_motor_pos, reset_motors
init_stewart_platform()
# 6DOF input: [Rx, Ry, Rz, Tx, Ty, Tz]
# Rx, Ry, Rz: rotation (degrees)
# Tx, Ty, Tz: translation (mm)
input_pos = (ctypes.c_double * 6)(0.0, 0.0, 0.0, 10.0, 0.0, 0.0)
move_motor_pos(input_pos)
reset_motors()The kernel library exposes a C ABI, making it usable from ctypes as well as other language bindings.
Key functions:
| Function | Description |
|---|---|
spkernel_new() |
Create a kernel instance |
spkernel_delete(handle) |
Destroy an instance |
initialize_robot_params(handle) |
Initialize robot parameters |
set_position_input_all(handle, values) |
Set 6DOF target position |
reverse_kinetics(handle) |
Run inverse kinematics calculation |
get_servo_angle_rad_joint_value(handle, joint) |
Get computed joint angle (rad) |
Copyright (c) 2019 Joonho Seo, Korea Institute of Machinery and Materials (KIMM)