Loading...
 

PogamutUT2004


Graph type Graph does not take parameters

Hi.

I'm working with the Pogamut 3 Cookbook
Chapter 6. Navigation bot - navigating through the level

There is this a sample code

Collection navpoints;
String mapName = this.gameInfo.getLevel();
navpoints = this.bot.getWorldView().getAll(NavPoint.class).values();
Graph navigationGraph;
navigationGraph = NavigationGraphProviderForMap.getInstance().getNavigationDataForMapWithChceckAndInitialization(mapName, navpoints);
pathPlanner = new AdvancedPathPlanner(navigationGraph, bot, navpoints);
pathPlanner.setActiveProfile(AdvancedPathPlanner.ARMORINTEREST);

But when I try it, I have the error: Graph type Graph does not take parameters.

I tried to use different import, I tried to check any update of pogamut but I'm still stuck.
What do I have to do ? I know this question may look like a newbie question but I'm really lost.
Where can I find a Graph using templates ?
Thank you in advance for your help
Hi!

I'm sorry, that part of the tutorial is probably OUTDATED :-(
I'm not aware of NavigationGraphProviderForMap class at all.

We have a new non-integrated project called amis-pathfinding that can be found here:
svn://artemis.ms.mff.cuni.cz/pogamut/trunk/project/Utils/AmisPathFinding

But that requires to write your own graph adapter.
In a nutshell ... every NavPoint object contains getIncomingEdges() and getOutgoingEdges() that provides you with a map of NavPointNeighbourLink(s) describing the link between two navpoints.

Cheers!
Jimmy
Oh ! Thanks a lot for this answer !
So, is it possible to delete this part of the tutorial ? :-) Or maybe just write a bigger Warning ^^
I'll try to work on amis-pathfinding :-)
Thanks again
That part of tutorial was written by LuVar when he was doing his jungigation library and it refers to jungigation code and classes. You need to have that project imported for that to work. However the implementation of jungigation changed a bit - that MAY be the reason why the sample code doesn't work, however I am not aware of any changes in NavigationGraphProviderForMap class or NavigationGraphSynchronized.

Instead of

Graph navigationGraph;

I would use

NavigationGraphSynchronized navigationGraph;

as this is the object the method returns.

But for an example how to use jungigation library refer in svn to trunk\project\Addons\jungigation-squad\iexplorer6\ bot

Best,
Michal
 

News

News RSS RSS feed for News link



Pogamut

Quarterly RSS RSS feed for quarterly reports

Acknowledgement

This work is supported by GA UK 1053/2007/A-INF/MFF (2007-8), GA UK 351/2006/A-INF/MFF (2006-8), the Ministry of Education of the Czech Republic (grant MSM0021620838) (2008-9), by the Program "Information Society" under project 1ET100300517 (2006-9), and the project Integration of IT Tools into Education of Humanities (2006-8) and by the project CZ.2.17/3.1.00/31162, which are financed by the European Social Fund, the state budget of the Czech Republic, and by the budget of Municipal House Prague.