Raindancer Firmware

Hi Bernard,

I invited you to join the organisation RolamDeveloper on Github. If you join, I can give you then direct access to the repository without pull requests to me.
 
Hi Bernard,

don't join the invitation I send to you. I talked to Alexander. We will put the raindancer repository to the ardumoer github account. you will get also access then to the repository. Then you can direct do changes to the master without pull request.
Before we do vaild changes, wie should first do some tests how it behavies when we both change something?
 
Hi Roland.
Thanks but need test to avoid make big mistake.
Thanks also for the WIKI in English.
I think that for the futur it's good if all the remark in the Code are also in English.
It's easy to translate all a web page with google but in the code or the BHT i need to cut and past each sentence and it's not really easy for me.
By.
 
I sent you a new invite. Looks like there are 2 GitBern on Github? I hope you are both.

I will translate the BHT today.
 
Hi.
Thanks for the invitation.
2 GitBern ??
But i receive only one and accept it now.

I haven't understand all what you say concerning the change into your code.
I think it's better if you check what the other member write into your repository.
Or i need to create a new Branch each time i want to post something.
So at the beginning i test with only few remark in the code to be sure all is OK and easily undo.
I don't want to make a mistake.

By.
 
Into your sender code i have remark that the yellow led is OFF when the sender is ON.
I forget to unplug it and after 10 or 12 hours the LED was ON.
So I suppose you have use a timeout to automaticlly set the sender OFF
But why the LED is the inverse as the Ardumower code ?
 
The timeout is also available in the original code.
In the past (3 days ago) the sender stops sending after the mower was not for 6h in the chargingstation.
I expanded the time already to 12h in the code because my robot runs now round about 5.5h.

I changed the function of the leds.
You have following function:

LEDs from left to right
1. 12V available
2. 5V available
3. Green when the interrupt which produces the signal is running (red LED not available because of wrong pin at Nano). Off when charging.
4. Green when a current flows through the perimeter, red when no current is flowing (perimeter interrupted) or very little current because of high protective resistor. Off when charging.
5. Yellow the robot is charging. Perimeter signal is switched off. LED 2 and 4 off.

When power on, all leds will be tested.

Futhermore, I deleted the potentiometers.
 
Hi Bernard,

I started to do a video series for the BHT. Because I speak englisch very seldom I speak much slower than a native speaker. I hope you will not fall asleep while watching the video :) But to write all this down ist too much. https://youtu.be/EA9oPDyeLJI
In the next video I will go through the mowing behavoiur.

I have translated the BHT now and added to the config.h the configuration of the ardumower chassis, which I got from Joachim.
 
Hi Roland.
Thanks for all your help.
I start to understand the BHT working mode, now need to jump into the code :dry:

Today the sun is back so here some video of your work into my paranello Platform.
The grass is very high.

First the test Bumper with standard contact: https://youtu.be/wISGgLjXTNk
After this test the mower continue with a beautifull spirale https://youtu.be/OO6hSYRLZbw
After the spirale the normal mowing mode https://youtu.be/g_OOPYAZpLQ
And finally the tracking https://youtu.be/Q7HBuXENEgo
So Congratulation Roland.
By.
 
Just finished the translation of the Ardumower Raindancer WIKI to english. What a boring work. :dry:
Maybe I get tomorow the time to finish the videos for the BHT logic.

Here is my second video. Does this help or is it boring? https://www.youtube.com/watch?v=qWf4rGjsDQs
What do you first want to program? In the future I wanted to explain my code anyway. Maybe I can do a video now to support you. I think in the future everyone is scared when they hear I make a video because of the speak slowly :)
 
Hi.
Here is my second video. Does this help or is it boring?
It's help a lot and not boring at all (very good also is the link : Understanding the Behaviour Tree).

because of the speak slowly
When you speak slowly its' easy to understand ,so it's really better for me ,my English is very limited

In the last video you say the BHT is call 10000 times per second :
Here i don't understand how some parts of the code can work so fast, For example for the UI when the DUE send data to serial port,normaly it's take 5 or 10 ms ?

Can you confirm this:
For the code now maybe i understand the Issue with the DHT (It's it use a Class like in my code it can stop the BHT during 250 ms and it's not at all what you want).

So maybe something more adapt to the BHT can be that i work on my Stopping Charging Station.

For Github i have some trouble because the project into Ardumower repository have the same name you already use and it's fail when i try to clone it.
So i need to delete the actual folder and again create a branch and repeat all my change.

By.
 
I start in the tree BHTPeritrack.
If i remember well the bumper is not hit when reach the station in your Platform
But in mine the bumper is use to stop into the station.

Can you confirm my understanding of the BHT:

The Bumper is active so the motor stop (on upper left of the tree)
The bb.chargeSystem.isInChargingStation is set to true because there is voltage on the charging pin so the TconInDockingStation is execute (why the motorstopfast, maybe to be sure stop immediatly)
And wait 2 seconds To be sure Voltage on pin and then change to tree BH_CHARGING.

So maybe without any change in the code my mower stop correctly in the station.

When i have close my chassis i can test it to see.

Maybe the issue can be in the next start to area ???
 
