LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"a star algorithm"

Hi
 
I need to work out the shortest path between 2 nodes in Labview (for a GPS type system) and after a bit of net surfing found that "apprently" the a* algorithm is the most efficient way for doing this.  I was wondering if anybody has created an Labview vertion of this algorithm (or any other path finding alrogithm for that matter) already to save me a bit of time!
 
Cheers
 
Toby
0 Kudos
Message 1 of 16
(7,861 Views)
What is your definition of a node?
0 Kudos
Message 2 of 16
(7,804 Views)
The A* algorithm is for finding the best way around a path, so he doesn't mean a labview wire node, he means something to find a way to go from point A to point B
0 Kudos
Message 3 of 16
(7,793 Views)
I developed Labview code for a self-navigating vehicle using GPS.  I posted some of my VIs here.  Let me know if you have any questions.
0 Kudos
Message 4 of 16
(7,776 Views)
I played around with A* for LabVIEW wire routing a couple of years ago and came up with the code I attached below (LabVIEW 7.0 format).  The algorithm ended up being a depth-first algorithm instead of A*, but you can probably reuse a lot of the code.  In particular, the priority queue and memory management techniques in it will probably be useful.  Run the example under the AStar directory.  This code is pretty old and I can't remember how much of it actually works (e.g. I don't think I ever got the Hightower working).  Let me know if you have any questions.
 
NOTE: Some of this code is currently shipping in National Instruments products, so it is copyrighted like any other code in vi.lib.
Message 5 of 16
(7,734 Views)

Cheers DFGray,

looks like i can use quite a lot of it! Am slowly working my way through it.

 

Thanks

 

Toby

0 Kudos
Message 6 of 16
(7,691 Views)

I run the program and it is so good, you did great effort!. I did a control program for stable tracking of a certain path, and I used the simulink program, I can work on Labview also, which I actually prefer than Simulink and Matlab, I am not professional on LabVIEW vut not bad.

 

what I really need now, is to be able to extract the coordinates of the points on the generated path by your program to use it in my control program to track it depending on the amount of error between the actual path and the reference path.

 

So where is exactly the output of the coordinates of the points which is constructing your path (x,y).

 

Another question can I take this o/p on simulink, or I must implement a Labview code for my simulink program to be able to work with both programs.

 

Thanks in advance. 

0 Kudos
Message 7 of 16
(7,302 Views)

The controlPoints output of AStarRoutingAlgorithm.vi is an array of XY points which defines the path.  Since this is a LabVIEW wire routing solution, the only points necessary to define the wire are the locations where the wire bends.

 

I do not know Simulink, but would be very surprised if you could not reimplement the algorithm there.  I would strongly recommend you read up on artificial intelligence algorithms if you do this.  There are a lot of ways to get it wrong Smiley Wink.

 

This is a very old thread.  You may want to consider starting a new one if you need to continue this conversation.  You can link to this thread using the Insert/edit link button on the toolbar of the forum editor.

0 Kudos
Message 8 of 16
(7,241 Views)

can you recommend for me some references that are talking about A* algorithm, and if you have any codes which are implemented for A* algorithm, it will really help me.

 

Thanks.

0 Kudos
Message 9 of 16
(7,205 Views)
I found the attached information when I was researching A* on the net three years ago.  I do not remember all the sources.  It includes pseudocode, C++, and Java implementations.  The algorithm itself is not difficult.  Its application can be.  Good luck.
0 Kudos
Message 10 of 16
(7,174 Views)