Umfrage Odometrie

Ich habe auch noch einen Link dazu gefunden.
Da ergibt die debug Ausgabe in der Konsole schon alleine Probleme und die läuft bei uns ja auch.

Ich denke das der Mega damit einfach überlastet ist.
 
Dauerdrehen hat nichts mit dem IMU, bei mir zu tun. Der war aus. Das trat auf als ich mit eingeschalteter Odometrie den Bumper ausgelöst habe. Er fuhr Rückwärts und hörte nicht mehr auf zu drehen. Auch bei Original 1.06

Stefan
 
Hi.
I use Google translate to view your post and hope i understand the main.
Sorry maybe it's help Stephan and not you.

I have a DENNA Platform and need a lot of test to make azurit work great with odometry.

For me whit the motor,The main problem is to adjust perfectly maxpwm maxrpm PID in the motor setting because all the PIDcompute work well with the motor of maratronics shop.

when PWM=255 RPM=30 and speed near 0.4m/s but if with your motor when PWM=255 the RPM=50 and speed 0.8m/s all is not good


For that with Pfod you need for example to put the mower in manual and forward and verify in motor setting that the real RPM is the value you have set and note that the PWM is a value near under that the setting you have put.

If the value are not adapt (PWM and RPM) you have problem because in Auto mode the mower use RPM to go forward and PWM when Roll or PeriRev so maybe it have a good speed in forward and very fast in Roll so all the Timeout are false.

For me the DENNA value are MAXRPM=27 MAXPWM=160 P=1 I=0.4 D=0 and the Auto Mode work very well.

I also need to make a lot of change in perimeter tracking code due to this problem and the big distance between the perimeter coil and the Wheel of the DENNA chassis.

For the interrupt i agree that nobody can explain what the twowayodometry can help the mower ????
but i try to make change in the code and use the Odometryleft2 to double the ticks count and make some test.
The arduino mega can work perfectly with 720 ticks and twowayodometryuse or 1440 ticks without the twowayodometryuse.
In fact Be very carrefull with IMU and Mega the loops per second if very low if you use the IMU.

Hope you can understand me.

Thanks.
 
Thanks for the explanation. Maybe this can help Stefan as you said. I don't use Arduino and therfore I use my own code.
But it is good to know, that 720ticks will work with the perimeter code.

In the code I found following sentence:
// NOTE: when choosing a higher perimeter sample rate (38 kHz) and using odometry interrupts,
// the Arduino Mega cannot handle all ADC interrupts anymore

So maybe it is not a good idea to increase the interrupts. The interrupt will be triggered through rising and falling flanks. With 720ticks you mean rinsing flanks or rising and falling flanks?

At the beginning I also used only one channel of the encoder. But now I use both channels. The reason for me is, that I don't need a stop state in my motorcontroller when I change the drive direction. I can drive now with 100% speed and set the speed then to -100%. And the robot goes from full speed forward to full speed backward. This only works, when the ticks count negative because of the PID calculation.

Furthermore you can check if the motors run in the correct direction. If you have a defective motordriver and the wheel turns in the wrong direction, you can stop the movement for exampel.

I don't know if the Ardumower uses a PID for perimeter tracking. But if yes, then the field intensity could also
influence the pid.
 
What kind of board did you use ??
You make your own code (congratulation) ??

i use (38 kHz)rate and the interrupt work perfecly in rising edge for the 4 channels
so total is 720 right + 720 left + 720 right2 + 720 left2 total 2880 ticks per second

Azurit 1.0a6 have 13000 loops per sec in this condition with ODO and without SONAR and IMU.
If i try to use the IMU the loops is only 1300 per seconde so ?????
I test a arduino DUE and the loops per second is 130000 in azurit whithout IMU.


Therefore the IMU work perfectly outside of the mower but i can't make it work Inside the chassis of the mower

It's not Dangerous from 100% to -100% ?,i prefere to use accel and slow before change direction.

Yes the ardumower use PID for tracking but the field intensity couldn't influence the pid because the mower
move between 1 and -1 (Inside and outside) and the target is 0.


if (perimeterInside)
perimeterPID.x = -1;
else
perimeterPID.x = 1;



It's one of the change i made I prefer




if (perimeterInside)
{
perimeterPID.x = float(perimeterMag) / 1500;
if (perimeterPID.x > 1) {
perimeterPID.x = 1;
}
}
else
{
perimeterPID.x = float(perimeterMag) / 1500;
if (perimeterPID.x < -1) {
perimeterPID.x = -1;
}
}

but after i need to reset the perimetertransition etc....

Hope it can help.
By
 
I use Nucleo 411RE as controller and Nucleo 446RE as perimetersensor. I sample with 76.8kHz (8 times oversampling) and use another code for the sender. My codelength are 60 numbers instead of 23 numbers and I use an additional algorithm to determine if I received a valid signal. I am not using IMU and other stuff. Only bumper, perimeter, odometrie, mow current sense and bluetooth. My aim is to build a solid working robot with a chaotic system that can handle my installed geoboarder. And an excellent working bumper with sonar support, because I have ilands in the middle of my lawn, and don't want to damage them or the robot. At the moment the robot runs very well. The bad thing is, it is the end of the season :angry: Now I go further and build the chargingstation.

"It's not Dangerous from 100% to -100% ?,i prefere to use accel and slow before change direction."
This was an example. I drive with 87% speed that's 1.3km/h like the Automower do. The acceleration and slow down I realise with changing the setpoint of the PID. Works all in the background. I don't care about this while changing speed.

The line >>perimeterPID.x = float(perimeterMag) / 1500;
 
Hallo
Auch wir beobachten das die Odemetrie in ihrer jetzigen Form noch einige Probleme verursachen tut.
Daher ist es geplant die twoway Odemetrie in der Azurit nicht mehr länger zu unterstützen. Es ist geplant nur noch jeweils die Oneway Odemetrie zu nutzen.
Hintergrund ist das die Anzahl der Interrupts reduziert werden soll um den Prozessor weiter zu entlasten.
außerdem werden dadurch 2 Pins frei die man in Zukunft anders benutzen kann.
Ein weiterer Vorteil ist das die Änderung weiter rückwärts kompatibel ist zur der bisherigen Platine 0.5 und 1.2.
Es ist geplant in den verbleibenden 2 Odemetrie Pins ein Hardware Frequenzteiler mit zu integrieren. Darüber hat man die Möglichkeit die Anzahl der Impulse erheblich zu reduzieren und auch deutlich die Interrupts zu verringern.
Jürgen hat dazu eine Schaltung entworfen von der geplant ist sie mit auf der 1.3 Platine zu nehmen.
Die Teile die dazu benötigt werden sind wenige. Da die die Schaltung evl. auch auf der 0.5 oder 1.2 Platine eingesetzt werden kann ist hier der Schaltplan dazu.


Omdemetrieteiler.jpg


Gruß
Uwe
Attachment: https://forum.ardumower.de/data/media/kunena/attachments/1259/Omdemetrieteiler.jpg/
 
Zuletzt bearbeitet von einem Moderator:
Danke Uwe für diese kleine Übersicht.

Ergänzend möchte ich noch dazu schreiben, dass natürlich in dieser Schaltung so wie diese ausgeführt ist immer nur eine Leitung vom IC für den Reset selektiert sein darf. Wer das weiter ausbauen möchte muss entsprechend noch Dioden und einen PULL-Down Widerstand einfügen.

Ich fahre das System mit 25rpm in den Motor-Einstellungen die Odo ist auf OneWay eingestellt. Als MPU fahre ich mit einem MEGA2560. Mit diesen Einstellungen arbeitet das System ohne Fehler. Lässt man den Motor schneller als geschrieben laufen kann es durch die erhöhte Interrupt-Frequenz zu Fehlern kommen. Der DUE kann hier grundsätzlich mehr leisten aber auch das hat seine Grenzen.

Gruß

Jürgen
 
Hallo Jürgen, Hallo Uwe,

ich hatte auch schon die Idee mit dem 4017, habe diese jedoch wieder verworfen.
Ursprünglich wollte ich durch 10 teilen. Dann hätten sich möglicherweise durch Vorwärts-/Rückwärts wechsel große Fehler ergeben (z.B. 4017 steht aktuell auf 8, dann Rückwärtsfahrt. Hier kommt dann schon nach 2 Ticks der Ausgang, also 6 zu wenig...)
Ich habe es im Moment mit einem Vor-/ und Rückwärts zählenden Nano im Betrieb. Wenn ich das gründlich getestet habe, dann stelle ich das mal hier rein.

VG
Reiner
 
Hi Roland
I am going to see your video on Youtube and congratulation your mower work very well.
Nucleo is a very goob board on the paper and your work prove.

