Go to Post Winning just makes your ego smile. - MooreteP [more]
Home
Go Back   Chief Delphi > Other > Chit-Chat
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 06-11-2014, 12:28
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,078
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: Dijkstra's(?) Algorithm help

And once you grasp Dijkstra's algorithm, you'll probably want to learn about A*.
Reply With Quote
  #2   Spotlight this post!  
Unread 06-11-2014, 19:49
Sparkyshires Sparkyshires is offline
Registered User
AKA: Michael Shires
FRC #0384 (Sparky)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2006
Location: Virginia
Posts: 226
Sparkyshires is an unknown quantity at this point
Re: Dijkstra's(?) Algorithm help

Okay, I think I get it. Just a couple questions:
  • 1. How would this correlate into a map of line segments?
  • 2. How would you go about putting something else in there for the time it may take to turn?
  • 3. And what exactly is the a*?
__________________
"Measure with a micrometer, mark with chalk, cut with an axe."
Reply With Quote
  #3   Spotlight this post!  
Unread 06-11-2014, 20:06
hzheng_449 hzheng_449 is offline
Registered User
AKA: Harrison Zheng
FRC #0449 (Blair Robot Project)
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Rockville, MD
Posts: 36
hzheng_449 will become famous soon enough
Re: Dijkstra's(?) Algorithm help

1) Traditionally Dijkstra's is thought described in terms of a graph with vertices connected edges. The example with the in the previous post has the centers of each grid as vertices and all adjacent grid centers are connected by edges. (Pretend a chessboard was represented as a graph with each square being an edge)

For a map of line segments, each point at the end of a line segment would be the vertex. And the line segment would be the edge. It also follows that the length of the line segment would be the edge weight.

2) You could make a function that adds a "maneuver" cost to each edge, and the algorithm would work fine. (Ie it takes 2 seconds to turn to get to a line and 9 seconds to travel the line, so I just say the overall time it takes to go down a line is 11 seconds.

3) A* is another path-finding algorithm (There is a link in the previous post) with a much lower computational cost than Dijkstra's method. I recommend you first get a solid understanding of Dijkstra's and some basic graph theory before looking too deeply into A*.

Last edited by hzheng_449 : 06-11-2014 at 20:09.
Reply With Quote
  #4   Spotlight this post!  
Unread 07-11-2014, 09:02
Ty Tremblay's Avatar
Ty Tremblay Ty Tremblay is offline
Robotics Engineer
FRC #0319 (Big Bad Bob)
Team Role: Mentor
 
Join Date: Feb 2006
Rookie Year: 2004
Location: Alton NH
Posts: 841
Ty Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond reputeTy Tremblay has a reputation beyond repute
Re: Dijkstra's(?) Algorithm help

Quote:
Originally Posted by Sparkyshires View Post
Okay, I think I get it. Just a couple questions:
  • 1. How would this correlate into a map of line segments?
  • 2. How would you go about putting something else in there for the time it may take to turn?
  • 3. And what exactly is the a*?
1. I used squares because it was easy to generate the examples with ppt that way. Use intersections of your line segments. Since you're following a magnetic line, I'm assuming you can only turn at intersections, so call those intersections your nodes.

2. Dijkstra's Algorithm explanations use the term "distance" because that's the easiest term to understand when beginning to learn path planning. However, it's important to realize that physical distance is often not the only factor when navigating from point to point. A better term to use is "cost" instead of "distance." This would let you factor in time for turning and even things like energy conservation and a risk factor for getting stuck.

3. hzheng_449 hit the nail on the head. If your algorithm is a bike on training wheels, Dijkstra is without training wheels, and A* is a motorcycle. It's best to learn to ride without training wheels before jumping on a motorcycle.
__________________
Reply With Quote
  #5   Spotlight this post!  
Unread 10-11-2014, 15:42
Sparkyshires Sparkyshires is offline
Registered User
AKA: Michael Shires
FRC #0384 (Sparky)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2006
Location: Virginia
Posts: 226
Sparkyshires is an unknown quantity at this point
Re: Dijkstra's(?) Algorithm help

Interesting, I've been looking into both, dijkstras more so. Thank's ya'll very much!
__________________
"Measure with a micrometer, mark with chalk, cut with an axe."
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 17:18.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi