20230216 ROS Lawn Tractor Meeting

20230216 ROS Lawn Tractor Meeting

This video:

Chat:
Path to Al’s stuff.
https://github.com/jones2126/ros1_lawn_tractor_ws/tree/master/src/ackermann_vehicle/nodes/missions
Jeff: Path to saved workspaces on Google drive.
https://drive.google.com/drive/folders/1t2P2sfiranPe10fmUBUnnVvKNgrfybAV?usp=sharing
Al: Some reference to path name.
python script sub/pub

rospy.Subscriber(‘got_path’, Float64, path_callback)
path_pub = rospy.Publisher(‘/drive_path’, Path, queue_size=10)

https://drive.google.com/file/d/1oHgs4eQg1ZwQ_JoquGgf-rm78N-NoccJ/view?usp=share_link
Jeff: Link to YouTube video about using path_generator.py.
03052021 Lawn Tractor Meeting
Al: Instructions on using the path generator from above.
https://docs.google.com/document/d/17bPVy9IUBp3xqllMGpGTsoqm8cyIUm37bdLj_oB9NDE/edit
Jeff: Link to the F1tenth Pure Pursuit

Index:
00:00 Al: Talks about his progress with path following. Shows a video.
Explains some code.
09:50 Jeff: Talks about path planning and suggests that MoveBaseFlex/TEBplanner may never give adequate results.
Mentions Pure Pursuit.
11:20 Jeff: Brings up Matt and Juan’s Pure Pursuit experiments.
12:00 Jeff: Goes searching for Juan’s original source code.
Found the Pure Pursuit package.
We look at:
Pure Pursuit
gps_heading.py
path_generator.py
path_publisher.py
22:40 Jeff: Incorrectly opens path_generator.py when he should have opened path_publisher.py.
But no one noticed…
24:25 Jeff: Tracks down the YouTube video where we were explaining some variation of path_generator.py.
28:50 Look at launch files.
34:50 We go back and look at Pure Pursuit code again.
39:40 Jeff: Goes looking for the Pure Pursuit code from last week.
43:15 Finally found the repository.
46:43 Finally found the Pure Pursuit controller code.
50:00 We go back and look at path_publisher from Juan’s repository.
1:01:25 Al: Says is going to spend some time on his remote control.

Lawn Tractor Automation YouTube page:

Index for Lawn Tractor Automation group:
http://sampson-jeff.com/RosAgriculture/LawnTractorMeetingNotes.txt

Index for the original ROS Agriculture group (~250 videos):
http://sampson-jeff.com/RosAgriculture/readme.txt
http://sampson-jeff.com/RosAgriculture/ros-agriculture-youtube20230104.txt


All right I was just going to go through a couple Of things today I think probably a good Way to start will be just to mention This uh post I put out in slack which is Kind of A link to an mp4 file uh showing running A simple path and then the program that I ran I'll go through that in a little Bit more detail The Path basically Is going to press play here so it starts This Mission I've got command velocity Showing up here in the top Right it's going to come up here make a Slow Circle and come back Down Um You can see it travels at a good speed On a long straight and then if you watch Linear X you know it Comes down and Stops before it gets to each one so it's Like this stuttering thing I posted on Ross discourse Um has anybody got a solution to that And although it's got a number of views I'm still hopeful that somebody will Come back with Here's how they did it and you might Have noticed there at the end Um I just replay that a little bit

Foreign Backs up Right Then the next one Um Yes you see linear X go negative Which means it's got to go back up to Get there If I um Let's talk a little bit about the Code That this is running Um So In the Lawn tractor repo there's a few missions And one of them is this drive straight Then do a U-turn that's the one that you Just saw the video on And literally you know creating this Which was a little bit of programming And a little bit of manual and the Manual I mean is When I go out and just you know Um Comment out a couple of these po or Positions It's you know my attempt to smooth out The the path so it's pretty clunky The way to get a dubin's path but anyway The code is there for uh Anybody to Take a look at and I've note again it is Move base flex and not

Move based so some of the well it's Interacting with the simple action Client And um Anyway so I think that's useful for Anybody who's trying to run Run stuff Um Which I'll just Point out part of the time in the last Week has been spent coming up with Missions that I want to run in the Physical world And making them progressively Harder so this one point is literally Just You know Showing how to send a Command to the navigation stack Um And then I will Intend on running the three point Line and this is all Obviously hard-coded Positions in these X and Y coordinates Were derived by me you know looking at My specific Map Um And so this is again a very hard-coded And simple mission Hand Probably after the one point then the Three points then I'm going to run the

