/*
MobileRobots Advanced Robotics Navigation and Localization (ARNL)
Version 1.7.1

Copyright (C) 2004, 2005 ActivMedia Robotics LLC
Copyright (C) 2006, 2007, 2008, 2009 MobileRobots Inc.

All Rights Reserved.

MobileRobots Inc does not make any representations about the
suitability of this software for any purpose.  It is provided "as is"
without express or implied warranty.

The license for this software is distributed as LICENSE.txt in the top
level directory.

robots@mobilerobots.com
MobileRobots
10 Columbia Drive
Amherst, NH 03031
800-639-9481

*/
#include "Arnl.h"

int main(int argc, char **argv)
{
  Aria::init();
  Arnl::init();
  

  ArRobot robot;
  ArSick sick;
  ArMap arMap;
  ArSonarDevice sonar;
  robot.addRangeDevice(&sonar);

  // Create ARNL objects that use configuration parameters:
  ArLocalizationManager locManager(&robot, &arMap);
#ifdef ARNL
  ArLocalizationTask laserLocTask(&robot, &sick, &arMap);
  locManager.addLocalizationTask(&laserLocTask);
#endif
#ifdef SONARNL
  ArSonarLocalizationTask sonarLocTask(&robot, &sonar, &arMap);
  locManager.addLocalizationTask(&sonarLocTask);
#endif
#ifdef MOGS
  ArGPS gps;
  ArGPSLocalizationTask gpsLocTask(&robot, &gps, &arMap);
  locManager.addLocalizationTask(&gpsLocTask);
#endif

  ArPathPlanningTask pathTask(&robot, &sick, &sonar, &arMap);
  
  Aria::getConfig()->writeFile("params/arnl.p");
  Aria::getConfig()->writeFile("params/default-arnl.p");
  exit(0);
}
