Tree Planning

Pure pursuit is tricky. With GPS on the hood, Stanley has been better. A lot of bugs worked out of pure pursuit in the most recent versions of AOG. Admin almost discontinued Stanley. I don’t think it gets many updates these days. I’ll look into the pure pursuit/hood/start/stop problem next week. It is my guess, it is a heading, look ahead problem.

No, only field test here is testing at best. Mark, move, mark, move, measure. I do like to see your pictures of it actually working. Thank you for keeping us posted. Helps to know what needs to be fixed or added.

i tried purepursuit with the antenna above the cab and it was fine, but it’s not accurate enough, when i plant trees i need very low speed and i have a very long drill behind the tractor.

I try to upload some videos if you are interested.

Very interested. Thanks.

Can you see it?

I was thinking … could it be useful to put trees on a curved line as well?
Aog Tree can already do this along the border.
perhaps it would be enough to copy one of the curved lines of the border and multiply it within the field? or maybe there are simpler ways of doing it?

3 Likes

That is great. Thanks. I will be thinking on the curve while I work on the bell and pure pursuit.

1 Like

Great!

Found a problem with this. As it passes a tree the y value goes to zero every time regardless of how far the x is away from the tree. Even at strange angles, y will go to zero then climb away from zero at every tree. We have to check the x as well, or keep the circle distance. Thoughts??

Also, planting trees on the curve. In the poor sketch below, are you thinking the horizontal lines should be straight and the tree spacing be the same like on the top of the picture, or should the lines of trees curve at 90 degrees like the bottom of the picture?

1 Like

I’m not sure I understand you, the distance x should not be check for the sound because if I have the autosteer with an xte of 5cm I can not do anything to correct the distance x.
the y-value as it is works fine when trees pass on the screen…just the sound starts at the wrong time.

trees in curve mode should be spaced like top of the pictures. otherwise the lines could cross each other.

Ok:

Not ok:

1 Like

Best to keep some x value because it will pick up trees on the next row. I will add setting for x and y. So, if y and if x sound bell.

1 Like

I think it’s the best

Where is the latest build of this?

Awesome, thank you :slight_smile:

Sorry, does this version have the chime sound as well?

Yes, but not separated into x and y distances. When your within the setting it chimes. Found if going too fast, and the tree points are close together, you can be over the next tree before the last sound has completely processed.

1 Like

I need to go to school if someone wants to be the teacher??

I built my machine PCB with 3 relays assigned to D2, D3, and D4 - because as I read the machine USB V5.0 these are the first 3 sections. I must be wrong?

//change the pin number as required (pinD#, bitRead....)               
    digitalWrite (2, bitRead(relayLo,0)); //section 1 thru 8
    digitalWrite (3, bitRead(relayLo,1));
    digitalWrite (4, bitRead(relayLo,2));
    digitalWrite (5, bitRead(relayLo,3));
    digitalWrite (6, bitRead(relayLo,4));
    digitalWrite (7, bitRead(relayLo,5));
    digitalWrite (8, bitRead(relayLo,6));
    digitalWrite (9, bitRead(relayLo,7));

I am using V5.2b and the 5.0 Machine ino.

If " digitalWrite (2, bitRead(relayLo,0));" doesn’t turn pin D2 on and off,how would I alter it to do that?

Which board are you using? With some boards the D#s are different than the GPIO #’s

Not sure if I know what you are asking but,

For example: Using a relayLo = 11100000, that means section 0(1) is on, 1(2) is on, 2(3) is on and the rest are off.

So question is asked is 0(1) on or off, true or false, (bitRead(relayLo,0)
Then set pin 2 high or low based on that question. In this example, it would set whatever pin is assigned to the “2” to High. Need to check further back up the code and see if they mapped 2 to a different pin.

Make sure you are actually getting the machine byte. You can also replace bitRead(relayLow,) with High to make check if your relay is correct.

I hate to admit it but, I had forgotten to connect my Machine to a port in AgIO!!

As long as I have you, what are you using for the trigger when the planting spot is hit? Are you using Brian’s Tree variable?

1 Like

Originally turned on section 2. Also used the tree variable. Not sure how I left it. I think maybe both.

@KentStuff ,

Here’s what I’m up to. I’ve got code written to add to the arduino V 5.0. I’ll have switches that I will use to select different operations. Such as select diff speed for diff operations, turn sprayer on and off, etc. I’m controlling the speed with a hacked windshield wiper motor with a pot attached to it for feedback. I’ll control the brake with another motor.

I can turn my relays on and off by selecting the section in AOG, but when I pass over a tree location the system shows to plant the tree (I’m assuming folks are doing this part manually - I want to automate) but I don’t get the relay tripping.

I’ve tried to catch the trigger with an If statement in the ino using both the center section Pin 3 and the tree variable to turn the relay on with no luck.

Which makes me wonder? Are you sending the trigger out to the machine?

Edit - I’m using the simulator right now.