Skip to content
프로젝트

T-Kuhn/HighPrecisionStepperJuggler

GitHub에서 보기

소개

일명 Octo-Bouncer입니다. Teensy 4.0과 맞춤 펄스 생성 알고리즘으로 스테퍼 모터를 매우 정밀하게 구동하고, PC 기반 이미지 처리를 결합해 기계가 탁구공을 저글링하도록 하는 것을 목표로 합니다.

디자인 및 미디어

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

HighPrecisionStepperJuggler

a.k.a Octo-Bouncer. Highly precise stepper motor driving with a Teensy 4.0 and custom pulse generating algorithm and PC based image processing with the goal of getting a machine to juggle a ping pong ball.

Here's a blog post with more infos about this project. And here's a YouTube video of the machine in action.

The Arduino folder contains the code for the Teensy 4.0. The Teensy 4.0's job is simple:

  • Listen for movement comments on the serial bus
  • Generate pulses for the stepper motors

The Unity folder contains the code for the Unity Application. This Application is responsible for:

  • Set up the camera (120 FPS 640×480 data stream, gain, exposure, contrast, ISO, saturation) via OpenCV
  • Set up Camera Device and getting image stream via OpenCV
  • Run Image Processing and get 2D pixel position of ping pong ball
  • Get 3D position of ping pong ball using the results of above-mentioned image processing
  • Calculate ball velocity
  • Use ball position and velocity in PID/Analytical control code to calculate correction-tilt of plate
  • Execute Inverse Kinematic code to figure out how much each motor needs to rotate in order to get the plate to a certain height with a specific tilt.
  • Send result of IK calculation to the microcontroller via serial interface
  • Render machine position and movements
  • Render image processing data
  • Render graph showing several data streams

The UVCCameraPlugin folder contains the C++ code for the camera plugin. This is a Unity plugin. All the OpenCV code is being executed in here.

Important

You need to download openCV 4.2 and get the opencv_world420.dll from the build folder and put it inside Plugins/UVC Camera Plugin next to UVCCameraPlugin.dll. If you don't do that you'll get below error message on play:

Plugins: Failed to load 'Assets/Plugins/UVC Camera Plugin/UVCCameraPlugin.dll' because one or more of its dependencies could not be loaded.

Also, you need to use Unity Editor version 2019.2.6f1. It won't run with newer versions.

관련 프로젝트 살펴보기

불러오는 중…