Straight into a u-turn Also I'll just point out while I'm here this Run in Circular rotation I put this here Which is a little bit more You know it's going to execute these Positions Was done to Test you know the turning radius and to Make sure the physical Turning radius Matches what I'm seeing in the simulator So in other words in gazebo If this produces a 10 meter in diameter Circle then I'll be able to see in the Real world does this produce A 10 meter Diameter circle and I think it'll be Just helpful as we go through the whole Debugging process Uh uh let's See what else did I want to show This you might ask so how did you know How did you calculate all that stuff Well One of the things that I think Jeff is Going to talk a little bit about as well Is some code that um Juan and Matt Had to produce a dubin's path and I took That and um Edited a little bit and the reason I

Edited it was Um It seemed to be I mean the dubins calculation uses it Looks like 2 pi for 360 degree rotation And I you know Heavens knows I don't always Do things right but I'm thinking I'd In order to get my Um path to run and run smoothly I wanted To use negative pi to positive Pi so in Other words These post statements I mean these are Quaternions but If you Feed Um The oiler to radians or Radiance Euler Routine Uh 6.28 which is 2 pi you're going to Get a positive number here I In my testing I wanted to get a negative Number there and so the way to make that Happen was to say hey if If you give me something greater than Pi I'm going to calculate it to be a Negative A negative number Um so anyway just a point Point that out that'll make sense just Anybody who's in the middle of this and Trying to create a A path but this is in the repo as well

Under Simple dubins test and I just have a Folder here code for testing and um It's not a part of the main Source program out but I put it And a public place so people can see it That might be as much rambling as I want To do today let's see Over missions uh simple dubin's path Oh yeah there's a spreadsheet out in the Um In the repo called vehicle Dimensions Helper and it's primarily there because Of this Let me make that a little bit bigger Um But I was just putting some other Basically me trying to figure out Radians to quaternions and so on and so Forth so I thought I would just mention And then I ran a circle using command Velocity and captured the positions and Was trying to confirm the Y'all sorry my phone is sort of blowing Up here Um So anyway there's some testing data That's Out there simple lubin's path generator I talked about that video running the Straight and this is what I mean by the Um You know these are the various points on If you do 2 pi

Then you get a that's how you get 360 Degrees but Um Like I said on my Path planning I think I wanted all of Um These especially to be negative negative Numbers Okay not rambling on my part sorry to be So long-winded What's going on in your world You're on mute my man okay um Since you're going through all this work To try to get a path from point A to Point B and make it basically go where You want I kept thinking you know basically when You watch the thing running Um And you're trying to drive a long Distance you can see that the the global Planner is constantly replanting and It's not Basically a straight line to where you Want to go and the other problem with The global planner is it is going to try To it's going to try to make a straight Line from where you are to where you Want to be and it's not trying to do any Smoothing of that or anything and if you Turn it over to the temp planner the Temp planner just takes that Global path As as a suggestion and you can watch as

It run runs it it creates its own Global Path which is maybe I don't know two or Three meters long and then it creates The local path of where it's going to Actually try to go to follow that and Just just watching it you know watching It drive from across the screen it looks Like it's not It's not going out of his way to drive In a straight line it just it just Drives and so I kept thinking you know Maybe maybe going back to something That's just a little more to the point Like say the uh the pure Pursuit Algorithm where you give it an actual Path that you give a list of points and Tries to follow those and it tries to Stay on that path now I haven't actually Run into this so I don't know that That's the answer or not But anyway I was thinking about all that And remembering back that uh When Matt and Juan had started on Juan's Lawn tractor and I think I think the Stuff that the match started with for The uh Uh the not AG open GPS the um the the Act the agbot challenge when he took his Lawn tractor that I think at that point He was running with a pure Pursuit Follower and then somehow generating a Path possibly a dubin's path So I think about all that stuff I went Out I was digging through the Ross

Agriculture Um Uh GitHub and couldn't find anything That told me what I wanted to know there And I it's got the point where I can't Find anything in that anymore so I'm not Sure if it's just me or if it's all Hidden in a Docker file or whatever So I I kept thinking that I remember at One point people were saving the Workspaces so I put in the chat there's A link if you go to Um let's do this And do this And do this Come on Oh my computer doesn't want to work Today Okay so if we pull up the slack screen Under the uh the the stored message uh It's the pinned message at the top of General and I did repost that later down Below but anyway if you look at that Message it's a bunch of useful links we Come down here and it says uh under Google drive folder uh there's several Things here and the very last one says Shared Shared workspace copies and if you if You click on that I posted that that Link to the chat if we click on that This will take us out to uh Out to Google And under here we have

