0

I am trying to create a small program that will track and navigate my robot (NXT). System (PC) is using camera and reacTIVision in order to recognize fiducials (tags) that are placed on the top of the robots. I created the NXT code which is running in eclipse and it is fine.

On the other side, I want my PC code to run in processing so that at the later stage I can draw different things in processing and project them with the projector. So, when I started my PC code I had to import the lejos.pc.comm.* in order for the program to recognize classes such as NXTConnector, NXTInfo and so on. UNFORTUNATELY, when I run the program it says this library does not exist. I went to sketch in the top menu of processing and then import library but there was only NXTComm processing library which enables to control the Lego NXT robots. I went to see the examples and they are using other imports that my code is not using (I tried those imports).

THEN, I tried to manually download the lejos from website and take the whole extracted folder or .jar and put it into sketchbook-library. BUT it did not work.

I successfully imported other libraries into eclipse, but here it is difficult for me or I still do not fully understand how processing works.

I am using processing-2.2.1 on Ubuntu 16.04 LTS Intel® Core™ 64bit. I am using older version of processing (meaning 2.2.1) because reacTIVision had problems with newer version (3).

I am trying to solve this problem and it is taking a while at this point, so if anyone can help, I would really appreciate it.

1 Answers1

0

LeJOS is a little more complicated than a regular Java library, so getting it to work in the Processing editor is going to be a little tricky.

Instead, I recommend using Processing as a Java library, then writing your code in Java using eclipse.

You can still draw using Processing just like always, but your classpath and stuff will be setup using eclipse.

You can find directions for setting up Processing in eclipse here, and then setting up LeJOS in eclipse should be pretty standard as well.

Kevin Workman
  • 41,537
  • 9
  • 68
  • 107
  • Thanks a lot for the information above. I will take a look at the link, try the things and inform you here if I successfully solved the problem. – Marko Otasevic Nov 22 '16 at 16:07
  • I used processing 2 and it worked, even dough it says tutorial for processing 3. Thanks again. I will try a few examples now. – Marko Otasevic Nov 23 '16 at 18:22