Javascript on Link

4 replies [Last post]
briancsparks
Title: NooBot
Joined: 07/04/2013
Posts:
BotPoints: 7
User offline. Last seen 7 years 36 weeks ago.

Javascript is an excellent programming language for "event-based" problems, such as controlling a robot. Has anyone attempted this? I know that Node.js has been ported to the ARM. Is the JVM on the Link? Does it include Rhino?

Thanks in advance.

mklein
Title: NooBot
Joined: 01/15/2014
Posts:
BotPoints: 14
User offline. Last seen 6 years 51 weeks ago.

There is no "out of the box" JVM on the Link, but there is a project named LinkJVM which brings Java to the Link. (I am the project leader and developer of it.) It is pretty familiar to CBCJVM and contain the JRE, javac & other tools as well as a java robot library.

Unfortunately it does not include Rhino (at this time), but it would be an awesome thing to add.

LinkJVM is hosted on Github: github.com/LinkJVM/LinkJVM

briancsparks
Title: NooBot
Joined: 07/04/2013
Posts:
BotPoints: 7
User offline. Last seen 7 years 36 weeks ago.

Thanks for the info.

I have started down the journey of building the Link firmware -- setting up a build server and all. Maybe I don't need to go through the extra trouble and can compile LinkJVM and/or NodeJS separately and just compile and install them?

Anyway, I have a build server (Ubuntu 12.04) and follow the instructions at https://github.com/kipr/meta-kipr, which basically points to the OEM: http://www.kosagi.com/w/index.php?title=Kovan_firmware. (I am following all the 'special' instructions like re-linking sh to bash, and not using symlinks.) It seems to be working well as I progress through "./oebb.sh config kovan" (then editing according to meta-kipr) and "./oebb.sh update" Then I invoke "bitbake kovan-kipr-image" and it starts to work, and a few minutes later fails with "ERROR: Nothing PROVIDES 'kovan-distribution-image'" I try kovan-kipr-image (as that is the name of the .conf file) and get a similar ERROR.

A few questions:

* I've also read through the OpenEmbedded user manual (http://docs.openembedded.org/usermanual/html/index.html) that has similar (but more comprehensive) instructions.
How do the kipr/kosagi instructions relate to the OpenEmbedded instructions?
* In all places I've read that the build lasts "overnight" but my build only runs for a few minutes.
* The ./oebb.sh config kovan command fetches several repositories.

Thanks in advance,
--- Brian

mklein
Title: NooBot
Joined: 01/15/2014
Posts:
BotPoints: 14
User offline. Last seen 6 years 51 weeks ago.

Don't try the set up a build server, it brings a lot of pain. It took me a few weeks to get everything working. (It only works because I got a backup of the KIPR's build server.) BitBake is very, very weird.
You don't need to build LinkJVM, you can directly install a precompiled package. There is a zip file with everything you need (including a web-based introduction to LinkJVM with a some examples) on my fileserver at http://files.mklein.co.at/LinkJVM/depoly/LinkJVM-Deploy-Latest.zip.
If you want to build NodeJS on the Link you can use SSH(root has no default password), but before you run ./configure you need to set the system time.

Programming the robot using node would be very awesome.

Good Luck,
--Markus

peterstrong
peterstrong's picture
Title: NooBot
Joined: 07/05/2016
Posts:
BotPoints: 12
User offline. Last seen 5 years 5 weeks ago.

Node.js is very useful