Sanftes Abbremsen + 90 Grad Winkel

dennis

Member
Hallo zusammen.

Habe heute die Version 1.07 und 1.08-dev ausprobiert. Bei beiden fiel mir auf, dass der Mower nun nicht mehr hart auf der Schleife stoppt, sondern sanft ausrollt. Das gefällt mir grundsätzlich sehr gut und sieht insgesamt wesentlich eleganter aus, allerdings schießt er mir damit über das Ziel hinaus (ca. 20cm) und hat sich damit schon junge Heckenpflanzen vorgenommen. Die Variable perimeterTriggerTimeout steht unverändert bei 0, was für mich keine zusätzliche Verzögerung bedeutet. Wie kann mit dem Bremsen früher beginnen oder schneller abbremsen?

Dazu noch eine kleine Frage zu 90 Grad, bzw. 270 Grad Winkeln. Bei beiden fährt der Mower sehr weit gerade aus und muss dann erstmal wieder stark rudern, bis er wieder auf der Spur ist. Habe ca. 20 solcher Winkel, das scheint nicht optimal zu sein. Wenn ich statt der 90 Grad-Winkel nun 2x 45 Grad nehme, wie weit sollten beide Winkel entfernt sein?
 
Hi Dennis.
Sorry for English reply.

First question.
In mower.cpp this value
motorZeroSettleTime = 3000 ; // how long (ms) to wait for motors to settle at zero speed.
can be reduce but be sure not Under 1500 ms and verify that the motor are completly stop before reverse direction.
In robot.cpp
in case STATE_PERI_OUT_REV:
if (millis() >= stateEndTime) setNextState(STATE_PERI_OUT_ROLL, rollDir);
// if (perimeterInside || (millis() >= stateEndTime)) setNextState (STATE_PERI_OUT_ROLL, rollDir);
you can use the first line instead of the second so the mower always reverse before roll.


Second question.
For 90 deg angle in Pfod the Transition timeout and the tracking speed are to adjust and normaly no problem to manage this kind of angle.
Put the tracking speed not to high and during test exit from setting in pfod.
The Transition timeout is duration before stoping right or left Wheel after lost the wire
If too low the mower don't go smoothly in straight line, if too high it lost the wire and non stop rotate in 90 deg angle.

see http://www.ardumower.de/index.php/d...reduce-vibration-when-tracking?start=80#12564
and if transition too high
http://www.ardumower.de/index.php/de/forum/perimeter-receiver-and-sender/1280-how-i-reduce-vibration-when-tracking?start=100#12575
 
Hi Bernard,

English is no problem ;)

1. Question: I noticed, that the gently slowdown is not only perimeter trigger related, it is also related to ultrasonic triggers:
https://youtu.be/hhg5xff-O6w
In 1.06a it stopped immediately. I think, there is a reducing PWM function like this (pseudo code):

Code:
stop() {
  while (speed>0) {
    pwm = pwm - 10
    sleep(1)
  }
}


Now I simply want to increase the slow down rate.

2. Question: I use the ArduRemote App. Under Settings/Perimeter I have the following parameter only:
[ul]
[li]Timed-out if below smag[/li]
[li]Timeout (s) if not inside[/li]
[li]Trigger Timeout[/li]
[li]Perimeter out roll time max[/li]
[li]Perimeter out roll time min[/li]
[li]Perimeter out reverse time[/li]
[li]Perimeter tracking roll time[/li]
[li]Perimeter tracking reverse time[/li]
[li]Transition timeout = 0,00[/li]
[li]Track error timeout[/li]
[li]Track_P[/li]
[li]Track_I[/li]
[li]Track_D[/li]
[/ul]

How can I decrease the tracking speed? Transition speed is already very low by default. What do you use?
 
Hi dennis.
The speed tracking is set in mower.cpp into perimeter section.

It's here:

Code:
trackingPerimeterTransitionTimeOut              = 2500;   // never<500 ms
  trackingErrorTimeOut                            = 10000;  // 0=disable
  trackingBlockInnerWheelWhilePerimeterStruggling = 1;
  MaxSpeedperiPwm = 200; // speed max in PWM while perimeter tracking


The MaxspeedperiPWM try with 160 but need to download again the code into mega.
And the trackingPerimeterTransitionTimeOut try with 1500 but never 0 it's impossible to work correctly with 0 maybe you can change it into arduremote.

For the breaking it's more complex than your sample.
The code for this is in motor.h
void Robot::motorControl(){
and
void Robot::setMotorPWM(int pwmLeft, int pwmRight, boolean useAccel){

Did you use Odometry or not ?
PID of motor and Accel value are use but i can view in your video that you can reduce the motorZeroSettleTime again in mower.cpp.
What the value ? you can find it in console by pressing d and read setting.
Try with 1500ms.
By.
 
My odometry is deactivated. The reason: if it's activated, the mower goes 1 meter and stops with odometry error, both left and right.

If I try to do the odometry test via USB cable, the Mega doesn't respond any more or restarts.

I soldered the pull-up resistors and connected it as mentioned in the "workshop" paper.
 
Hi Dennis.
Did you try
motorZeroSettleTime=1500
and
trackingPerimeterTransitionTimeOut =1500

For the Odometry it's Strange that the Mega restart.
Normaly on a table or the Wheel not on the floor if you manualy and very slowly turn a Wheel for 5 or 10 degree you can view the ODO count change in the console.

What is the software version you use ?
 
Hi Bernard,

I currently use 1.07a (on Mega, 1.2). I am in the normal console mode and move the wheels, I can see this:


Code:
t    78 L5776 m0 ERR  rpm    0    0 set    0    0 sen    0    0    0 bum    0    0 dro    0    0 son   0 yaw   0 pit   0 rol   0 bat  0.0 chg  0.0  0.0 imu  0 adc 67 Ardumower
t    79 L3714 m0 ERR  rpm    0    0 set    0    0 sen    0    0    0 bum    0    0 dro    0    0 son   0 yaw   0 pit   0 rol   0 bat  0.0 chg  0.0  0.0 imu  0 adc 97 Ardumower
t    80 L5776 m0 ERR  rpm    2    0 set    0    0 sen    0    0    0 bum    0    0 dro    0    0 son   0 yaw   0 pit   0 rol   0 bat  0.0 chg  0.0  0.0 imu  0 adc 97 Ardumower
t    81 L5765 m0 ERR  rpm    0    0 set    0    0 sen    0    0    0 bum    0    0 dro    0    0 son   0 yaw   0 pit   0 rol   0 bat  0.0 chg  0.0  0.0 imu  0 adc 97 Ardumower
t    82 L5768 m0 ERR  rpm    0    0 set    0    0 sen    0    0    0 bum    0    0 dro    0    0 son   0 yaw   0 pit   0 rol   0 bat  0.0 chg  0.0  0.0 imu  0 adc 97 Ardumower
ERR_MOTOR_LEFT
ERR_MOTOR_RIGHT
ERR_MOW_SENSE
ERR_BATTERY
t    83 L5810 m0 ERR  rpm    0    0 set    0    0 sen    0    0    0 bum    0    0 dro    0    0 son   0 yaw   0 pit   0 rol   0 bat  0.0 chg  0.0  0.0 imu  0 adc 64 Ardumower
t    84 L3508 m0 ERR  rpm    0    0 set    0    0 sen    0    0    0 bum    0    0 dro    0    0 son   0 yaw   0 pit   0 rol   0 bat  0.0 chg  0.0  0.0 imu  0 adc 97 Ardumower
t    85 L5721 m0 ERR  rpm    0    4 set    0    0 sen    0    0    0 bum    0    0 dro    0    0 son   0 yaw   0 pit   0 rol   0 bat  0.0 chg  0.0  0.0 imu  0 adc 97 Ardumower
t    86 L5525 m0 ERR  rpm    0    3 set    0    0 sen    0    0    0 bum    0    0 dro    0    0 son   0 yaw   0 pit   0 rol   0 bat  0.0 chg  0.0  0.0 imu  0 adc 97 Ardumower
t    87 L5714 m0 ERR  rpm    0    3 set    0    0 sen    0    0    0 bum    0    0 dro    0    0 son   0 yaw   0 pit   0 rol   0 bat  0.0 chg  0.0  0.0 imu  0 adc 97 Ardumower


The odometry notices the movements. But with Odometry on a table it behaves like this:
https://youtu.be/L3-iuVgwUDM
I my version, I do not have MaxSpeedperiPwm. I think, I have to use the 1.08-dev, mh?

I changed them both:
motorZeroSettleTime=1500
trackingPerimeterTransitionTimeOut =1500

If he stops, he moves immediately into an other direction. Very smooth movements, looks like dancing :-D :)

But he still drives to far over the perimeter loop:
https://youtu.be/0ojRH1eloOk
The white tag is direct on the loop. One can see, that it drives much to far.
 
Hi
In Setting Motor The Speed max in pwm please reduce the value .
If you want to iuse the Odometry the Speed max in rpm need to have a correct value and when i see your first video all this is wrong

To adjust you can try to put the mower in manual mode first without ODO and adjust the Speed max in PWM (In setting motor) try 160 for example (In video 2 i can see that your mower is too fast).

After that you can set the ODO to yes and now the speed max in rpm (In 1.08 it's in Odometry) is compute and you need to adjust it so that you can read the real value (In setting Motor Speed l,r) need to be inferior to the Speed max in PWM (If the mower snake change the PID value with D=0 P=1 and I=0.4 but here you need to find the better value).

Main to understand is that when you set the ODO to Yes the software always compute the RPM of the Wheel (using the odometry) and permanently adjust the PWM to have the Wheel perfectly turning at the RPM set.
So in manual Forward if you set max RPM=24 max PWM=160 you need to read the real PWM value always changing and inferior as the max PWM (150,152 for example).
If the RPM,PWM and PID value are not corresponding we have the result of your first video.

In my mower(not ardumower Platform) the value Motor or Odometry setting are:
Speed max PWM=180
Speed max RPM =24
RPM_P=1
RPM_I=0.4
RPM_D=0
Ticks per one full revolution=530 but for you 1060 because i use the PCB1.3 and it's div/2
Ticks per CM=12.8



Hope it can help.
 
Hi Bernard.

Thanks for your reply. But I think, all these settings should be really perfect, because I fully use the standard equipment - no experiments. I even try to avoid to make changes to the code and change values only by ArduRemote App. Therefore I'm wondering about the high speed of the mower, didn't changed something. I only installed 1.0a8-dev accidentally two weeks ago.

I guess, I will do a complete reset of the software: vanilla 1.0a7 + factory reset + reboot. I hope, that procedure deletes all former preferences. In theory, the odometry problem and the high speed should be gone, right?
 
Hi dennis.
OK, maybe it's possible that when you put the 1.08 you make a factory reset and use the new setting of 1.08 into 1.07.

All the setting i give you are into arduremote without change in the code (exept the motorzerosettletime).

I have thought you have already do a factory reset and it's the first thing to do if you have a full ardumower config.

If problem persist you can put a screen copy of the console read setting but verify that if you don't change anythink all what you find in arduremote is what you read in mower.cpp after the factory reset.

By.
 
Bernard schrieb:
I have thought you have already do a factory reset and it's the first thing to do if you have a full ardumower config.

Please believe me, it is the first thing I do after an upgrade or downgrade - normally.

Today I installed a brand new and untouched 1.0a7, did a factory reset and restarted. It worked fine with activated odometry and even the odometry test via console worked smoothly on my balcony. At the weekend I will test it in the garden.

Thanks a lot so far, Bernard! Your questions and explanations were perfect.
 
Zuletzt bearbeitet von einem Moderator:
Hi Bernard,

he mows perfect now. He stops immediately, if he gets triggered (by Ultrasonic or Perimeter Crossing). I liked the gentle braking, but the right functionality is more important. Thanks a lot again.
 
dennis schrieb:
Hi Bernard,

he mows perfect now. He stops immediately, if he gets triggered (by Ultrasonic or Perimeter Crossing). I liked the gentle braking, but the right functionality is more important. Thanks a lot again.

Hallo Dennis,

habe es mit Version 1.06 und 1.07 versucht, frisch drauf, factory reset und trotzdem stoppt er nicht direkt am Begrenzungsdraht. Auch die hier oben genannten Einstellungen helfen mir nicht, wenn ich mit Acceleration rumspiele stoppt er beim rückwärts fahren direkt, aber beim über die Schleife fahren wird er nur allmählich langsamer. Kannst du mir helfen?

Grüße
 
Zuletzt bearbeitet von einem Moderator:
Hi Dodo,

es scheint manchmal tatsächlich so zu sein, dass sich beim Bespielen im NVRAM immernoch irgendwelche Werte befinden. Versuche tatsächlich nochmal Factory Reset, ggf. Software 1.07 nochmal runterziehen, falls du was verändert hast, aber nicht mehr weißt wo, im Code den richtigen Arduino und das richtige Board (1.2/1.3) auswählen, Software rauf, nochmal Factory Reset und dann deine Einstellungen vornehmen.

Ich habe nun zusätzlich noch 2 bessere Ultraschallsensoren aus China kommen lassen, so dass er sogar vor der Begrenzungsschleife langsamer wird (vorrausgesetzt da gibt es ein Hindernis, wie ein Zaun oder eine Hecke) und dann sanft auf der Schleife stoppt. An der Software kann es eigentlich nicht liegen.

Lediglich mit den 270° Winkel bin ich noch nicht vollends zufrieden, da fährt er mir regelmäßig weit ins Beet rein :-/

Ardumower-Perimeter.PNG

Attachment: https://forum.ardumower.de/data/media/kunena/attachments/3922/Ardumower-Perimeter.PNG/
 
Zuletzt bearbeitet von einem Moderator:
Genau das habe ich gemacht, Reset, frische Software direkt aufgespielt und getestet mit erneutem Reset. Gleiche Problematik. Ich nutze allerdings keine Odometrie, könnte es daran liegen?

EDIT: Ich suche schon verzweifelt in der Software nach der passenden Stelle, um dem Robi dort zu sagen er soll die MotorPWM einfach auf 0 setzen. Rückwärts fahren und den Rest kann er ja gern wieder mit Beschleunigung machen, nur das stoppen soll er sofort machen und nicht erst gemächlich langsamer werden.

https://youtu.be/TZoMJJwkDLY
 
Achso... ja, ich meine, das war neben dem Factory Reset auch noch ein wichtiger Punkt, der das zum Fliegen gebracht hat, damit wird ja auch die eigentliche Geschwindigkeit berechnet und nicht nur das, was per PWM ausgegeben wird. Möchte die Odometrie seit dem auch nicht mehr missen. Mein Rasen sah aus wie von Aliens befallen, da der Mower einen Linksdrall mit einem 15 Meter Radius hatte. Nun ist's beinahe perfekt. Was sind deine Gründe bislang gegen die Odo: Andere Motoren im Einsatz, passende Stecker oder die Pull-up-Widerstände?

Zur Software-Anpassung: genau danach hatte ich auch gefragt, aber Bernard sagte mir, dass das etwas komplizierter sei, als eine einfache Geschwindigkeitsreduzierung: Code Abbremsen .
 
Es darf ruhig kompliziert werden, wenn man mir sagt an welcher Stelle ich graben muss :D

Odometrie hätte ich gern, aber die Motoren sind nun Mal da und sie sind mMn auch gut. Da eine Nachrüst Lösung zu finden wäre Klasse.
 
Nettes Selbstbau-Chassis, sieht auch recht lightweight aus. Gibt's da mehr Infos zu? :cheer:
Erkenne nicht genau, wo der Sender ist. Oder ist das die rote LED links in Fahrtrichtung? Die Empfehlung ist, den Sender ja so weit wie möglich nach vorne zu packen. Aber auch das würde aktuelle nicht dazu führen, dass er auf der Stelle stehen bleibt ^^

Zwei Ansätze:
1. Odometrie kannst du grundsätzlich mit Lochscheibensensoren oder andere Zählsensoren nachrüsten: Odometrie Sensor . Ob das bei deinen Motoren auf die Welle passt, müsstest du schauen.
2. Die PWM-Geschichten bei der Standardsoftware sind natürlich auch auf die Standard-Motoren und die -Reifengröße konfiguriert. Du kannst irgendwo deine Radgröße konfigurieren... ich denke auf der Heimfahrt mal drüber nach, in welchem Thread das mal behandelt wurde. Oder du suchst schon mal... grade die "Bastler", die nicht das Standard-Equipment nehmen, sind da Experten drin.
 
Das Chassis ist Selbstbau und noch ein Prototyp. Einfach eine Kunststoffplatte. Mehr ist das nicht. Ist aber alles noch nicht spruchreif. Der Sender liegt rechts im Raum, die Empfängerspule ist ganz vorne an dem Silbernen Bumper, der aber auch nur ein Provisorium zum Test ist. Also weiter nach vorne geht es nicht.

Bin gespannt auf weitere Ideen!
 
Oben