Git Product home page Git Product logo

shapeoko_leap's Introduction

shapeoko_leap teleoperate your shapeoko CNC with Leap Motion.

====

Using: https://github.com/welch/shapeoko project to move the CNC with Gcode instructions.

Using a modified version of Leap Motion SDK Sample.

Youtube video of it working:

Video of shapeoko teleoperated with Leap Motion

====

How to use it:

I used Ubuntu 12.04 64bits. It should work in similar platforms.

First install Leap Motion SDK: https://developer.leapmotion.com/downloads

I extracted the SDK in ~/LeapSDK (/home/MY_UBUNTU_USER/LeapSDK).

I added environment variables for the SDK:

export PYTHONPATH=~/LeapSDK/lib:~/LeapSDK/lib/x64:$PYTHONPATH
export LD_LIBRARY_PATH=~/LeapSDK/lib/x64:$LD_LIBRARY_PATH

I needed to add my user to the group that could access the serial port of the CNC. To do that I checked the group of the serial device:

ll /dev/ttyACM0
crw--w---- 1 root dialout 4, 0 Nov 27 20:50 /dev/ttyACM0

Doing groups I saw I was not in the group, to add myself I did:

sudo usermod -a -G dialout MY_UBUNTU_USER

And I logged out and logged in (necessary in my case).

Before turning on the CNC put it in the center of the area with the tool halfway up. Just in case you need to invert some axes for your CNC. Also the Leap Motion is supposed to be in front of you so you can read the LEAP text in your direction.

Z axes is 0.0 when starting the connection to the CNC. It goes to 4.0 when you move the hand at more than 300.00mm up from the Leap Motion.

X axes and Y axes take the raw value and apply the function: adapt_num to divide the values by 10.0 and apply some limits to the commands to send.

Then plug in the Leap Motion, the USB cable from the shapeoko and execute ShapeokoLeap.py. You may need to change your serial port changing the variable: SERIAL_PORT in the file. By default is /dev/ttyACM0.

Use at your own risk.

You can also move the CNC around to test with gdraw which is shapeoko python lib exmaple modified to use ASDW to move on the plane (like any game) and JK to go up and down.

====

Thanks to AESS for the fun of playing with both things!

shapeoko_leap's People

Contributors

awesomebytes avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.