找回密码
 马上注册

QQ登录

只需一步,快速开始

查看: 12271|回复: 3

LeJOS for EV3的一些消息

[复制链接]
发表于 2013-9-19 19:14:14 | 显示全部楼层 |阅读模式
本帖最后由 iRobot 于 2013-9-19 19:18 编辑

brickos_thumb1.png


今天上到LeJOS的官网晃悠了一圈。扒拉了一点关于LeJOS对应EV3的最新新闻。其实也不新了,发布日期是8月份。给大家分享一下:
我就不逐字逐句翻译了,只大致说明一下意思,并附上原文供参考


August 01, 2013 2:00 AM
leJOS on the new LEGO Mindstorms EV3. Read all about the status of the port of leJOS to the new EV3

platform on the forums. Also watch the youtube video.


2013年8月1日凌晨2点


你可以在LeJOS的论坛查看关于EV3的最新新闻,同时也可以在y网站观看视频。

于是我进入论坛,看到:

leJOS and Lego Mindstorms EV3
by gloomyandy » Wed Jul 31, 2013 10:07 pm

Folks, thanks to the good people at Lego and John Hansen, I've been lucky enough to have access to an EV3 and information about how it works etc. for a little while now. This means we have been able to make a start on porting leJOS to the new platform. With the launch of the Education version of the EV3 I can now start to make the results of this access public. The first offering is a video showing the current state of leJOS on the EV3. The plan is to make the source code for this available as soon as possible (and as soon as I've had some sleep!). What you see is very much an attempt to get things working quickly and to explore the EV3 and understand how best to support Java and leJOS on it. There is still a lot of work to do, but so far things are looking good!
http://www.youtube.com/watch?v=luTdnyIElWU

If you are keen to dive into the system, the source code for base OS, the standard Lego VM (not leJOS) and the tools you need to build it have now been released see:
http://botbench.com/blog/2013/07/31/leg ... available/
for all of the details.

Andy


2013年7月31日凌晨10点
一个叫Andy的人说,谢谢善良的John Hansen,他提供给我一个EV3用于研究。我们已经开始向EV3移植LeJOS系统,并且有了一点进展。如果你很着急,我们已经发布了部分源代码,你可以跟踪我们的进展。(iRobot:似乎Andy现在正在研究的是如何用Java虚拟运行Lego系统,可能要先弄清楚原系统之后才能通过Java介入。)


另外,Andy还说:


Re: leJOS and Lego Mindstorms EV3
by gloomyandy » Thu Aug 01, 2013 12:53 pm

How much tweaking? Not that much but some of it is pretty tricky. Yes the Lego software does provide an interface to the hardware but it is not always in a from the is easy to use from leJOS/Java.

The basic structure of the Lego software is that the kernel provides really low level access via a toolkit from TI. So this lets you really control the hardware, set timers, sort out pins, A/D controllers etc. Then there is a set of kernel modules that turn the hardware into sensor ports, motor ports, LCD devices, things that can play sound etc. Finally there is the Lego VM which handles execution of the byte code but which also has a lot of code for things like the sensor identification, drawing text, handling sound files etc. The VM runs as a user level program and talks to the kernel modules through a set of Linux character devices. You talk to these devices using a mixture of read/write calls ioctls and memory mapped file operations. There are a number of options to how to interface to the system from leJOS:
1) Talk directly to the hardware using the TI libs
2) Turn the code in the Lego VM into some sort of C library (the VM is written in C) and make JNI calls to that.
3) Talk to the kernel module interface.
In this initial implementation I used option 3. It is reasonably straight forward but there are a few things that needed sorting out:
1. Java does not really do ioctl and memory mapped files that are based on character devices.
2. The interface level used by Lego does not always match well with our model. So in Lego's case all of the low level PID control for the motors is in the kernel module. We like to do as much as possible in Java so there was a mismatch there.
3. There is an entirely new class of sensors in the EV3 that use a UART interface and that have a very different model to the analogue and i2c based devices. Plus there is a bunch of stuff to auto detect of the sensor and a mechanism to allow the new UART sensors to describe themselves.
4. A whole bunch of detailed stuff, like the actual bit/byte layout of the LCD display which is different to that used in the NXT and so needed new font bitmaps and a reworking of the bitblt function.
5. Some totally new sensors to deal with (like the IR sensor which is very cool).

