Intelligence Unleashed - compile error

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

Moderators: 99jonathan, roger, imaqine

Intelligence Unleashed - compile error

Postby Lego Geek » Mon Sep 26, 2011 7:07 pm

Hello:

I am working my way through the new book "Intelligence Unleashed". The Hello World program worked just fine, and still does. Now I would like to try the acherman steering program and I get this error:

The constructor SteerPilot(double .....) is undefined Ackerman.java

I also get this message stating, "Note: This element neither has attached source nor attached Javadoc and hence not Javadoc could be found."

Since I am very new to Java programming I am not sure what the error messages are trying to tell me. Also, Eclipse wanted to do an update on the weekend and now when I try to compile the code and upload it to the NXT brick it asks me if I want to use ANT build. Has some setting changed?

Any help would be appreciated.

Mike,
Lego Geek
New User
 
Posts: 12
Joined: Sun Sep 18, 2011 1:36 am

Re: Intelligence Unleashed - compile error

Postby Aswin » Mon Sep 26, 2011 9:39 pm

Hi,

I think the steerPilot has gone. You can use the pilot class instead. You'll have to set the minimum steering radius.


Aswin
My NXT blog: http://nxttime.wordpress.com/
Aswin
leJOS Team Member
 
Posts: 197
Joined: Tue Apr 26, 2011 9:18 pm
Location: Netherlands

Re: Intelligence Unleashed - compile error

Postby gloomyandy » Mon Sep 26, 2011 10:04 pm

There is a SteeringPilot in the SVN implementation. The problem is that the APIs used in the new book do not match the current release of leJOS, some of them are from a later version of leJOS that has not yet been released. I've asked Brian if he could perhaps post information about this on the forum as a sticky thread...

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

Re: Intelligence Unleashed - compile error

Postby Lego Geek » Tue Sep 27, 2011 2:02 am

Okay.... So how do I use the pilot class instead? What is this SVN implementation that is talked about? How do I get it and install it?

So much to learn before I can even write, compile, and run my first Java program.

Thank you for all your help.
Mike,
Lego Geek
New User
 
Posts: 12
Joined: Sun Sep 18, 2011 1:36 am

Re: Intelligence Unleashed - compile error

Postby bbagnall » Wed Sep 28, 2011 3:12 pm

Sorry about the confusion regarding the leJOS version. Here's some detailed instructions for getting the latest code onto your computer:
viewtopic.php?f=7&t=2925
User avatar
bbagnall
Site Admin
 
Posts: 392
Joined: Fri Aug 04, 2006 4:03 pm

Re: Intelligence Unleashed - compile error

Postby Lego Geek » Thu Sep 29, 2011 3:41 am

Hello Brian:

I copied the files from the snapshot folder on top of the same folders and files as are in the lejos_NXT folder. I think some of the files in the lejos bin folder where replaced with the files from the snapshot bin folder. Same for all the other folders. Is this correct?

I am still having an undefined error for the SteerPilot line in the book - page 139.

Mike
Lego Geek
New User
 
Posts: 12
Joined: Sun Sep 18, 2011 1:36 am

Re: Intelligence Unleashed - compile error

Postby bbagnall » Fri Sep 30, 2011 2:40 pm

We might be on a bit of a wild goose chase now, so bare with me:
1. Are you using the downloaded code from the book's website?
2. Are you using Eclipse?
3. In Eclipse, select Window > Preferences and click leJOS NXJ on the side. In the field NXJ_HOME it has a directory. Is this the directory you copied the snapshot files into?
4. In this NXJ_HOME directory, if you browse to it in the file explorer, do you see "snapshot" folder in there? You should see only the folders bin, lib, project, and source.
5. Did you try restarting Eclipse, saving the file again and uploading again?
User avatar
bbagnall
Site Admin
 
Posts: 392
Joined: Fri Aug 04, 2006 4:03 pm

Re: Intelligence Unleashed - compile error

Postby Lego Geek » Fri Sep 30, 2011 4:28 pm

Hello Brian:

I copied the code from the book. I find that if I type in the code I tend remember more and notice things better. I do have the downloaded code from the publisher website and will try it.

Yes, I am using Eclipse and it has been restarted several times. Eclipse also knows where the leJOS_NXT folder is. I have verified that by changing the directory location in Eclipse creates more error messages. When I change the directory location in Eclipse back again I am only left with the SteerPilot... error message. This also the directory that I copied the snapshoot files and folders to. So no I do not see the snapshoot folder. I do have the regular (with a few extra folders and files) folder structure.

I will just keep on moving through the book - I am now at the chapter about using the Ultrasonic sensor. I will try and be patient as I wait for the lejos_NXJ file.

Thank you for trying to help me out. I will keep trying and working through the book's examples. At least I am further along than when the first book came out. I could not get Eclipse to work at all.

Mike,
Lego Geek
New User
 
Posts: 12
Joined: Sun Sep 18, 2011 1:36 am

Re: Intelligence Unleashed - compile error

Postby Lego Geek » Sat Oct 01, 2011 2:17 am

Hello Brian:

The code from the book works. Also, closing the file I type and re-opening it also now works. Thank you for all your help now and in the future.

Mike,
Lego Geek
New User
 
Posts: 12
Joined: Sun Sep 18, 2011 1:36 am

Re: Intelligence Unleashed - compile error

Postby oki » Mon Feb 06, 2012 1:12 pm

Hello,

I had the same problem and read this thread.
Maybe the following will do - without downloading the newest unreleased leJOS version.

The SteeringPilot class is in the current available official version. The problem is probably that the constructor expects an additional argument -
SteeringPilot(double driveWheelDiameter, RegulatedMotor driveMotor, boolean reverseDriveMotor, RegulatedMotor steeringMotor, double minTurnRadius, int leftTurnTacho, int rightTurnTacho)
which is missing in the sample implementation of Ackerbot.

I will try to use:
SteeringPilot p = new SteeringPilot(SteeringPilot.WHEEL_SIZE_NXT1, Motor.B, false, Motor.C, MINTURN_RADIUS, 48, -42);

It would be nice, if somebody can test this, too.
Thanks, Oki.
oki
New User
 
Posts: 1
Joined: Mon Feb 06, 2012 12:45 pm


Return to NXJ Software

Who is online

Users browsing this forum: No registered users and 1 guest

more stuff