|
|
|
![]() |
|
|||||||
|
||||||||
Having a peaked interested in machine learning in ai for quite some time (and with the arrival of this thread: http://www.chiefdelphi.com/forums/showthread.php?t=129855), I decided to try to implement what I've learned in an quick demo. This was written in matlab, but the code can be ported to c.
With my previous program (output found here:http://www.chiefdelphi.com/media/photos/39138), I now plan to combine these two programs, as well as 254's code from this year in an attempt to make a robot go to a designated position on a field avoiding all obstacles.
03-07-2014 11:48
Andrew SchreiberI noticed a lot of what looks like stop and turn moves. I think this is a function of finding the shortest path. But when dealing with the real world we need to remember that the shortest path is not always the fastest path.
I'd be curious what would happen if you simulated a machine driving along this path annotated with vehicle velocity and battery voltage.
03-07-2014 13:01
faust1706I'm aware of this fact, but I have no idea how to implement it so that it outputs curved paths. It returns the coordinates of the nodes needed to get from a to b. For it turn return a curved path, it works either have to return so many points it appears as a curve (it takes about a second to go through 100 steps of the algorithm), or for it to output a function or something of the matter.
I still need to sit down and go through 254s path generating and following code, so that might yield some answers.
I like Yash's idea of making a square foot of the field a node, so the map would be roughly 54x27.
Something really neat about this is it's speed, surprisingly it is really fast, faster than a human could find the shortest path. That being said, it is still feesible given enough updates of the environment with the Kinect and vision system, that in a match a robot could autonomously go from a to.b in teleop, given the other team is nice and doesn't push you and only attenpts to block your path.
03-07-2014 14:38
SoftwareBug2.0|
I noticed a lot of what looks like stop and turn moves. I think this is a function of finding the shortest path. But when dealing with the real world we need to remember that the shortest path is not always the fastest path.
|
03-07-2014 14:54
Andrew Schreiber|
A quick note on terminology: In discussions of path planning "shortest path" tends to be treated as if one were saying "optimal path" rather than as literally the shortest distance. Shortest is usually described as minimizing some objective function. Some common choices for the objective function include distance moved, time taken, and fuel used.
If he wants fewer turns one way he can adjust his algorithm is make the objective function minimize time instead of distance and then say that turns cost time. |
03-07-2014 15:59
SoftwareBug2.0|
I'd still like to see various simulation runs with differing paths as generated by objective functions tuned for various variables (distance travelled, time taken, energy consumed) and various weightings of all of those.
|
03-07-2014 16:36
faust1706Look into gradient descent or the normal equation. They are methods of regression. If your equation was ax+ by+cz where a b and c are your weight factors, it will in theory find the global minimum and output the coefficients. I wonder if it would be quick enough to apply this for every time the program runs. I'll look into this.
03-07-2014 22:40
StevenB|
I'm aware of this fact, but I have no idea how to implement it so that it outputs curved paths. It returns the coordinates of the nodes needed to get from a to b. For it turn return a curved path, it works either have to return so many points it appears as a curve (it takes about a second to go through 100 steps of the algorithm), or for it to output a function or something of the matter.
|
03-07-2014 23:11
RyanCahoon|
To actually get smoother paths, you have to do something to further discretize your space.
|
04-07-2014 03:38
faust1706for those of you interested (looking at you Andrew Schreiber), I made some changes to my min_fn and used a constant environment. The results can be found here.
The student who I took under my wing this past build season has already implemented 254's code to make a segmented path into curves, the results can be found here. What's really cool is that apparently my program's output is suitable for 254's code to run on. I need to combine these two and see how long it takes to run through completely.
This is still a major work in progress, but it is getting somewhere.
The next step is to apply depth map readings into the party.
All this is in my dropbox of computer vision stuff