How do you test / debug your robots ?

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

Moderators: 99jonathan, roger, imaqine

How do you test / debug your robots ?

Postby MoxFulder » Fri Jan 04, 2008 7:51 am

Hi there,

I'm a new guy in the NXT world. I have ~1y behind me of Java development, essentially web app and Eclipse plugins.
In my every days life, I love use the eclipse debugger and, sometimes, I'm still using System.out to debug or test my software. I'm also using JUnit and of course a logging system like log4j.

My question is : how do you test your code ? Do you simply write then upload to the robot and start the soft ? Have you added some computer tests before upload and try on the robot ? How do you debug the robot (System.out will probably not work) ?

Thanks for your advises and Happy new year all !
User avatar
MoxFulder
New User
 
Posts: 8
Joined: Fri Jan 04, 2008 6:55 am

Postby gloomyandy » Fri Jan 04, 2008 8:48 am

Hi,
I've been doing a lot of development of the leJOS Bluetooth classes. To help with this I've added a new Debug class. This allows you to have calls like Debug.out("some text"); in your code, you can then hook up a small app (currently using USB), to view the output on your PC. The class will probably be included in the next version of leJOS...

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

Postby MoxFulder » Fri Jan 04, 2008 4:06 pm

seems nice ! Next step will be getting the content of the file directly via bluetooth on the computer screen.

Thx for your answer
User avatar
MoxFulder
New User
 
Posts: 8
Joined: Fri Jan 04, 2008 6:55 am

Postby kirkpthompson » Fri Jan 04, 2008 6:34 pm

I am working on classes that abstract the BT communication process between the NXT and a PC while a program is running on the NXT. I am also waiting on the latest version of Lejos since it may contain stuff that I am thinking of and don't want to re-invent the wheel. Prelim Javadoc is at
http://www.mosen.net/javadoc/lejos/DirectBTComm.html

EDIT:
changed URL to http://www.mosen.net/javadoc/lejos/
Last edited by kirkpthompson on Sat Jan 05, 2008 11:59 pm, edited 1 time in total.
User avatar
kirkpthompson
leJOS Team Member
 
Posts: 304
Joined: Wed Dec 05, 2007 1:27 am
Location: New Mexico, USA

Postby gloomyandy » Fri Jan 04, 2008 7:13 pm

Just to clarify, the Debug class does not write the output to a file. It sends it via the USB connection to the PC and it is displayed on the PC in "real time".

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

Postby MoxFulder » Fri Jan 04, 2008 11:00 pm

thanks for your comments. I'm sure I will found something interesting for my developments and maybe, I could add some more features in the future to what you've did.
User avatar
MoxFulder
New User
 
Posts: 8
Joined: Fri Jan 04, 2008 6:55 am


Return to NXJ Software

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest

cron
more stuff