I agree with 'My aim is to build a solid working robot' and for me compass HMC5883 and Sonar HC-SR04 are not too eavy and stable to work outdoor for many year, but we need to always test new version to be sure.
For example
For the sonar i have an old car part like in the link bellow:
http://www.ebay.fr/itm/Kit-4-Stationnement-Capteur-Inverse-Radar-de-Recul-Voiture-Buzzer-Systeme-Alarme-/361543551502?hash=item542dacca0e:g:HcoAAOSwubRXIDfO.
I try to open it and view if it can work with arduino because it's eavy waterproof sonar but not sure that i have the knowledge to do this


For the perimeter the arduimower V2 sender and receiver works perfectly and with small change in the tracking section of the Azurit code my Denna mower can now follow the wire smootly.
In fact the code do this.
The perimeterMag value change like that : 0 exactly upper the wire and +1700 5cm outside -1700 5cm inside.
PerimeterMag is /1500 to work well with standard azurit PIDcompute .
0 is the target ,PerimeterMag/1500 is the actual position and the result of PidCompute is add to half of one PWM wheel and subst to the other
if PerimeterMag sign change or If PerimeterMag < 300 we are very near the wire so we can reset the perimeterLastTransitionTime.
if perimeterLastTransitionTime is trigger and PerimeterMag>0 then we stop the rightwheel.
if perimeterLastTransitionTime is trigger and PerimeterMag
 
Hi Boilevin,

first off, thanks for the compliment.

Yesterday I ordered following component:

Ultrasonic Ranging Distance Detektor Transducer Sensor Modul Wasserdicht HC-SR04

Looks like it is the same like yours but with an electronic like the HC-SR04 has.
It will arrive probably in one month.

Thanks for the explanation, mayby I can use this later in the project.

I don't use Pfod. I use my own command interface to set and read values.
As tool I use the ArduinoCentral app.

At the moment the bumpers work fine, when I hit an obstacle with not less than 10 degrees.
But if I am just parallel to the object, the mower rotates and hits with his
rear part the obstacle and get stucked. therefore I have no to rethink the bumper concept.
 
Nur um das ganze einmal im Gesamtzusammenhang zu sehen, Interrupts sind per se ja nichts schlimmes, wichtig ist dass die Interrupt-Routine so kurz wie nötig ist und die Anzahl der Interrupts des Gesamtsystems gering ist. Reduzierung der Interrupts ist also gut. Beim Mega belasten wohl die 20 Khz (bzw. 40 Khz) des ADC am meisten, beim Due ist das alles entschärft durch den DMA-Controller (nur noch 1 Interrupt pro Sample-Burst). Mit dem externen PerimeterDuino (http://www.ardumower.de/index.php/de/forum/dein-projekt-your-project/805-perimeterduino#8476) ist es auch entschärft. Die Odometrie mit 4 Khz würde ich so gesehen gar nicht als alleinigen Übeltäter ansehen (vorausgesetzt man verkürzt die Interrupt-Routine auf das nötigste). Was sind schon 4 Khz bei einer 16 Mhz oder gar 84 Mhz CPU.

PS: Genauer betrachtet ist ADC-Sampling (also das Sampeln von Signalen) über DMA immer dem per Interrupt vorzuziehen. Zusätzlich zur hohen Interrupt-Anzahl handelt sich nämlich noch Jitter ein wenn andere Interrupt-Routinen (seriell, SPI, I2C, Timer, ...) noch in Bearbeitung sind beim Auslösen des ADC-Interrupts. Hier wurde der Ansatz (ADC über DMA) ja schon mal umgesetzt: http://www.ardumower.de/index.php/d...-due-zur-auswertung-des-schleifensignals#9280
interrupts.png

Attachment: https://forum.ardumower.de/data/media/kunena/attachments/905/interrupts.png/
 
Zuletzt bearbeitet von einem Moderator:
Hi Roland
Yes very good sensor and waterproof, the electronics seem to be very near my old one.
See picture.

cardetecteur.jpg


In fact i have 2 kits one working perfectly on my car since 4 years and the old other i make a big mismake when try to paint :woohoo: the sensors, i destroy 2 of them,so don't try to paint it.


With mine test result is that you need to put the sensor on the top of the chassis to not detect the floor due to detection angle (50 deg in your).

For your bumper i understand your problem when parallel to obstacle and the solution is to invert the mower direction free wheel in front of the mower (easy to say but to do !!!!)
Attachment: https://forum.ardumower.de/data/media/kunena/attachments/3545/cardetecteur.jpg/
 
Zuletzt bearbeitet von einem Moderator:
@Alex

Ist also die Summe, die das Problem verurascht. Der Mega ist einfach mit ADC Odometrie und IMU dermaßen überlastet das es nicht mehr richtig geht.

Da hilft dann wohl doch nur der Ausweg zum Due oder besser gleich OttO.


Mein Problem war das es überhaupt nicht ging, das habe ich nach einer genauen Kalibrierung der Odometrie Einstellungen in den Griff bekommen.

Stefan
 
@Stefan: Genau - und ist es nicht verrückt welche Möglichkeiten wir demnächst mit dem Otto haben werden weil ja alle Boards (Mega, Due, Otto) dasselbe Pinout verwenden, alle sich über die Arduino IDE programmieren lassen :)
 
