cavenel / ev3dev_examples Goto Github PK
View Code? Open in Web Editor NEWExamples of program for ev3dev
Examples of program for ev3dev
I was looking into using your ev3dev python wrapper. As mentioned in ev3dev/ev3dev#63 (comment) the devices have changed. I am tweaking this in my fork right now ...
https://github.com/ensonic/ev3dev_examples
Hello, I tried using this project using the ev3dev.
I built the mindcub3r EV3 Education variant from their website.
Its like the home edition. So should be same.
I already tested the mindcub3r EV3 project and it will solve the rubiks.
But I want an open source variant of the code, so I found this. (Are there other working ev3 mindcuber opensource repos ? Send me!)
But it will only scan and throw errors.
If I run the python/rubiks_test.py
by the "File Browser" it will throw an error in the log.
The error is sometimes. Sometimes at the thrid site of the cube, sometimes at the first, sometimes at the 5. site.
rubiks.log:
2021-01-25 13:02:47,142 rubiks_test.py INFO: Begin...
2021-01-25 13:02:48,426 ev3.py INFO: Available Sensors:
('ev3-ports:in1', 'lego-ev3-us')
('ev3-ports:in2', 'lego-ev3-color')
2021-01-25 13:02:48,459 rubiks.py INFO: Initialize flipper
2021-01-25 13:02:48,706 rubiks.py INFO: Initialize color arm
2021-01-25 13:02:50,177 rubiks.py INFO: Initialize turntable
2021-01-25 13:02:50,611 rubiks.py INFO: wait for cube...proximity 86, present for 1/10
2021-01-25 13:02:50,738 rubiks.py INFO: wait for cube...proximity 86, present for 2/10
2021-01-25 13:02:50,857 rubiks.py INFO: wait for cube...proximity 86, present for 3/10
2021-01-25 13:02:50,981 rubiks.py INFO: wait for cube...proximity 86, present for 4/10
2021-01-25 13:02:51,103 rubiks.py INFO: wait for cube...proximity 86, present for 5/10
2021-01-25 13:02:51,227 rubiks.py INFO: wait for cube...proximity 86, present for 6/10
2021-01-25 13:02:51,349 rubiks.py INFO: wait for cube...proximity 86, present for 7/10
2021-01-25 13:02:51,471 rubiks.py INFO: wait for cube...proximity 86, present for 8/10
2021-01-25 13:02:51,595 rubiks.py INFO: wait for cube...proximity 86, present for 9/10
2021-01-25 13:02:51,715 rubiks.py INFO: wait for cube...proximity 86, present for 10/10
2021-01-25 13:02:51,727 rubiks.py INFO: wait for cube...cube found and stable
2021-01-25 13:02:51,778 rubiks.py INFO: scanning face
2021-01-25 13:02:53,484 rubiks.py INFO: i 1, k 1, current_position 131, current_color (81, 25, 25)
2021-01-25 13:02:53,855 rubiks.py INFO: i 2, k 2, current_position 281, current_color (192, 135, 86)
2021-01-25 13:02:54,220 rubiks.py INFO: i 3, k 3, current_position 428, current_color (23, 16, 22)
2021-01-25 13:02:54,495 rubiks.py INFO: i 4, k 4, current_position 536, current_color (210, 195, 242)
2021-01-25 13:02:54,834 rubiks.py INFO: i 5, k 5, current_position 671, current_color (25, 52, 43)
2021-01-25 13:02:55,200 rubiks.py INFO: i 6, k 6, current_position 821, current_color (198, 141, 89)
2021-01-25 13:02:55,509 rubiks.py INFO: i 7, k 7, current_position 942, current_color (197, 136, 80)
2021-01-25 13:02:55,842 rubiks.py INFO: i 8, k 8, current_position 1075, current_color (188, 135, 85)
2021-01-25 13:02:58,195 rubiks.py INFO: scanning face
2021-01-25 13:02:59,545 rubiks.py INFO: i 1, k 10, current_position 133, current_color (41, 73, 53)
2021-01-25 13:02:59,910 rubiks.py INFO: i 2, k 11, current_position 281, current_color (97, 36, 35)
2021-01-25 13:03:00,279 rubiks.py INFO: i 3, k 12, current_position 427, current_color (5, 4, 10)
2021-01-25 13:03:00,551 rubiks.py INFO: i 4, k 13, current_position 537, current_color (41, 83, 52)
2021-01-25 13:03:00,916 rubiks.py INFO: i 5, k 14, current_position 685, current_color (10, 15, 27)
2021-01-25 13:03:01,285 rubiks.py INFO: i 6, k 15, current_position 831, current_color (207, 190, 246)
2021-01-25 13:03:01,567 rubiks.py INFO: i 7, k 16, current_position 942, current_color (179, 179, 237)
2021-01-25 13:03:01,965 rubiks_test.py ERROR: i is 8..should be 9
Traceback (most recent call last):
File "/home/robot/ev3dev_examples/python/rubiks_test.py", line 20, in <module>
rub.scan()
File "/home/robot/ev3dev_examples/python/pyev3/rubiks.py", line 363, in scan
self.scan_face()
File "/home/robot/ev3dev_examples/python/pyev3/rubiks.py", line 346, in scan_face
raise ScanError('i is %d..should be 9' % i)
ScanError: i is 8..should be 9```
how do i create a server?
i don't understand clearly the README.md
I spent many hours trying to get this code to work on the current ev3dev distribution (not to mention building the Rubik solver Lego robot). I came to the conclusion that it needs major work to get it to work.
After fixing the device driver instantiations (Motor
and Color_sensor
), doing any actions failed due to the no longer existing run_mode
files in the sysfs.
Is there any chance this project will get fixed and be operational again?
Hello!
I came across your project from the EV3dev page, like most people I assume. I took a look at some of the suggestions others made, and incorporated theirs with a few of my own.
https://github.com/Redoubts/python-ev3
I didn't clone the repo, as I'm only interested in ev3.py for my purposes, but you could probably do a local diff to see what changed.
Highlights are better use of pyudev so that sensor selection is more generic, merging brake/halt mode into a single stop mode, and also a few sensible defaults for motion rotating. I also unguarded some exceptions, because I'd rather have my mistakes thrown in my face right away -- but that's just my opinion.
Thanks for your work! It was very clear code, and worked well as a companion to the ev3dev docs.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.