Icommand / Tachonavigator woes

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

Moderators: 99jonathan, roger, imaqine

Icommand / Tachonavigator woes

Postby chewie » Tue Mar 04, 2008 11:53 pm

Hello all, I have a peculiar problem with Icommand, though it is most likely the Tachnavigator's fault. I have a program that is constantly telling the robot what it needs to do, and the robot is behaving in a very stuttering behavior. For instance, anytime I set the robot's speed while it is moving forward, it stops and then starts again very rapidly. This also happens anytime I call forward() twice in a row, or turn(x) with a different value of x. I looked through Tachonavigator, Pilot, and finally Motor to see if there is a stop() called somewhere that would cause the robot to do this. I did not find any, and I'm wondering if this is hardware problem that I will have to live with. Thanks for your help :-D.
chewie
New User
 
Posts: 5
Joined: Tue Oct 30, 2007 3:01 pm

Postby bbagnall » Thu Mar 06, 2008 8:38 pm

Hi Chewie,

Are you also using leJOS NXJ on the NXT brick, or is it the default LEGO firmware? There was a bug in the last version of leJOS that made the motor speeds waver so that might be it. This is corrected for the next version.

If you are using standard firmware with a previous version of iCommand, try upgrading to iCommand 0.7.
User avatar
bbagnall
Site Admin
 
Posts: 392
Joined: Fri Aug 04, 2006 4:03 pm

Postby chewie » Fri Mar 07, 2008 8:05 pm

I have the latest version of Lejos on the NXT and icommand v0.7. This problem doesn't really seem to be a matter of variable motor speed, but rather that the robot stops very quickly and for a very short duration after each command before proceeding again.

Here's an example. I have a robot being controlled by keypad presses (I think there is code for this in the sample programs). I hold down the up arrow (forward), and I press "+" which makes icommand send the setSpeed() procedure to the robot. The robot stops for a very short time (a 100 - 500 milliseconds) and continues moving forward.

Another example would be that if I hold down the up arrow and left / right, the robot will use the tachnavigator's turn() procedure to turn the robot. So, if I hold the up arrow, moving the robot forward, and then also press down the right arrow after the robot has started moving forward, the robot will stop very shortly and then proceed on turning. Each action is very separate. There is no smoothness between them.
chewie
New User
 
Posts: 5
Joined: Tue Oct 30, 2007 3:01 pm

Postby roger » Sat Mar 08, 2008 8:24 am

Hi Brian and Chewie,
The problem is in pilot.setSpeed(), which is called by forward() , rotate() etc. ;setSpeed() calls smoothAcceleration(true) and motor.setSpeed(), which in turn calls motor.reset(). The motor regulator then controls the speed as if it was increasing from zero, which means that it slows the motor to a stop if the intial speed is large.
A possible fix is to add a method to disable smooth acceleration in pilot. There will be a fix of some kind in the next release.
Meanwhile, you could call pilot.regulateSpeed(false), but then the motors may not run at the same speed.
Roger
roger
Moderator
 
Posts: 360
Joined: Fri Jun 01, 2007 4:31 am
Location: Berkeley, CA


Return to NXJ Software

Who is online

Users browsing this forum: No registered users and 2 guests

cron
more stuff