Calm down Well it's really not cooperating today So under here we have three of these are From stuff that Al was doing And one that I I put a folder that's got Two copies of my simulation stuff in it Depending what I was trying to do at the Top of this is Poquito project 2019 and I think Poquito is maybe Spanish for donkey or something like That but anyway that's that's Juan's Project so they go to Juan's project And uh to the laptops and so I think the This is well let's let's it doesn't look The same as it did last night so I I Thought it said before it said desktop Let me just try this and see what it Does See how far we get here Cat can work space robot Bass Um We've got a captain workspace And we look under source That could be I'm in the wrong directory You might have to start over here so Here's what says Ross lawn tractor That's just the copy from Ross Agriculture that everybody has it Doesn't seem to have anything in it so Here he's got one called Pure Pursuit so This is apparently the right directory And So under pure Pursuit I think this is Just directly checked out and put on the

Put in his uh System as a package here by transcending It down here that's important this is Just the stuff that comes with it uh so We go to source I should stop double clicking stuff and The source is just a single CPP file Come on And This this as I say I think is just Directly out of the the thing that's out On on on on Probably for the Ross Wiki it's just Simply called it's it's it's the lyrics Does that say at the top here I think it's the larynx pure Pursuit so If you go to the Brass Wiki and you Search for uh pure Pursuit I think this Is what comes up and basically it looks Like he just simply checked this out and Put it on his computer since it's a CPP You have to do a cat can make after you Install this and it's not very long It's longer than I thought But basically I believe this simply Subscribes to a path statement and it Will publish one of the two I was Looking at was one of them published Both a command velocity and a Ackerman Message and I I'm not sure why I didn't Look at it hard enough to do that as Another one I'll talk about in a second Here Uh I I don't remember if it just

See also  NewaIr's New Cigar Humidor. The NCH250N201 Holds 250 Cigars in the perfect climate for you to enjoy

Publishes the Ackerman message or does Something different but anyway so there Is the code and I assume it's probably You know directly from Directly from the repository for peer Pursuit so we'll go back up one level Here oh look let me go back in there So go into pure Pursuit That's weird sometimes I have to double Click sometimes I don't so then there's One other file called our directory Called config And there's just a single file in there And I think it's just a uh It's just a list of parameters That's not what I was expecting From that engine add So it's just just a small configuration File that has some stuff in there and I Think maybe the launch file he's Specifying more stuff to make this run So anyway that's all that's in that uh Directory so it it should just be a Matter of checking that out What Okay let me let me bail out of there so Again under pure Pursuit that's what he Had and then uh under his Poquito Directory The rest of the stuff is just to make The thing run so the the geodetic utils That's something about converting Positions but the Geo nav transform is The one you need to have that loaded in

Order to be able to convert your GPS Locations into your XY offsets so that's What that is and that's probably again Just simply checked out And dropped on here and his Nema TCP Driver is something for his uh Uh Pixie Um GPS now this isn't the director is Looking at last night because it's it it Had one it was the eth Pixie driver But anyway this should still get us Close enough So the bottom line there is if you're Going through this stuff instead of Picking the what I said Docker Docker Laptop uh maybe I should have picked the One one of the other two uh directories Because he's got three three different Uh workspaces saved here so if I go to This poquito And under here it's got the uh under Scripts And I was used to seeing the big the big Icons here but anyway they come down Here there's a bunch of just utility Stuff going on here and down here he's Got these three python programs and the One that's called GPS heading dot Pi I Believe that's the one that will load up That Geo nav transform it will subscribe To your incoming latitude and longitude And then it subtracts off your offset And publishes your XY final XI y result

That's that's what that program is doing And then on or no no I take it back That's not what that one's doing this One the GPS heading subscribes to the GPS velocity message and then it takes The the F the vector of x velocity of Y Velocity and does an arc tangent on that To get the the heading that you're Driving this is the way to get heading From your GPS is what that one's for and Then under uh There's one called path generator and One's called path publisher so under Path generator I think it's just a Single program here And it simply takes I think it takes a List of points that are in uh you you Have a file and the file was called uh I Think it's called something waypoints We'll go look at that in a second but Anyway it's just a A program let's see how do I scroll this Well there's my scroll bar That is not not real long But it's based on the the dubings uh a Dubious path see right here at the top It says import dubins so there's there's A complete dubin's implementation that You can just import into Python and you Pass it you say here's where I am and Here's where I want to be and it returns Back the uh the segments to make a Dubin's path and then I think it's got Some extended stuff or then in between