Hallo Alex,

ich schau gerade den Code vom adcman.cpp an. Da werden ja alle 16 ADC´s gesampelt. Meinst Du man könnte noch etwas Zeit sparen, wenn man nur die benötigten (ich glaub 7) Eingänge bearbeitet?

VG
Reiner

***EDIT***
Ach, ist ja quatsch. Es werden ja nur die bearbeitet, die mit setCapture gestartet werden. Da war ich wohl zu schnell... B)
 
Hallo Reiner,

welchen Code (Azurit?) und welche Stelle meinst Du genau - es wird eigentlich immer nur ein Kanal nach dem andern gesampelt, jeweils nur die benötigten.

Gruss,
Alexander
 
Hi Boilevin,

my current srf08 sensors are also in the back and look a little bit in the sky round about 20 degrees. Sorry, but I don't understand " (50 deg in your)". What do you mean with your?

For the bumper you can't go forward with the free wheel. Then you rotate and hit the obstacle again with the left side and you won't know it. This happens because the pivot point is 20cm behind the bumper.
In my opinion you have to drive backward and after that you have to slow down the free wheel and to speed up the wheel, which is close to the object, in order to have a smooth curve. And then rotate. If I would have a left and a right bumper this could work. I realised this with my two coils. When both are outside the perimeter, I drive back straight. If one coil is outside, I drive back a small way and then drive a curve. I need this, in order to let my rear wheel not to go over geoboarder.

When we want to discuss this further, I suggest to open a new thread because this thread has another theme.
 
Ich hab mich in das ganze Thema versucht auch mal mehr einzuarbeiten und bin dabei über

digitalWriteFast, digitalReadFast, pinModeFast gestolpert.


Code:
 [URL]http://forum.arduino.cc/index.php/topic,46896.0.html[/URL]


bzw. hier


Code:
 [URL]http://www.hessmer.org/blog/2011/01/30/quadrature-encoder-too-fast-for-arduino-with-solution/[/URL]


Dort werden zwar für jeden Kanal ein Interrupt verwendet, was beim Mega ja nicht geht aber alleine das lesen der Pins soll um den Faktor 10 schneller sein, weil beim Kompilieren das Mapping der Pins umgangen wird und die Register direkt ausgelesen werden.

Eine weitere möglichket die Performace zu steigern ist es Pins nur einzubinden die auch benötigt werden, wie ich es gemacht hatte, es ist durch aus üblich bins mit "#if define()" einzubinden, wie ich in verschiedenen Beispielen gefunden habe.

Der Einwand das dann immer die Platine ausgebaut werden muss kann ich da nicht gelten lassen. Ich muss ohnehine wenn ich Änderungen mache den Arduino neu flaschen. Entweder ein Kabel angeschlossen lassen, hab ich bei mir so oder wie von Alex beschrieben mit Raspberry per Wlan, was absolut Cool ist.

Ich werde mal versuchen ob das mit digitalReadFast bzw digitalReadFast2 erstmal für die Odometrie umsetzen kann und wenn es geht dann auch für die Pins die viel lesen müssen, wie z.B Perimeter.

Auch das einbinden von Pins mit "#if define" werde ich für mich mal probieren. Ich weis ja was ich für Hardware verbaut habe und was ich brauche, ansonsten wird er halt neu geflasht.

Beim Due oder Otto steht ja dann für jeden Pin ein Interrupt zur Verfügung, wodurch man sich dann sogar ganz das Auslesen der Pins sparen kann aber auch hier denke ich das Vorteile hat die Pins mit #if define einzubinden.

Stefan
 
Oben