robot with load

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

Moderators: 99jonathan, roger, imaqine

robot with load

Postby airglide » Wed Jun 06, 2012 4:00 pm

Hello everyone,

I'm currently working on a robot which is driving around. The problem is, that the robot is quiet heavy. There is an inaccuracy of 10cm when he drives 300cm (speed 360 °/s). I've figured out that this inaccuracy is because of the weight. Thus the inaccuracy is constant if the robot has the same weight. So I thought I could fix it. Therefore I thought there should be a possibility, if the robot sees that he hasn't got enough power, he should drive a that bit further, he couldend compensate with the power...
or has someone a better solution for my problem?

I didn't want to specify my class only for my robot so I thought there should be a smarter way to do it then calculating the weight and multipling with a factor, so there's no accuracy

thank you ;)

airglide
airglide
New User
 
Posts: 19
Joined: Sun Mar 04, 2012 2:09 pm

Re: robot with load

Postby TechnoX » Wed Jun 06, 2012 5:52 pm

With acceleration and deceleration you should get higher precision.

Have you tried the DifferentialPilot (in lejos.robotics.navigation)?
TechnoX
Novice
 
Posts: 52
Joined: Tue May 03, 2011 5:57 pm
Location: Sweden

Re: robot with load

Postby airglide » Wed Jun 06, 2012 9:13 pm

not yet, I've wrote an own class for driving.. which uses RegulatedMotor methods forward(), I couldn't find a difference in the implementation of the DifferentialPilot
airglide
New User
 
Posts: 19
Joined: Sun Mar 04, 2012 2:09 pm

Re: robot with load

Postby skoehler » Wed Jun 06, 2012 10:54 pm

airglide wrote:not yet, I've wrote an own class for driving.. which uses RegulatedMotor methods forward(), I couldn't find a difference in the implementation of the DifferentialPilot

Are you using setAcceleration already?
http://lejos.sourceforge.net/nxt/nxj/ap ... n%28int%29

Default behaviour of forward() is to raise the speed from 0 to X instantly. That's rubbish, since the wheels will slip. Enabling smooth acceleration avoids that and is enabled with setAcceleration. DifferentialPilot also allows you to set acceleration. Try something like setAcceleration(10);
skoehler
leJOS Team Member
 
Posts: 1405
Joined: Thu Oct 30, 2008 4:54 pm

Re: robot with load

Postby airglide » Thu Jun 07, 2012 1:24 pm

Hello,
well I've tested it out,
Code: Select all
public static void main(String[] args) {
   
      // wheel = 20.7 cm
   Motor.A.setAcceleration(20);
   Motor.B.setAcceleration(20);
   
   Motor.A.forward();
   Motor.B.forward();
   
   Delay.msDelay(10000);
   
   Motor.A.setAcceleration(0);
   Motor.B.setAcceleration(0);
   
   Motor.A.setSpeed(360);
   Motor.B.setSpeed(360);
   
   Delay.msDelay(15000);
   
   Motor.A.stop(true);
   Motor.B.stop(true);
   }

The robot should drive 229cm but he only drives like 220cm...
I'thought the problem is that the Motors haven't enough power, but if I do the same thing with 100 °/s instead of 360 there's the same fault..

thank you
airglide
airglide
New User
 
Posts: 19
Joined: Sun Mar 04, 2012 2:09 pm

Re: robot with load

Postby skoehler » Thu Jun 07, 2012 1:37 pm

Are you using soft wheels? Because if the wheel are "compressed" due to the load, the robot will drive less than without the load.
skoehler
leJOS Team Member
 
Posts: 1405
Joined: Thu Oct 30, 2008 4:54 pm

Re: robot with load

Postby airglide » Thu Jun 07, 2012 2:02 pm

you're right, that means they have another radius ;)
thank you I'm going to try it out

airglide
airglide
New User
 
Posts: 19
Joined: Sun Mar 04, 2012 2:09 pm

Re: robot with load

Postby airglide » Thu Jun 07, 2012 4:29 pm

ey skoehler,

I've put napkins in the wheels so they aren't soft anymore ;) the inaccuracy is now about 2cm if I adjust the program it should be fine ;) I didn't thought that the compression of the wheels have that a big impact ;)

thank you very much :D

airglide ;)
airglide
New User
 
Posts: 19
Joined: Sun Mar 04, 2012 2:09 pm


Return to NXJ Software

Who is online

Users browsing this forum: No registered users and 2 guests

more stuff