Current Priority List for NXJ

This is where you talk about the NXJ software itself, installation issues, and programming talk.

Moderators: roger, 99jonathan, imaqine

Re: Current Priority List for NXJ

Postby mimarox » Wed Jun 22, 2011 10:11 am

Hi,

as the last post on this thread is already more than 1.5 years old and I couldn't find any other info about the state of affairs I'm wondering what the current priority list for the next release is.

I'm new to practical robotics in general and specifically the NXT, as well as to using Java in an embedded environment. However I'm also a professional Java developer with several years of experience in developing for Java SE and EE. So if I had a list of current issues at hand, I might be able to contribute one thing or another.

One thing that puzzles me about leJOS is the complete lack of reflection even in the most minimalistic way. Is that completely due to the constraints of the environment or could this actually be implemented?

The things I'd like to be able to do are
- Retrieving a class's runtime annotations
- Retrieving a class's methods
- Retrieving a method's name
- Retrieving a method's runtime annotations
- Invoking a method

Also I suppose that state machines are a useful pattern for programming robots. However I didn't see any mentioning of them in the tutorial or support of them in the API. Even without reflection it should be possible to create a framework for state machines. What do you think about that?

Kind regards,
Matthias
mimarox
New User
 
Posts: 11
Joined: Wed Jun 22, 2011 9:17 am

Re: Current Priority List for NXJ

Postby gloomyandy » Wed Jun 22, 2011 11:06 am

There is a very minimal form of reflection available via the non standard VM class:
http://lejos.sourceforge.net/nxt/nxj/ap ... xt/VM.html
This pretty much exposes all of the information available within the VM to Java...

The main reason for the lack of reflection is that most of the items you are interested in (like class names, method names, annotations etc.), are not present in the .nxj file that runs on the NXT, to reduce the amount of memory required. All of this information is removed during the link process, also things like dynamical class loading is not provided for similar reasons (the standard leJOS classes.jar file would not fit in the available NXT memory).

If you can provide some details of how you would like to use reflection we may be able to offer some help on ways that you can do this with leJOS. But please start a new thread if you want to discus this topic further.

As to state machines I'm sure that some form of support would be of interest. Like many things missing from leJOS it has probably not been something that any user or developer has taken an interest in so far. If you have any ideas or code that you would like to contribute on this, then please let us know...

Andy
User avatar
gloomyandy
leJOS Team Member
 
Posts: 3004
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: Current Priority List for NXJ

Postby mimarox » Tue Jul 05, 2011 7:02 pm

I've actually been working on a hierarchical state machine framework implementation for lejos during the last few days and am currently working on a sample application using it. Please let me know how I might share it with you. Thanks!

As to the reflection issue. Given your explanation it's perfectly understandable that leJOS cannot support the full Java capabilities. Anyway it's quite a revelation to see Java in such a constrained environment like the NXT at all. So thanks for the awesome job you guys are doing :-)

Currently I actually don't really need reflection. But since leJOS supports annotations I figured there should also be a way to work with them effectively. Furthermore using reflection is a good way to implement a framework allowing loose coupling of the framework and the application using it. If really needed, a way around the environment's limitations might be to insert a processing step between the source code and the actual lejos byte code. In that processing step one would generate static lejos code from the original dynamic java code and any xml or other files belonging to the application code. This way the source code can actually be as loosely coupled as needed and the resulting byte code as tightly coupled as required. This is just an idea and I'm not sure whether this would ever be really worthwhile.

One question that popped up while working with lejos is what the programming background and experience in general java of most lejos users might be. You got any information about that?

Matthias
mimarox
New User
 
Posts: 11
Joined: Wed Jun 22, 2011 9:17 am

Re: Current Priority List for NXJ

Postby gloomyandy » Wed Jul 06, 2011 9:43 am

Hi Matthias,
I don't think we have any hard data as to the Java experience of leJOS users. Looking at the forum, it would seem to be a pretty wide spread. I think most people have some experience of Java (though often not that much, perhaps for a school or college course), but then we have other users that have a lot of experience, and others with none at all. I think that one of the hurdles for many users is the step up to using either command line tools or the rather complex professional development environments that are typically used with leJOS. For many of our users they are having to deal not only with Java (possibly for the first time), but also these rather more complex and powerful IDEs which they are not familiar with. That along with concepts like multi file, and package projects are a big step up from the typically simpler Lego environments like the Lego NXT-G and NXC...

All the best

Andy
User avatar
gloomyandy
leJOS Team Member
 
Posts: 3004
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: Current Priority List for NXJ

Postby mimarox » Wed Jul 06, 2011 10:33 am

Hi Andy,

thanks for your detailed answer to my question. It might be an interesting topic to find ways to make it easy for such people to create powerful programs with leJOS in the future. If the project team is interested in exploring that I might be able to contribute.

In the meantime there's still the open question of how I might share the hierarchical state machine framework I created with you.

Matthias
mimarox
New User
 
Posts: 11
Joined: Wed Jun 22, 2011 9:17 am

Re: Current Priority List for NXJ

Postby gloomyandy » Wed Jul 06, 2011 10:34 am

Hi,
Can you start a new thread in the software section, and we can talk about your work over there...

Thanks

Andy
User avatar
gloomyandy
leJOS Team Member
 
Posts: 3004
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Previous

Return to NXJ Software

Who is online

Users browsing this forum: No registered users and 0 guests

more stuff