But in general the port has been reasonably ok. There are lots of things that need sorting. The sensor model probably needs to be reworked to function well with the sensor auto-detect stuff. Bluetooth and USB need to be re-implemented from scratch. We need to work out how users will normally use the device, so getting files to it, running them etc. At the moment I use NFS and telnet, but I'm not sure if that will work for everyone.


大致是讲一些技术上的问题。由于EV3和NXT硬件上的不同,驱动硬件部分要重新编写。现在他希望通过内核接口直接驱动这些硬件,例如显示器,马达等。现在的问题,Java的内存管理机制同Linux是有区别的,在接口层面,Lego很难直接使用现有模型(应该是指NXT的0.9.1版)。另外还提到了新的UART接口与I2C接口的问题,以及肯定要重新绘制的屏幕显示字符的相关问题。但是进展也是有的。Andy正在尝试让传感器正常工作起来。

接着我看了看已经公开的部分成果:

LEGO MINDSTORMS EV3 Source Code Available
UNCATEGORIZED         14 COMMENTS        
At last, the LEGO MINDSTORMS EV3 source code is now available for your perusal.  It’s been uploaded to the Mindboards Github space: [LINK]. You can simply clone the repository.  It would be really great if you could drop us a note to let us know what you’ve done with it!  It would be nice if some of the programming effort was not duplicated or lost.  You can simply send a tweet to @XanderSoldaat or drop a mail to ev3@botbench.com.  I’d like to compile a list of all the different cloned repos out there and keep a copy of it on this blog.

Things you will need

A Linux (virtual) installation.  I used Ubuntu 13.04 on VMware Workstation, but I am sure other combinations also work.
Eclipse.  I used Helios Service Release 1, but I know more recent versions will also work.
Java JRE (for Eclipse)
Code Sourcery Lite for ARM version 2009q1-203.  You can download here directly: [LINK].
A USB to serial port dongle.  You need to splice an NXT cable and hook up dig0 (pin 5) and dig1 (pin 6) to TX and RX, not 100% which way around.  GND is pin 2 and 3, just pick one.  The brick’s console is on port 1 and has a baud rate of 115200 8N1.  I have a pre-made one with an NXT socket, it’s not actually as fancy as it sounds.
An SD card to put your custom firmware on. It doesn’t use up a lot of space, but I’d stick with a simple 2GB one
A pair of flat-nosed pliers. Why do you ask? The SD card can be a bit tricky to remove with your fingers, unless you have freakishly small fingers or nails that don’t snap off.
A Netgear WNA1100 WiFi dongle.  It is currently the only WiFi dongle that is supported by the EV3’s firmware.  I am sure this will be remedied 2 hours after this release.
Getting started

Use Git to clone the ev3sources repo: git clone https://github.com/mindboards/ev3sources.git

The scripts in the EV3 sources expect the source code to live in a projects folder in your home directory. You will need to create a  projects symlink to the ev3sources folder that was created when you cloned the Git repo.

I’ll publish some more elaborate HOWTOs in the next few days, for now, take a look at the scripts in ev3sources/lms2012/open_first.  You can open the lms2012 folder in Eclipse to open all of the sub projects, including the kernel modules and shared libraries.

Have fun and stay tuned!


大致是告诉你,如果你有能力,可以参与进来。他们公开原代码和试验数据,你需要准备Linux虚拟器,JRE,等等,然后你就可以自行研究了。最后还告诉我们,请笑着等我们的好消息吧!


以上,朋友们,中秋快乐!

如果您觉得我的帖子对您有用,请不吝给我一个“赞”!
发表于 2013-9-19 21:52:27 | 显示全部楼层
第一个来支持!!
如果您觉得我的帖子对您有用,请不吝给我一个“赞”!
回复

使用道具 举报

发表于 2013-10-18 23:12:51 来自手机 | 显示全部楼层
好像现在的版本是0.4
如果您觉得我的帖子对您有用,请不吝给我一个“赞”!
回复

使用道具 举报

发表于 2017-8-4 15:11:18 | 显示全部楼层
什么时候可以把leJOS的java编程用在EV3上?
如果您觉得我的帖子对您有用,请不吝给我一个“赞”!
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 马上注册

本版积分规则

QQ|手机版|中文乐高 ( 桂ICP备13001575号-7 )

GMT+8, 2024-4-27 10:46 , Processed in 0.261368 second(s), 22 queries .

Powered by Discuz! X3.5

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表