How to make auriga turn 90 degrees? I have code


#1

Hi guys,

I’m having trouble to make my robot turn ninety degrees using the move function.

Can someone help me?

Here is my code to turn right.

void rightTask() {
  if (taskBegin) {
    encoderLeft.move(ninetyDegree, 200); // ninetydegree = 210 pulses
    encoderRight.move(ninetyDegree, 200);
    taskBegin = false;
  }  
}

Full code here

Thank you


#2

Hmm… I’ll think about it :confused:


#3

I think there’s something wrong with method MeEncoderOnBoard::move in the official library, because one wheel is spinning slowly and the other one fast.


#4

It has been frequently reported here that Ranger wheels often stick and prevent the model from moving or the robot not driving correctly - a fault often dismissed as being caused by low battery power. This happen to me, with just one of the free-turning wheels and it was NOT battery power related. After several tests I thought that the problem might be something to do with the recessing of the central hub of the wheels to allow the bushes to seat inside them correctly.

I worked out that the holes through the two bushes on either side of the wheel might not quite be in the same alignment - but how was I to ream them out, as if they were one aligned unit?

My solution to this was to mount a wheel (with two bushes) on to the threaded part of a short spindle and loosely secure it with a Nylock locking nut. I then put the smooth part of the spindle into the chuck of an electric drill and turned it on (for about a minute) whilst I firmly held the on to the wheel!

This meant that the threaded part of the shaft was revolving inside the two bushes (which, remember, were assembled in true alignment with each other) - so, would the thread act as a simple abrasive device to free-up the wheel and allow it to spin freely?- YES it did! - and with a bit of wiggling of the wheel (to improve the abrading effect of the threaded shaft spinning inside the bushes) it did seem to work very well. Success, and everything now worked OK!

Check for the motor shaft rubbing where it passes through the chassis holes too & slacken & re-adjust the motor’s securing two screws to fix this if necessary.


#5

Since I have 27 robots, this might be an interesting solution.

Since English is not my primary language, I just want to be sure.

So if I understood correctly, I secure the wheel on a spindle with a nut, but let it loose enough so it can spin with a bit of force. Insert the spindle on a drill and spin for about a minute while holding the wheel to smooth the inside surface.

Is that correct?


#6

Hi el_pablo

That is correct - but also check for the motor shaft rubbing where it passes through the chassis holes as advised & slacken & re-adjust each motor’s two securing screws.

I also though that it might be the copper / brass bushes themselves that were culprits here! With two bushes inserted into a wheel I rotated it on a 4mm dia. spindle, and it seemed to rotate freely. I then pushed this wheel assembly on to a short Makeblock threaded shaft (4mm dia. x 39 mm) and under compression from a Nylock nut (over a 2mm plastic washer) it seized-up and would no longer turn freely. I then used an electric drill and put each copper bush into the drill-chuck and with it spinning, used a small round ‘needle’ file to enlarge the bore of each bush very slightly - a little primitive, but it worked!


#7

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.