"Here i don't understand how some parts of the code can work so fast, For example for the UI when the DUE send data to serial port,normaly it's take 5 or 10 ms ?"
Ok, maybe hiere I am wrong.
I measured the value with no serial output. I put a flag in, that the serial output is stoped. But afterwards I did some changes in the code and it is not possible to stop all output. I have this to correct later.

"For the code now maybe i understand the Issue with the DHT (It's it use a Class like in my code it can stop the BHT during 250 ms and it's not at all what you want)."
No, therfore I wanted to use a I2C temperatur sensor. But I think when you already have finished the code and the PCB has a connetion for this, we can try if this works.
When the BHT freez, the services freez also. the closed loop services runs each 33ms. There is 250ms a long time. But as long as the motor stoped, this should not be an issue.

"So maybe without any change in the code my mower stop correctly in the station."
I don't think so. Because if the bumper is activated first, then the bumper routin will free it.
I think you need for this to change mseqBumperActive2 and create a new one mseqBumperActive3 and mseqBumperActive4.
See picture in zip attachment. And changed behaviour in peritrack2.

And then TchargeRelayOn must be adapted not that the robot drives forwar and backward.

I am at the moment not really sure how we can handle this different Behaviours in the code. Normally we need a new selPerimeterTracking selector and therefore a complete new branch.. Becaus this behaviour is different from the current. And it is not the end of the story. What happens if the chargingcontacts mssing? This must be programmed later maybe.
It could be, that TchargeRelayOn then also get an new branch.
This means we have a branch of selPerimeterTracking for your station and a branch for my station which we can switch with compiling options?




"Maybe the issue can be in the next start to area ???"
It must be realised in perimeter tracking.
Attachment: https://forum.ardumower.de/data/media/kunena/attachments/2936/PeriTrack.JPG/
 
Zuletzt bearbeitet von einem Moderator:
By the way, you should create a branch an then upload this also to github.
When you are finished and have tested you can merge.
 
Hi Roland
if the bumper is activated first
then the bumper routin will free it

Without any change in the code the docking work, because certainly the charging contact is here before the bumper.
I change only the forward and backward in TchargeRelayon.
I have tested only 10 times but OK in all case.

I want to understand where and how you stop the charging, i view that it's in the onterminate on the BHT CHARGING but how you start this onterminate. ?

And a video of the result: https://youtu.be/pB2LH8BEBTw
For The start to area:
maybe misunderstoud.
What i have thought was:
The mower start from charging station in forward mode.

But maybe i'am wrong.


By.
 
"Without any change in the code the docking work, because certainly the charging contact is here before the bumper."
Thats cool. But maybe try to use hardstop instead of MotorStopFast in mseqDockingStation. Then the mower stops a little faster while hitting the station. My mower must drive a little bit further, if it hits the contacts.
The forward backward was only for my contacs that they better set. But if this works for you - very well.

"I want to understand where and how you stop the charging, i view that it's in the onterminate on the BHT CHARGING but how you start this onterminate. "

At the moment not automatically because I want first test the stability of the software.

You can switch to manual mode.

OR:

Use areaX command, but then the mower drives in the charging station.
Look in UI where the function for this command is.

The userinterface has three or four parts

a) void cmd_help function, where the help text stands.
here you find the line errorHandler.setInfoNoLog(F("area,12 //drive 12m at perimeter and begin mowingrn"));

Now search for area
b) You will find in the bottom of the file
cmdAdd((char *)"area", cmd_cntrGotoAreaX);
Here the commandhandler initialized, that if he gets an command area, it should call the function cmd_cntrGotoAreaX;

No search for cmd_cntrGotoAreaX;
c) And you find the funktion:
void cmd_cntrGotoAreaX(int arg_cnt, char **args)
{
myBehaviour.reset();
long distance = cmdStr2Num(args[1], 10);
myBlackboard.setBehaviour(BH_GOTOAREA);
_controlManuel = false;
//must set after set behaviour, because behaviour resets the BB
myBlackboard.areaTargetDistanceInMeter = distance;
errorHandler.setInfoNoLog(F("Drive to area: %lrn"), distance);
}


d) Only when a showing command is used
void cmd_hideShowing(int arg_cnt, char **args)
this function wil be called when the command h is entered. This disables all showingflags for services and blackboard.


You can start to mow while driving back 1m and rotate 90 degrees.

Or you can drive back rotate 80 degree and driver a curve around the chargingstation. (This should be realised as extra behaviour in BHRoot)
When the perimeter is found, change the behavioiur to goto areaX.
When you are finished this kind of solution, then you understand the programming of the BHT :)
But in this case, first draw the tree. If you don't want to buy the software, use UMLET. In the past I wanted to transfere the BHT to UMLET that everyone can change it. But no time at the moment.
UMLET is very easy to use.
 
I think leaving the chargingstation bckwards, rotate and start mowing should also be realised as extra behaviour in BHRoot.
Later you can expand it to drive a curve an start areaX.
 
But maybe try to use hardstop instead of MotorStopFast in mseqDockingStation

Yes but it's better to use Sonar like in my firmware.
I in the past you post about sonar , Why have you stop to dev this type of sensor ?

For the start i am agree with you ,But actually your areaX start from where ?(not the station?).
 
Oben