diff --git a/leap_py3/README.md b/leap_py3/README.md new file mode 100644 index 0000000000000000000000000000000000000000..33e16ec388a04f0e1c272d69f310fa6e4bea22d1 --- /dev/null +++ b/leap_py3/README.md @@ -0,0 +1,11 @@ +# Leap Motion API using LeapSDK (leapd) through websocket + +## Requirements + - 64bit AMD processor + - LeapSDK + - Python3 and packages: + - websocker-client + +## Examples + +Python scripts start with `'e_'` are executable examples. \ No newline at end of file diff --git a/custom_py3/example.py b/leap_py3/e_logging.py similarity index 70% rename from custom_py3/example.py rename to leap_py3/e_logging.py index 493c188ac6b9a45ce9dfbe6d49e82889cd9224a6..51a7cd8a550ec651af0127369af496ad98554dc6 100644 --- a/custom_py3/example.py +++ b/leap_py3/e_logging.py @@ -3,4 +3,5 @@ from leap import LeapController l = LeapController("127.0.0.1", logging=True) l.run() -input() \ No newline at end of file +# some time to read logging +input() diff --git a/leap_py3/e_rosbridge.py b/leap_py3/e_rosbridge.py new file mode 100644 index 0000000000000000000000000000000000000000..fc7832635493925f7509d5e4f91ca58fd7a89836 --- /dev/null +++ b/leap_py3/e_rosbridge.py @@ -0,0 +1,10 @@ +from leap import LeapController +import roslibpy + +h="127.0.0.1" +p="9090" +client = roslibpy.Ros(host=h, port=p) + +client.run() + +roslibpy.Topic(client, '/leap','') \ No newline at end of file diff --git a/custom_py3/leap.py b/leap_py3/leap.py similarity index 96% rename from custom_py3/leap.py rename to leap_py3/leap.py index 286a94ece2e5e3c93737f41926104b93a0274029..69f431f4fb8aedcc3f16d4ce103eb4b771e7fd09 100644 --- a/custom_py3/leap.py +++ b/leap_py3/leap.py @@ -20,7 +20,6 @@ class LeapController: self.frame = json.loads(m) if self.logging: - print("wow, new frame") for h in self.frame["hands"]: print(json.dumps(h["t"], indent=3))