Those points it generates a point like Every I think it's configurable like Every Um 100 centimeters or something so Somewhere in there there's code I don't Know if it's hard-coded or you talk to It somewhere else but anyway it's just a A standalone program you run it and if I Back out of here So one of the uh Say for here's a here's a waypoint to do A figure eight let's look at that one So it's just a list of points that you Want to drive to So you go through look at your map and Say okay here's here's the place I want To drive to you put them into this file And save that and then you run that Generate points against that and it puts Out uh see Then it puts out the generated points so Here's one that says generated points Figure eight So I took that first file we just looked At and expands that out it looks Something like this so these are actual Uh points along this path that you want To drive so again it's just a text file Showing you what what it created Here I'm getting the hang of this now If I can pause you for a second can you Pull that back up Uh

The generated waypoints Yeah see you scroll down just a smidgen See those yaw values greater than Pi Like uh Yeah That's the Yeah when I was going through this code That's where I Discovered hey this is giving me yaw Values greater than pi Okay Anyway back to here back to your review Okay so okay so once you get this once You get the generated points you get This file with all these these points in It then you've got another program here That will It's called path generator And this one I I believe it opens that File called generated points And then it it creates it it takes those Points and builds a path Um a path message So you basically say create a path you Know give me a blank path and you then You iterate through the all the the Points you've got there And to find that that uh So anyway it takes all the points you Had in that and generates a path uh Message and then if you're running Apparently if you're running the uh The peer Pursuit follower it's Subscribing to a path message so you

Just simply you publish the path the Follower says oh I've got a path now so It just starts at the top and starts Driving along that path until it gets to The end runs out of points and then Comes to a stop So you know whatever you put in there For whatever pattern you put in there it Should you know start up accelerate up To speed and drive the entire path I Don't know if there's anything in here That controls the speed I don't know if The pure Pursuit is smart enough to know Oh we're going to turn so I should slow Down or if it just drives at a constant Speed I I need to load this stuff up and Try it and see what it does So it looks like this one Um So so running this this pure Pursuit Instead of the entire navigation stack It looks like you can get your vehicle To drive around Now the other thing I was going to point Out I was saying that you know you've Got the concept of the the Waypoint file And you've got the generated points file Well if we go back and look at um Hour Page on YouTube and come all the way Down to the bottom here the very first Meeting we did After we moved from us agriculture to This group

Come on Should be this one This one right here so this one down Here is where the very first meeting I Said well people can't figure this out So I think I'm using the same program Here in this in this file let me uh Copy that copy link Address Chat So I think this this meeting here this Video here we were talking about how do You do this and basically you know I Just looked at the ground plot and said If you want to drive because the point Was let's see how can I I guess I'll have to open it Recording is on I don't know if it's going to do any Good to come in here other than Um I should be able to find it here Somewhere to I just want to get a bigger picture What's going on here but you can go out And you can watch the video and see what It is so here I've said I I came up with A way to do this and then so I just Simply started with a file and I put in Like I I started right here I think and Then I put in this point I put in this Point I put in this point and this one And so forth until I got all the way to The end and I ran that generate points Program against that and it it put out a

File that had the uh had the values in I Think that one actually Um maybe draws them right on the screen As you go so I it was probably generated An output file and I don't think I was Using that but I think it's all the same Software that that I was using to do This So in general there is a way to by Manipulating where you put your points Get the vehicle to go where you want it To go So that was that was what I was doing Last night I ran across that and thought It wouldn't be that hard to just don't Start up the navigation stack in the Simulation the Gazebo simulator that we Have and just load up this path follower And then run these two scripts and I Think it will It should have enough there to drive Around like say in this case if you Wanted to drive in this path here you Know take whatever points I used to Generate that with and create that until It Go and it should drive around in this Descending rectangle I guess I would Call that uh constricting what whatever Whatever you call that it's kind of a a Spiral a spiral rectangle basically what It's doing so theoretically you start up One launch file you could do this or Start up the other launch file and get The original stuff with the navigation

Stack and then you can click on the 2D Nav goal to make it do that So uh the other thing is it could be the Once once this has started you know you Gotta uh if I drop in the pure Pursuit Planner and I create a launch file that Says launch that and I guess I could go Back to Back to where we were here and then also Under His stuff here this is under the scripts So he maybe has a couple other I think I said maybe he's got a couple More utilities I don't think he does he Just simply has the uh Some Waypoint files he's got the output Generated files he's got those three Scripts one which gets a heading from GPS one which converts waypoints into Generated points and then the the path Generator converts those into a path and Publishes that now somewhere so I was Watching one of the Ross agriculture Videos And somebody said you create this path And you can either publish that to Pure Pursuit or publish it to move base flex And move base Flex will honor that as a Path and and follow that so I think at That point it's not going to attempt to Slow down at each individual Waypoint But I don't know I haven't I haven't Tried that so that's something something To consider

