Skip to content

Repository files navigation

6-RSS Stewart Platform Control

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).

Project Structure

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

Requirements

  • Python 3.7+
  • ROBOTIS U2D2 interface
  • 6x Dynamixel X-Series servo motors (ID: 101-106)

Platform-Specific Kernel Library

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.

Installation

pip install -r requirements.txt

dynamixel_sdk is bundled with the project, so no separate installation is needed.

Usage

Serial Port Configuration

Edit the SERIAL_PORT value in sp_control.py to match your environment:

# Windows
SERIAL_PORT = "COM4"

# Linux
SERIAL_PORT = "/dev/ttyUSB1"

Run

python sp_control.py

The default demo moves the platform in the x axis up to +30 mm and back to -30 mm.

Watch the video...

#1 (comment)

Custom Control

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()

KIMMSPKernel C API

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)

License

Copyright (c) 2019 Joonho Seo, Korea Institute of Machinery and Materials (KIMM)

About

Stewart Platform Control

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages