davidjsherman / inirobot-scratch-thymioii Goto Github PK
View Code? Open in Web Editor NEWLink Scratch 2 and the Thymio-II robot
Link Scratch 2 and the Thymio-II robot
I am unable to get 0.73 (or earlier) release to work with a wireless thymio and Mac (OSX 10.9.5).
I've never had a problem on Mac when USB tethered. I can also get it to work both wireless and tethered with the 0.73 release on a Win10 machine.
I have installed the latest aseba 1.5.3 / scratch thymio bundle -
Here's what I'm trying - Is this the correct sequence?
At this point the scratch2-thymioII extension blocks are shown as active (green button) but the thymio does not respond to the scratch command blocks
I have tried this on two machines (iMac and MacBook both - OSX 10.9.5).
Thymio firmware is current (v10).
Hi,
I try to test with the Wireless dongle and get a runtime_error, :
D:\asebacomp\Scratch2-ThymioII-0.7-Win7>start "Scratch-ThymioII" /min /w /b bin/
asebascratch --aesl bin/thymio_motion.aesl ser:name=Thymio-II
Found Thymio-II on port .\COM17
terminate called after throwing an instance of 'std::runtime_error'
what(): Can't allocate an unused node id for target id 52704 in stream 0x2b48
ee4
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
Same error with a robot that has a wireless module but connect with cable
There is no crashes with robot that have not wireless module with firmware 9 or 10.
I think there is a problem with the wireless Thymio. The nodeID of Aseba are changing from on robot to the other.
Kind regards
The tilt reporter isn't being read by Scratch. It is probably a mismatch between Scratch's rule for building polled variable names, and the tricky naming convention we use in the bytecode. The asebahttp /poll request correctly reports tilt as e.g. tilt/right/left (as well as tilt.right/left).
In general we need a smarter way to map the user-friendly parameter values presented in Scratch, to the actual variable names that are used in the bytecode. We will need this better solution for internationalization.
scratchfoundation/scratch-flash@8d149c6 changed the syntax of extension blocks and reporters to use \u001f as a separator instead of \u002e ('.'). Sigh. So much for the one-hour-for-every-pixel claim.
Since we use menus extensively to reduce the number of blocks and reporters in the Thymio-II Scratch extension, many things are broken in Scratch 2 release 445.
/poll
route needs to rewrite those variable names whose '.' characters are meant to denote menusThe example Sierpinski ThymioII colors in release 0.7 (commit 7c157cb) doesn't work: the Scratch script stops at the first step.
It would be useful to have linkable generated versions of the thymio_motion documentation available. Now that thymio_motion.aesl
has structured comments, we can generate:
Hi David and big up for this project !
A question/issue: it seems impossible to install the app on this version of MacOs, as a prohibited image appears on the logo.
I find it strange, as it was not mentioned any system requirements. Even more if we recall the fact that both Aseba studio & Scratch offline are compatible with older mac, thus acknowledging users' means : schools, educators & non-profit organizations don't always have the money to buy newer computer ;) !
Any way to fix this? I'd love to start using Thymio in a workshop with Scratch learners for the launching of our project: how could I work around this so I manage to prepare the curriculum (ie; asap)?
Thank you so much for your efforts and your great job!
Catherine from jeux-sais-faire.org
Currently asebascratch relies on Scratch's polling of state variables for informing it about events like button presses, but more intelligent clients could use event messages. Indeed ScratchX has some support for generating hat event messages.
These events are triggered by the robot's environment and are rare, so should not generate too much overhead. Thymio_motion.aesl
could generate Aseba user events for them.
Candidates are: b_button/center
, b_button/forward
, b_button/backward
, b_button/left
, b_button/right
, b_clap
.
When asebascratch can't obtain exclusive access to the robot, it fails silently. On MacOS it should at least open a message box to show the problem.
Even better, on success it could show the description of the robots that it found.
With a simple program
When clicked
wait until button.center = 1
move 50 mm
the buttons do not response and their LEDs do not light up.
Hi, I would like to know how do you manage to rotate or move the robot certain angles or distances.
thanks in advance, Amr
If I try to start Scrach2ThymioII.app from Scratch2-ThymioII-0.7-MacOS.dmg :
$ ./Scratch2-ThymioII
2016-06-07 14:11:43.996 Scratch2-ThymioII[2199:15693927] App did finish launching
dyld: Library not loaded: /sw/lib/libxml2.2.dylib
Referenced from: /Volumes/data/Applications/scratch_thymio/Scratch2-ThymioII.app/Contents/Resources/../MacOS/asebascratch
Reason: Incompatible library version: asebascratch requires version 12.0.0 or later, but libxml2.2.dylib provides version 10.0.0
/Volumes/data/Applications/scratch_thymio/Scratch2-ThymioII.app/Contents/Resources/script: line 3: 2201 Trace/BPT trap: 5 ../MacOS/asebascratch --aesl ../Resources/thymio_motion.aesl ser:name=Thymio-II
But it works well with Scratch2-ThymioII-0.6.2-MacOS_patch1.dmg.
Hi,
It seems that asebascratch/asebahttp are not compatible with Thymio firmware 10 but I didn't found anything on that issue, did you notice it ?
With the asebahttp from git
./asebahttp --aesl thymio_motion.aesl ser:device=/dev/ttyACM0
HttpInterface connect asebaTarget ser:device=/dev/ttyACM0
Incoming Aseba connection from ser:device=/dev/ttyACM0;baud=115200;stop=1;parity=none;fc=none;bits=8;dtr=true
1 scripts have no corresponding nodes in the current network and have not been loaded.
or with an old version of asebascratch
./Scratch2-ThymioII.sh
HttpInterface connect asebaTarget ser:device=/dev/ttyACM0
Incoming Aseba connection from ser:device=/dev/ttyACM0;baud=115200;stop=1;parity=none;fc=none;bits=8;dtr=true
0x3826c0Broadcast look for node description
0x3826c0Broadcast look for node description
0x3826c0Broadcast look for node description
...
The REST verb for slot update is properly POST. However the Scratch protocol requires GET for all requests. So asebahttp accepts GET requests for slot update, with the value vector encoded in the URI separated by slashes. This variant needs to be documented in the api-docs.
Since OAS uses RFC 6570 path templates, in the general case we can use a composite value and rely on convention to encode the values: Q_set_odometer{/values*}
.
When the slot is an event and we know the parameter names, we can instead expand the values explicitly: Q_set_odometer/{angle}/{x}/{y}
.
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.