Uh what was my Paul I was going to back Up and show um So under his launch directory Under it so I was talking about the pure Pursuit launch let's let's look at that One So basically it just says um The the node is going to be pure Pursuit And then here's some parameters down Here that he's put in How come my screen looks funny Foreign I can't figure out why it's wider there But I guess that doesn't matter so it Basically it just says here's a Robot frame ID so you're telling it the Parameters it needs to know in order to Make your vehicle move and there should Be a look here's a look ahead it's a Look ahead frame ID Somewhere in the configuration files There's there's this concept of look Ahead in pure Pursuit that you have to You have to Define but this is basically Just saying start the start the node up And it'll just sit there and wait for Something to happen And down here description blah blah blah So there's nothing really spectacular But there is a launch file to start that And then he's got one more time where's Where's that launch file because that Had A redirect

From path planning to drive path and not I couldn't find that before Pure Pursuit launch So you're asking about in this file Yeah see that right in the middle there It says remap from path segment to Drive path So that apparently is um it's really Important because the The script earlier was subscribing to Drive path and I couldn't find I couldn't find Drive path Um and now I know why it was a a remap So I think Drive path is probably what Pure Pursuit wants to see it's just Saying change the name of that topic so Apparently the the program that says uh Generate path I think it was called it's Going to take the points and create Something called path Uh Path segment yeah it's going to create Something called path segment and but in Order for Pure pursuit to honor that I Think you have to rename it to uh Drive Path so it's so peer Pursuit is Subscribed to something called Drive Path so you just have to make those Match is what what that's telling you And what's the name of this launch file Well but everything's locked up on me Again here hold on Foreign So if you go under his again so forth if

See also  Best Mower for Your Lawn Care Business ($500 to $12000 Budget)

You look under this this is gonna work Under his Poquito uh Package or his entire thing here he's Got scripts launching config so just Under launch there Uh zoom in like this No nothing nothing's working so it's Just something called Pure Pursuit Launch is where the launch file is at Cool And then under I was going to look at The other Since I just noticed by there's one Called config let's see what's in that One Tractor yemo Now I can zoom So here's got things wheelbase look Ahead distance so apparently this gets Loaded in when you probably when you do That uh care Pursuit launch it probably Loads this file in And so again I I'm not sure it's Um as streamlined as it could have been So it could be it loads these in but Then launch files redefining some things So you'd have to look at that and see What what all that's doing but anyway so This is apparently the only parameters You need to get the pure Pursuit planner To follow the path that you give it And uh So he's back out of there So let's get a look at these other

Launch files that he had so we'll go Back to Go back into his launch directory And then the pure Pursuit launches what We just looked at And I don't know what Poquito nav Launches I haven't looked at that one so We'll look at oh Harry's got one that says dot old so I Assume this is the current one it says Poquito nav launch So it starts off uh uh he's loading a Map I don't know what There's probably no point to have a map Server because if you don't have Um move base running nothing's going to Use the map so it could be that just Left over Uh effect localization Transforms these measurements in meters For your sensors It's just setting up all the parameters On the vehicle telling where the GPS is And telling it maybe some sizes or Whatever and he starts up this program Called GPS heading that's going to grab Heading from his GPS It says combines messages combines Heading from GPS velocity message and GPS fix GPS to pose launch I'm not sure that must be that's Probably a program that will take your Latitude and longitude and

Tell you where you are but I'm not sure So anyway that's that's basically all The stuff is there I assume this would Work if you just put all the stuff Together and if I get around to it I'll I'll try this and I'll load this up and See if I can get To try to get the the new gazebo Simulator to drive around using this This concept here but there's really Very very little stuff there to make it Go so that might be worth worth looking At So if we So I'm getting ready to move on to Something else here any any questions on All that stuff that's babbling about There Host don't want that one So the other thing was uh last last Meeting So I've got to find that Now it's going to have you pull up path Follower again just one more time but if You've closed it don't worry about it Uh the pure Pursuit yeah I can let's see I should be able to go Back there for me to everyone It's in my chat this will go as it Brings up the uh The workspaces on Google Drive And then Come on stop it Another Poquito project which is one

Stuff And then I was under this Docker laptop But it could be that uh Possibly the other directories might Have some other fun stuff in there you Know just doing a slight arrows the Dockers assume Maybe is going to be code that runs the Stage simulator As opposed to the vehicle so anyway I'll Go into this one that just it was called The the docker laptop And robot base And cat going to catkin workspace and There may be other things there I've Skipped over that I just wasn't paying Attention as I went through well dry Drilled down to source And Uh So I think it was under poquito And there's the launch files so I click On launch no you didn't watch launch Files you wanted you wanted pure Pursuit Yeah the actual script So we'll go into There was a peer Pursuit folder I think There it is Come on Oh I guess I am in there Is that the one There's the actual code is that what you Want to know Yeah so see what it subscribes to

Subscribes to Subodom and subpath Wait there's there's more stuff here let Me see what else is here Subscribe to path segment and Subscribing to odometry looks like those Are the two Messages I think there's a Python script also that's similar There is a path follower in Python too Um There probably is yes Okay no no issues you I mean you uh I'll Have to go back and look to see If there's I think I would spending time on the Python version and not the C plus plus version That that's possible but but back to Your point you were saying that in the Launch file I was remapping something About the path and then here it says This particular program is subscribing To something called path segment It's just just all the stuff has to Match in order to get it to work if if One thing's publishing something Something else has to subscribe to the Same name to get the stuff to connect so That's why You ask about what's what's a Subscribing to and then here's the Publish so right here it seems odd

Because on the next line down it says It's going to publish a command velocity Message And right below that it says it's going To publish an Ackerman message and I'm Not sure what it's doing that command Velocity it could be that just a Redundant thing so if you want to uh Just go you know watch the command Velocity for instance you could just Echo that while it's running Or it could be that it just makes it Easier to run one type of vehicle or the Other if it publishes both So I I'm not sure what that is and if I Get it running then I can look into that And see what's what's coming out of Those and see what see what to do with That Cool So let me uh go back to slack how to get Slack to come up here I think that would Slack I go to Random I'll back up to uh the last meeting Oh I I see I didn't get a link to this Put into the last meeting neither under Chat or under the comments here that Somewhere that says at 23.50 it says Al Found an implementation in pure Pursuit And he's pointed into this thing called Um GitHub

.com F1 10th F1 10th is that what it's called Yeah some um It's a play on One-tenth scale F1 racers So under here somewhere there was one Called called just something called Dubins All repositories what kind of searched I Suppose Find Repository I don't know if I have the right uh Well apparently I've got the wrong the Wrong directory here Let's see backup Foreign A lot of time here but So anyway I guess it's not going to pop Up um but the point was they have They're they're doing like like radio Control cars that they're putting Ross Onto them and then they in the the title Says it says uh What is this racing so I assume they're Trying to drive fast by doing this So if you go follow that stuff down they Have a I think again it's a single Program that's called a do or it's Called a uh pure Pursuit follower And maybe that's why I can't find it I Was searching for a search for dubins I Should have been searching for Pure Pursuit

Let me just give it one more shot here Take your time Okay so I finally found that code and I Posted that to the chat and it's just Under the f-110th dash Dev and the Repository is called Pure Pursuit and You you can you can go look at that in The chat and find that but anyway this Is another implementation of somebody Uh path remembers under scripts or path You controller Oh now I'm going to waste time trying to Find this Path Huh Do I I know it's here I was digging Through this and I found it so Launch path RV scripts sectors But I found the code and looked through It and yeah it does seem to be another Pursuit planner So this might be for the actual vehicle And not for simulation I don't know if That would make a difference or not but If I backup look at launch file we'll See what he's starting here I also noticed he has an interesting way Of laying out his um Statements there he puts Name package type arguments all in The same coding structure Where are you seeing that The screen you just had up Instead of having a run-on sentence he

Breaks it up Oh Each one of those is An argument where Yeah okay I've seen it that way it was It was a little bit like what has he Done here and he's basically he's just Taking a run-on sentence and decomposed It Yes So anyway I'm apparently not in the Right spot here because Well it shows you the packages that he's Firing him well it I suppose that would even tell me where They're located wouldn't it so we come Down here it says Include that right where I was his node Nurse pose Adaptive look ahead and those are in This directory nearest Global something Pure Pursuit controller it's in F-110 Sim Ilar pi So apparently that vehicle controller Pi Is Is his pure Pursuit planner So let me look at it one more time Before I give up here This is one called vehicle controller pi And it's not under the uh something Sim That he told me it was going to be so so Maybe this From Ackerman Port Ackerman Drive

And we have a path it's Pose So I I think this is the uh Is his pure Pursuit followers so that Anyway something worth looking at it Would be interesting to get this one Running and the uh the lyrics One both And see See how well he performs see what Features they have and so forth Yeah because here he's building I think Right here he's building the uh This where it says right in the middle Says curvature steering angle so this is Doing the uh Attempt to follow follow the path there And then down here he said something About command and he loads the command Is going to be a Sacrament command And right here he degenerates And I really it's really annoying to Watch somebody scrolling up and down on A file like this but I'm just just Trying to find the thing here so I'm Ecstatic that you're spending time on it That's fantastic you scroll away And somewhere somewhere above here it Said create a an empty topic of command And then down here he's saying uh Command dot steering angle equals so He's loading up a uh looks like he's Loading a fake message and then down Below he's doing his calculations it's Right here command speed he's he's

Actually calculating the speed And then down somewhere he says Uh so he's putting the speed and the Angle into an Ackerman message and then The very last thing he publishes that he Publishes command so that's publishing Out the Ackerman message there at that Point This one is He's taking Direct Control with this He's going right to an Ackerman message He's not Going to move base or any other Nothing's in between him and the low Level controller correct just like the Stuff that Juan has he's not using move Base at all as far as I know in that so Basically you say here's the points it It reads them and puts out starts Putting on Ackerman messages and one Other thing to consider is do the uh The Ackerman message being published is It compatible with say what the Simulator wants right now because the Simulator wants to see a standard Ackerman message and I I put one note in There to convert that modified command Velocity just repackages an acronym Message was just simply you wouldn't run That and this if this puts the Ackerman Message out directly this thing should Reach um This thing's going to publish that Directly and the simulator should use

See also  Have I Given Up On The Par 3??

That directly and if you get the point Where you want to do either your Physical vehicle then we can decide you Know what to do there if you want to Just change it to an Ackerman message or Do we want to have a node that converts Ackerman message back to the modified Command velocity or whatever so that's That's just different things we can do First I just want to try to drop this Into the simulator and see if I can get Either one of these to drive around and Do a reasonable job Can you keep that up but then click on The link that I posted to the chat IPhone Scripts This is the python script that's also in Um Wands Series of folders that is um Well this is path publisher this is the One that takes it reads up the generated Points and generates a path message so This goes between Uh your generated points and your peer Pursuit follower This is this is another This is some this is what you run to Make it actually move so your your pure Pure Pursuit followers sitting there Waiting for something to happen if you Run this program called generate points Let's see can I This reads the generated points yeah

This reads that file of generated points And just simply uh Concatenates them together to create a Path command And then when it's done it just Publishes the path command that pure Pursuit follower says oh I just got a Path and it just starts following all Those points until it gets to the last One and then it should come to a stop I Think I've never actually run this but I'm Thinking that's how it's going to work In the C program that you had up earlier It's going to read that path Yes I believe so Does that make sense it does So so the the scripts that he has there The one that says generate points Is that what I think it was called Generate points that's where you you Create a file uh and you put waypoints Into it like that the the YouTube video That I published where we were talking About originally you just simply put the Points into that file And then you run the generate points it Reads the waypoints and increase the Generated points output file so that's Just a a manual thing that not Necessarily in line you can generate That ahead of time to generate your say If you're going to mow your field or Whatever you could you could you could

Do that and create that file called Generated points now you have to you're Gonna have to get the name to come out Right eventually but once you have that File then With everything started up and running You've got peer Pursuit sitting there Waiting for something to happen you Execute this python script called path Publisher and it simply grabs the Generated points file reads all that in Can concatenates that together and make A path statement and then it publishes The path statement and what it does I Should say a path message and when it When pure Pursuit sees that then it'll Take off and start running And this you know it all it's all quite Experimental so it's not you know meant To be a final final product here but That that should be enough to prove Whether or not you can generate a path And have this thing follow it uh and and Actually stay straight on the line and And do what it needs to I I seem to Recall that when they're playing with One's lawn tractor they would generate Using the dubins Um path generator basically they Generate points they just put points and They so they'd have uh lines Let me Let me do this And we do this since I need to talk with

My hands here I'll get my easier to see My hands okay view speaker View So they they created a a file that There's a point here and a point a point Up here how that's an angle Anyway anyway there's a starting point Here and an ending point here so it Creates a straight line between there And then it would draw you know a curve On the end for your dubans and then it Would come back down to this point again So by just putting a few in there so it Would it would follow that but the thing Is uh somewhere there's some videos on Russ agriculture if I can find them you Know on the uh the Youtube stuff but it Would start at the bottom here And it would drive straight up see I Have to go to the left to keep it go Looking straight and get up here and Then it's supposed to go around the path Like this And you're supposed to follow that until It gets back to this point and draw a Straight line down again well what he Was doing it was cutting those points so As it's trying to go around the curve it Didn't go all the way around the curve And it's because of the way pure Pursuit Works I don't know if it's because I Assume it's gonna it it's trying to keep Your base link on the line the path that You've specified and not the front of The vehicle so the front of the vehicle

Just just turns early and doesn't go Around that full path So that's something that'll have to be Uh Looked at and figure out what to do About that But again just just get it moving in the First place then you can start seeing What the what what the problems are And I hope you can still hear me I've Got a message saying I have low system Resources which may affect my audio Quality so we'll see we'll see what this Does you never blanked out on my side no That's that's good it's it's complain I Don't know that means I got too many Things running or if I'm out of disk Space or out of memory or whatever I Don't know what that means so So anyway that's the thought I had on That that this was running at one point And when we watched the videos and Watched the screenshots you can see that The you know the vehicle would move down To the end of the line in a straight Line as it goes to turn it would cut the Turn short but it would come around and Line up and and hit the line going Straight going back the other direction So that's just something that you know By tweaking it I think you can figure Out how to get how to get around that Make it go exactly where you tell it to So what'd you just publish there what'd

You just post Uh the link to this File which was You know some rudimentary instructions On using Some of those Um So so apparently yeah that's what we ran At the time to create that so that's so You've got instructions that are on how To do this stuff all right But what I neglected To include at the Bottom of this Was And I'll see how if these instructions Are any good Using the generated waypoints this was In the simulator Um Launch docker See it's it Wanted to use that python script And then there was this path follower Script And possibly you can feed this path Directly into move base Flex so with What you've got if you just publish that As a path as opposed to publishing poses That may actually run but I I think in The long run you're not going to be Happy with Ted planner and Global Planner You know to get an agricultural vehicle

To go from point A to point B where you Want it to go But yeah that might work I think I'm Right there with you After hacking it Uh So to speak yeah it's um It's unfortunate but I think you're Right But the problem is if you throw out move Base now you're throwing out lots of Handy things like it was maintaining Your your map of your world in your Global map your Global cost map and it Was reading sensors and updating your Your local cost map and it had you know A state machine to figure out you know It's waiting waiting for a goal to be Come in once it gets a gold says go fire Off the global path planner so it goes Out to your Global cost map figures how To drive around through there and Returns that path and that path was then Passed into the local planner that would Go ahead and drive around so if throwing All of that out well then you're you're Gonna you're gonna lose lose all that Stuff so At one point I was wondering could you Run load up move base and let it run and Let it uh say maintain your map let it Read sensors and build the local cost Map and not actually let it do any Navigation so we could have something

Running in parallel Say that's that's running this uh This pure Pursuit follower and it's Doing all of the navigation but you Still got all the stuff in move base Running so you still have access to your Map you've got access to your your Obstacles on your local cost map and so Forth so that that might be another way Another way to do that But it's just going to take some Experimentation I think to To figure that out That's why I was curious to see what it Was actually publishing and um yeah so It's it's It would be um nice to not throw out the Whole thing Like I think anyway it might be nice to Put say pure Pursuit as a local planner Into move base but the problem is it's Gonna it's gonna directly follow that Global plan the global plan isn't meant To be a nice smooth path to go where you Want it to be it's gonna attempt to draw A straight line from where you are to Where you want to be and you pass over To peer Pursuit wow yeah it might it Might follow that but when you get to The end it's not going to try to uh you Know line you up to be going the correct Direction you want and so forth so That If you're going to put pure pure Pursuit

Into move base As the follower then you probably want To replace the global planner with Something that does a better job Um as far as you know creating a nice Smooth path to go where you wanted to so Again there's lots of different ways to To approach this So I think that's all all I had that did I you know I I run across I find out Where to find this stuff and Um Again what's that last what's that last Thing you just posted on uh oh oh you Just showed me where it was it was the Uh the definition of using that generate Points and so forth So that's again that's all I have and if I get some time I'll I'll go download One stuff and put onto the simulator and See if I can get that to move and see if It's gonna take something weird to get The message types to match and there may Be needs requires more translators from You know say if it is for for some Reason publishing command velocity Ouija Ackerman you need to know to do that but I think it's putting on Ackerman Directly so that that should work there Is that thing about he was taken heading From his GPS and technically probably if You just fired it up of all the names Match that will take the heading Directly from the simulated GPS and in

General because I assume it's the So if something wants heading it's Probably the pure Pursuit follower and It could be that just left over from Something else it doesn't it may not Need heading at all so that again that's Just more stuff to look at and Try to track down each one of those Things So that all sounds great I thank you for Spending time on it the next thing that I was Going to do is Crack open my radio control Embedded code And program it so that the mode switch Sets a data element that says the you Know whether I'm Following command velocity or whether I'm Um letting the radio control drive it And then I've got to change that on the Tractor Control as well so That's the next thing for me is to Update my low level uh low-level Controller getting ready to Test those Simple missions Out of the yard That's all I got Okay

You May Also Like

About the Author: Mowrs