From reed at mobilerobots.com Mon Mar 1 17:02:12 2010 From: reed at mobilerobots.com (Reed Hedges) Date: Mon, 01 Mar 2010 17:02:12 -0500 Subject: [Pioneer-users] Activating a virtual P3DX in MobileSim from within Prolog In-Reply-To: <95090728262764873061544669028716884598-Webmail@me.com> References: <95090728262764873061544669028716884598-Webmail@me.com> Message-ID: <4B8C3964.3050904@mobilerobots.com> Hello, I don't know very much about Prolog, but if it has a function that executes any command via the system, then you can use that to run your existing ARIA program (after building it in Visual Studio). (Similarly, you could launch MobileSim with this function.) It's possible that Prolog has some kind of interface to C++ libraries; if it does then you may be able to use ARIA directly from Prolog. You would need to check with the Prolog documentation and with actual Prolog users on how to do these things though. Reed H . Miri wrote: > Hello, > > My question concerns how to establish contact with MobileSim to run a virtual P3DX. > > Normally, I would launch Microsoft Visual Studio 2008 (in Windows obviously) and MobileSim. By pressing F5 I could build and compile any ARIA program which will try to connect to a simulator first. So, it will connect to my MobileSim and run the virtual P3DX. How can I do this by calling the C++ program from Prolog? > > Assume that I have the following Prolog code snippet: > > start:- > consult( ' Testbeds/Simulation.pl ' ). > > Now, if I consult this and then type 'start.' at the prompt, it will run the 'Simulation.pl' file located in the 'Testbeds' folder. How should I call a C++ ARIA program in Prolog in order to get it to BUILD and COMPILE the program - not through the command line, but through the Microsoft Visual Studio 2008 - so that it will start running my P3DX in MobileSim by just consulting that Prolog code? > > Thanks, > _______________________________________________ > Pioneer-users mailing list > Pioneer-users at lists.mobilerobots.com > http://lists.mobilerobots.com/mailman/listinfo/pioneer-users > > To unsubscribe visit the above webpage or send an e-mail to: > > pioneer-users-leave at lists.mobilerobots.com > > > Visit http://robots.mobilerobots.com for information including documentation, FAQ, tips, manuals, and software, firmware and driver downloads. > From hmiri at mac.com Wed Mar 3 15:14:22 2010 From: hmiri at mac.com (H . Miri) Date: Wed, 03 Mar 2010 20:14:22 +0000 Subject: [Pioneer-users] Activating a virtual P3DX in MobileSim In-Reply-To: <79727762537973951296332668550160852500-Webmail@me.com> References: <79727762537973951296332668550160852500-Webmail@me.com> Message-ID: <7594307069122210919889989123092226602-Webmail@me.com> Hello, I am trying to launch MobileSim and then VS2008 through the command line. I am actually trying to automate this process by writing a simple batch file: @echo off start cmd.exe cd C:\Program Files\MobileRobots\MobileSim MobileSim -m AMROffice.map -r p3dx cd C:\Program Files\MobileRobots\Aria\examples msbuild myProg.sln myProg.sln start "C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\myProg.exe" The strange thing is that when I run the batch srcipt and the command prompt pops up and MobileSim launches, myProg doesn't get built and compiled and VS2008 doesn't start up (this would happen as expected when there is no mention of MobileSim). But once I CLOSE DOWN MobileSim, VS2008 launches and compiles myProg (as if MobileSim was holding up some process). So basically as soon as I exit MobileSim, the command line shows myProg to be built and compiled and VS2008 immediately starts up. Am I doing something wrong? Does anyone have any experience with launching these two Aria apps simultaneously through the command prompt and running them together? Thank you, From srikant.s.iyer at gmail.com Thu Mar 4 02:10:40 2010 From: srikant.s.iyer at gmail.com (Srikant Iyer) Date: Wed, 3 Mar 2010 23:10:40 -0800 Subject: [Pioneer-users] Compiling ARIA using MinGW on Windows Message-ID: <4db838d11003032310i2df80345obd39b0872ca86ca6@mail.gmail.com> Hello, Is it possible to compile ARIA and programs using it on Windows using MinGW, like using GNU GCC on Linux? I'm using Code::Blocks with MinGW on Windows. GNU GCC worked fine on Linux: I put together the source files, and included librt, libpthread, libdl from the GCC\lib folder in both the library (to compile and get a .so file) and in the programs using it. They ran and I saw the output on MobileSim too. However, the robot's own on-board computer has Windows, and I've installed Code::Blocks with MinGW on it, and would like to write and compile my ARIA C++ programs using it. Putting together ARIA source, libwinmm.a and libws_32.a compiles and links to a .dll, but when I try compiling a program using the created .a and libwinmm.a and libws_32.a, I get a series of "Function definition marked dllimport" errors. Srikant -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.mobilerobots.com/pipermail/pioneer-users/attachments/20100303/97b4a966/attachment.html From didmm.arss at gmail.com Sat Mar 6 10:22:35 2010 From: didmm.arss at gmail.com (Didem ARAS) Date: Sat, 6 Mar 2010 17:22:35 +0200 Subject: [Pioneer-users] Aria example error Message-ID: <414ce711003060722m3d410b7fy789ee875ecd44f18@mail.gmail.com> the code I have written is: but when I build it,it gives an error..I couldn't correct it, I've written the error also Can you help me please??? int _tmain(int argc, _TCHAR* argv[]) { Aria::init(); ArArgumentParser argParser(&argc, argv); argParser.loadDefaultArguments(); ArRobot robot; ArRobotConnector robotConnector(&argParser, &robot); ArLaserConnector laserConnector(&argParser, &robot, &robotConnector); // Always try to connect to the first laser: argParser.addDefaultArgument("-connectLaser"); if(!robotConnector.connectRobot()) { ArLog::log(ArLog::Terse, "Could not connect to the robot."); if(argParser.checkHelpAndWarnUnparsed()) { // -help not given, just exit. Aria::logOptions(); Aria::exit(1); } } // Trigger argument parsing if (!Aria::parseArgs() || !argParser.checkHelpAndWarnUnparsed()) { Aria::logOptions(); Aria::exit(1); } ArKeyHandler keyHandler; Aria::setKeyHandler(&keyHandler); robot.attachKeyHandler(&keyHandler); puts("This program will make the robot wander around. It uses some avoidance\n" "actions if obstacles are detected, otherwise it just has a\n" "constant forward velocity.\n\nPress CTRL-C or Escape to exit."); ArSonarDevice sonar; robot.addRangeDevice(&sonar); robot.runAsync(true); // try to connect to laser. if fail, warn but continue, using sonar only if(!laserConnector.connectLasers()) { ArLog::log(ArLog::Normal, "Warning: unable to connect to requested lasers, will wander using robot sonar only."); } // turn on the motors, turn off amigobot sounds robot.enableMotors(); robot.comInt(ArCommands::SOUNDTOG, 0); // add a set of actions that combine together to effect the wander behavior ArActionStallRecover recover; ArActionBumpers bumpers; ArActionAvoidFront avoidFrontNear("Avoid Front Near", 225, 0); ArActionAvoidFront avoidFrontFar; ArActionConstantVelocity constantVelocity("Constant Velocity", 400); robot.addAction(&recover, 100); robot.addAction(&bumpers, 75); robot.addAction(&avoidFrontNear, 50); robot.addAction(&avoidFrontFar, 49); robot.addAction(&constantVelocity, 25); // wait for robot task loop to end before exiting the program robot.waitForRunExit(); Aria::exit(0); } Error 1 error C2664: 'ArArgumentParser::ArArgumentParser(int *,char **)' : cannot convert parameter 2 from '_TCHAR *[]' to 'char **' c:\users\d?dem\documents\visual studio 2008\projects\ariaaa\ariaaa\ariaaa.cpp 13 Ariaaa -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.mobilerobots.com/pipermail/pioneer-users/attachments/20100306/cc921a3c/attachment.html From srikant.s.iyer at gmail.com Sun Mar 7 06:46:55 2010 From: srikant.s.iyer at gmail.com (Srikant Iyer) Date: Sun, 7 Mar 2010 17:16:55 +0530 Subject: [Pioneer-users] Compiling ARIA using MinGW on Windows In-Reply-To: <4db838d11003032310i2df80345obd39b0872ca86ca6@mail.gmail.com> References: <4db838d11003032310i2df80345obd39b0872ca86ca6@mail.gmail.com> Message-ID: <4db838d11003070346s1b199875tc8e70cddf9826584@mail.gmail.com> Hello, Has no one ever tried compilers other than Microsoft Visual C++ on Windows? In any case, I've tried asking on both Codeblocks and MinGW forums and received little help, what could cause this "Function definition marked dllimport" error normally? Srikant On 4 March 2010 12:40, Srikant Iyer wrote: > Hello, > > Is it possible to compile ARIA and programs using it on Windows using > MinGW, like using GNU GCC on Linux? I'm using Code::Blocks with MinGW on > Windows. GNU GCC worked fine on Linux: I put together the source files, and > included librt, libpthread, libdl from the GCC\lib folder in both the > library (to compile and get a .so file) and in the programs using it. They > ran and I saw the output on MobileSim too. > > However, the robot's own on-board computer has Windows, and I've installed > Code::Blocks with MinGW on it, and would like to write and compile my ARIA > C++ programs using it. > > Putting together ARIA source, libwinmm.a and libws_32.a compiles and links > to a .dll, but when I try compiling a program using the created .a and > libwinmm.a and libws_32.a, I get a series of "Function definition marked > dllimport" errors. > > Srikant > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.mobilerobots.com/pipermail/pioneer-users/attachments/20100307/94fca5b3/attachment.html From tsokas at ekt.gr Sun Mar 7 07:11:03 2010 From: tsokas at ekt.gr (tsokas at ekt.gr) Date: Sun, 7 Mar 2010 14:11:03 +0200 (EET) Subject: [Pioneer-users] Aria example error In-Reply-To: <414ce711003060722m3d410b7fy789ee875ecd44f18@mail.gmail.com> References: <414ce711003060722m3d410b7fy789ee875ecd44f18@mail.gmail.com> Message-ID: Hi, Since you are not going to pass any real unicode argument, try the following: typedef char* PCHAR; int _tmain(int argc, _TCHAR* argv[]) { PCHAR* myArgv = new PCHAR[argc]; for (int i=0; i the code I have written is: > but when I build it,it gives an error..I couldn't correct it, I've written > the error also > Can you help me please??? > int _tmain(int argc, _TCHAR* argv[]) > { > Aria::init(); > > ArArgumentParser argParser(&argc, argv); > argParser.loadDefaultArguments(); > ArRobot robot; > ArRobotConnector robotConnector(&argParser, &robot); > ArLaserConnector laserConnector(&argParser, &robot, &robotConnector); > > // Always try to connect to the first laser: > argParser.addDefaultArgument("-connectLaser"); > > if(!robotConnector.connectRobot()) > { > ArLog::log(ArLog::Terse, "Could not connect to the robot."); > if(argParser.checkHelpAndWarnUnparsed()) > { > // -help not given, just exit. > Aria::logOptions(); > Aria::exit(1); > } > } > > > // Trigger argument parsing > if (!Aria::parseArgs() || !argParser.checkHelpAndWarnUnparsed()) > { > Aria::logOptions(); > Aria::exit(1); > } > > ArKeyHandler keyHandler; > Aria::setKeyHandler(&keyHandler); > robot.attachKeyHandler(&keyHandler); > > puts("This program will make the robot wander around. It uses some > avoidance\n" > "actions if obstacles are detected, otherwise it just has a\n" > "constant forward velocity.\n\nPress CTRL-C or Escape to exit."); > > ArSonarDevice sonar; > robot.addRangeDevice(&sonar); > > robot.runAsync(true); > > > // try to connect to laser. if fail, warn but continue, using sonar only > if(!laserConnector.connectLasers()) > { > ArLog::log(ArLog::Normal, "Warning: unable to connect to requested > lasers, will wander using robot sonar only."); > } > > > // turn on the motors, turn off amigobot sounds > robot.enableMotors(); > robot.comInt(ArCommands::SOUNDTOG, 0); > > // add a set of actions that combine together to effect the wander > behavior > ArActionStallRecover recover; > ArActionBumpers bumpers; > ArActionAvoidFront avoidFrontNear("Avoid Front Near", 225, 0); > ArActionAvoidFront avoidFrontFar; > ArActionConstantVelocity constantVelocity("Constant Velocity", 400); > robot.addAction(&recover, 100); > robot.addAction(&bumpers, 75); > robot.addAction(&avoidFrontNear, 50); > robot.addAction(&avoidFrontFar, 49); > robot.addAction(&constantVelocity, 25); > > // wait for robot task loop to end before exiting the program > robot.waitForRunExit(); > > Aria::exit(0); > } > > Error 1 error C2664: 'ArArgumentParser::ArArgumentParser(int *,char **)' : > cannot convert parameter 2 from '_TCHAR *[]' to 'char **' > c:\users\d?dem\documents\visual > studio 2008\projects\ariaaa\ariaaa\ariaaa.cpp 13 Ariaaa > _______________________________________________ > Pioneer-users mailing list > Pioneer-users at lists.mobilerobots.com > http://lists.mobilerobots.com/mailman/listinfo/pioneer-users > > To unsubscribe visit the above webpage or send an e-mail to: > > pioneer-users-leave at lists.mobilerobots.com > > > Visit http://robots.mobilerobots.com for information including > documentation, FAQ, tips, manuals, and software, firmware and driver > downloads. > From reed at mobilerobots.com Mon Mar 8 15:48:57 2010 From: reed at mobilerobots.com (Reed Hedges) Date: Mon, 08 Mar 2010 15:48:57 -0500 Subject: [Pioneer-users] Compiling ARIA using MinGW on Windows In-Reply-To: <4db838d11003032310i2df80345obd39b0872ca86ca6@mail.gmail.com> References: <4db838d11003032310i2df80345obd39b0872ca86ca6@mail.gmail.com> Message-ID: <4B9562B9.3000309@mobilerobots.com> Hi Srikant, I have not tried building all of the library in MinGW but I have used parts of it on MinGW (to build MobileSim). The main thing is that if the WIN32 proprocessor symbol is defined, ARIA assumes the Visual Studio environment and Win32 libraries. You can modify ariaOSDef.h to skip the Visual C++ related actions if a "MINGW" variable is defined. (e.g. something like: #ifdef WIN32 #ifndef MINGW ... #endif #endif Then, in your Makefile or IDE, define the MINGW preprocessor symbol when building any coder (i.e. add -DMINGW to compile settings). In ariaTypedefs.h, do the same thing to avoid defining AREXPORT, e.g.: #ifdef WIN32 #if !defined(ARIA_STATIC) && !defined(AREXPORT) && !defined(MINGW) #define AREXPORT _declspec(dllimport) #elif !defined(AREXPORT) #define AREXPORT #endif This will result in AREXPORT being nothing on MINGW. I think this should solve the errors about dllimport you are getting (_declspec(dllimport) is specific to Visual C++ DLL's) You will probably want to use ArSocket_WIN.cpp however, not ArSocket_LIN.cpp, but you may want to use a Windows port of the pthreads library and use ArMutex_LIN.cpp, ArThread_LIN.cpp, etc. You may need to make other minor changes to some files. Post any further issues you run into to this list or aria-users. Reed Srikant Iyer wrote: > Hello, > > Is it possible to compile ARIA and programs using it on Windows using > MinGW, like using GNU GCC on Linux? I'm using Code::Blocks with MinGW on > Windows. GNU GCC worked fine on Linux: I put together the source files, > and included librt, libpthread, libdl from the GCC\lib folder in both > the library (to compile and get a .so file) and in the programs using > it. They ran and I saw the output on MobileSim too. > > However, the robot's own on-board computer has Windows, and I've > installed Code::Blocks with MinGW on it, and would like to write and > compile my ARIA C++ programs using it. > > Putting together ARIA source, libwinmm.a and libws_32.a compiles and > links to a .dll, but when I try compiling a program using the created .a > and libwinmm.a and libws_32.a, I get a series of "Function definition > marked dllimport" errors. > > Srikant > > > ------------------------------------------------------------------------ > > _______________________________________________ > Pioneer-users mailing list > Pioneer-users at lists.mobilerobots.com > http://lists.mobilerobots.com/mailman/listinfo/pioneer-users > > To unsubscribe visit the above webpage or send an e-mail to: > > pioneer-users-leave at lists.mobilerobots.com > > > Visit http://robots.mobilerobots.com for information including documentation, FAQ, tips, manuals, and software, firmware and driver downloads. From reed at mobilerobots.com Mon Mar 8 16:26:44 2010 From: reed at mobilerobots.com (Reed Hedges) Date: Mon, 08 Mar 2010 16:26:44 -0500 Subject: [Pioneer-users] Activating a virtual P3DX in MobileSim In-Reply-To: <7594307069122210919889989123092226602-Webmail@me.com> References: <79727762537973951296332668550160852500-Webmail@me.com> <7594307069122210919889989123092226602-Webmail@me.com> Message-ID: <4B956B94.7080207@mobilerobots.com> Hello, I think what's happening here is that your batch file is waiting for the MobileSim command to complete before continuing. As far as I know there is no way to run a command "in the background" in a Windows batch file, but maybe other users know a way that I don't? Reed H . Miri wrote: > Hello, > > I am trying to launch MobileSim and then VS2008 through the command line. I am actually trying to automate this process by writing a simple batch file: > > @echo off > start cmd.exe > cd C:\Program Files\MobileRobots\MobileSim > MobileSim -m AMROffice.map -r p3dx > cd C:\Program Files\MobileRobots\Aria\examples > msbuild myProg.sln > myProg.sln > start "C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\myProg.exe" > > The strange thing is that when I run the batch srcipt and the command prompt pops up and MobileSim launches, myProg doesn't get built and compiled and VS2008 doesn't start up (this would happen as expected when there is no mention of MobileSim). But once I CLOSE DOWN MobileSim, VS2008 launches and compiles myProg (as if MobileSim was holding up some process). > > So basically as soon as I exit MobileSim, the command line shows myProg to be built and compiled and VS2008 immediately starts up. > > Am I doing something wrong? Does anyone have any experience with launching these two Aria apps simultaneously through the command prompt and running them together? > > Thank you, > From didmm.arss at gmail.com Tue Mar 9 18:28:05 2010 From: didmm.arss at gmail.com (Didem ARAS) Date: Wed, 10 Mar 2010 01:28:05 +0200 Subject: [Pioneer-users] Pioneer-users Digest, Vol 21, Issue 2 In-Reply-To: References: Message-ID: <414ce711003091528k7d724103j1671ffaaa255ebc9@mail.gmail.com> I thank for the answer.I have tried the solution you said but it did'nt work again. Is there another solution I can try? 2010/3/8 > Send Pioneer-users mailing list submissions to > pioneer-users at lists.mobilerobots.com > > To subscribe or unsubscribe via the World Wide Web, visit > http://lists.mobilerobots.com/mailman/listinfo/pioneer-users > or, via email, send a message with subject or body 'help' to > pioneer-users-request at lists.mobilerobots.com > > You can reach the person managing the list at > pioneer-users-owner at lists.mobilerobots.com > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Pioneer-users digest..." > > > Today's Topics: > > 1. Compiling ARIA using MinGW on Windows (Srikant Iyer) > 2. Aria example error (Didem ARAS) > 3. Re: Compiling ARIA using MinGW on Windows (Srikant Iyer) > 4. Re: Aria example error (tsokas at ekt.gr) > 5. Re: Compiling ARIA using MinGW on Windows (Reed Hedges) > 6. Re: Activating a virtual P3DX in MobileSim (Reed Hedges) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Wed, 3 Mar 2010 23:10:40 -0800 > From: Srikant Iyer > Subject: [Pioneer-users] Compiling ARIA using MinGW on Windows > To: pioneer-users at lists.mobilerobots.com > Message-ID: > <4db838d11003032310i2df80345obd39b0872ca86ca6 at mail.gmail.com> > Content-Type: text/plain; charset="iso-8859-1" > > Hello, > > Is it possible to compile ARIA and programs using it on Windows using > MinGW, > like using GNU GCC on Linux? I'm using Code::Blocks with MinGW on Windows. > GNU GCC worked fine on Linux: I put together the source files, and included > librt, libpthread, libdl from the GCC\lib folder in both the library (to > compile and get a .so file) and in the programs using it. They ran and I > saw > the output on MobileSim too. > > However, the robot's own on-board computer has Windows, and I've installed > Code::Blocks with MinGW on it, and would like to write and compile my ARIA > C++ programs using it. > > Putting together ARIA source, libwinmm.a and libws_32.a compiles and links > to a .dll, but when I try compiling a program using the created .a and > libwinmm.a and libws_32.a, I get a series of "Function definition marked > dllimport" errors. > > Srikant > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > http://lists.mobilerobots.com/pipermail/pioneer-users/attachments/20100303/97b4a966/attachment-0001.html > > ------------------------------ > > Message: 2 > Date: Sat, 6 Mar 2010 17:22:35 +0200 > From: Didem ARAS > Subject: [Pioneer-users] Aria example error > To: pioneer-users at lists.mobilerobots.com > Message-ID: > <414ce711003060722m3d410b7fy789ee875ecd44f18 at mail.gmail.com> > Content-Type: text/plain; charset="iso-8859-9" > > the code I have written is: > but when I build it,it gives an error..I couldn't correct it, I've written > the error also > Can you help me please??? > int _tmain(int argc, _TCHAR* argv[]) > { > Aria::init(); > > ArArgumentParser argParser(&argc, argv); > argParser.loadDefaultArguments(); > ArRobot robot; > ArRobotConnector robotConnector(&argParser, &robot); > ArLaserConnector laserConnector(&argParser, &robot, &robotConnector); > > // Always try to connect to the first laser: > argParser.addDefaultArgument("-connectLaser"); > > if(!robotConnector.connectRobot()) > { > ArLog::log(ArLog::Terse, "Could not connect to the robot."); > if(argParser.checkHelpAndWarnUnparsed()) > { > // -help not given, just exit. > Aria::logOptions(); > Aria::exit(1); > } > } > > > // Trigger argument parsing > if (!Aria::parseArgs() || !argParser.checkHelpAndWarnUnparsed()) > { > Aria::logOptions(); > Aria::exit(1); > } > > ArKeyHandler keyHandler; > Aria::setKeyHandler(&keyHandler); > robot.attachKeyHandler(&keyHandler); > > puts("This program will make the robot wander around. It uses some > avoidance\n" > "actions if obstacles are detected, otherwise it just has a\n" > "constant forward velocity.\n\nPress CTRL-C or Escape to exit."); > > ArSonarDevice sonar; > robot.addRangeDevice(&sonar); > > robot.runAsync(true); > > > // try to connect to laser. if fail, warn but continue, using sonar only > if(!laserConnector.connectLasers()) > { > ArLog::log(ArLog::Normal, "Warning: unable to connect to requested > lasers, will wander using robot sonar only."); > } > > > // turn on the motors, turn off amigobot sounds > robot.enableMotors(); > robot.comInt(ArCommands::SOUNDTOG, 0); > > // add a set of actions that combine together to effect the wander > behavior > ArActionStallRecover recover; > ArActionBumpers bumpers; > ArActionAvoidFront avoidFrontNear("Avoid Front Near", 225, 0); > ArActionAvoidFront avoidFrontFar; > ArActionConstantVelocity constantVelocity("Constant Velocity", 400); > robot.addAction(&recover, 100); > robot.addAction(&bumpers, 75); > robot.addAction(&avoidFrontNear, 50); > robot.addAction(&avoidFrontFar, 49); > robot.addAction(&constantVelocity, 25); > > // wait for robot task loop to end before exiting the program > robot.waitForRunExit(); > > Aria::exit(0); > } > > Error 1 error C2664: 'ArArgumentParser::ArArgumentParser(int *,char **)' : > cannot convert parameter 2 from '_TCHAR *[]' to 'char **' > c:\users\d?dem\documents\visual > studio 2008\projects\ariaaa\ariaaa\ariaaa.cpp 13 Ariaaa > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > http://lists.mobilerobots.com/pipermail/pioneer-users/attachments/20100306/cc921a3c/attachment-0001.html > > ------------------------------ > > Message: 3 > Date: Sun, 7 Mar 2010 17:16:55 +0530 > From: Srikant Iyer > Subject: Re: [Pioneer-users] Compiling ARIA using MinGW on Windows > To: pioneer-users at lists.mobilerobots.com > Message-ID: > <4db838d11003070346s1b199875tc8e70cddf9826584 at mail.gmail.com> > Content-Type: text/plain; charset="iso-8859-1" > > Hello, > > Has no one ever tried compilers other than Microsoft Visual C++ on Windows? > In any case, I've tried asking on both Codeblocks and MinGW forums and > received little help, what could cause this "Function definition marked > dllimport" error normally? > > Srikant > > On 4 March 2010 12:40, Srikant Iyer wrote: > > > Hello, > > > > Is it possible to compile ARIA and programs using it on Windows using > > MinGW, like using GNU GCC on Linux? I'm using Code::Blocks with MinGW on > > Windows. GNU GCC worked fine on Linux: I put together the source files, > and > > included librt, libpthread, libdl from the GCC\lib folder in both the > > library (to compile and get a .so file) and in the programs using it. > They > > ran and I saw the output on MobileSim too. > > > > However, the robot's own on-board computer has Windows, and I've > installed > > Code::Blocks with MinGW on it, and would like to write and compile my > ARIA > > C++ programs using it. > > > > Putting together ARIA source, libwinmm.a and libws_32.a compiles and > links > > to a .dll, but when I try compiling a program using the created .a and > > libwinmm.a and libws_32.a, I get a series of "Function definition marked > > dllimport" errors. > > > > Srikant > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > http://lists.mobilerobots.com/pipermail/pioneer-users/attachments/20100307/94fca5b3/attachment-0001.html > > ------------------------------ > > Message: 4 > Date: Sun, 7 Mar 2010 14:11:03 +0200 (EET) > From: tsokas at ekt.gr > Subject: Re: [Pioneer-users] Aria example error > To: didmm.arss at gmail.com > Cc: pioneer-users at lists.mobilerobots.com > Message-ID: > Content-Type: text/plain;charset=iso-8859-7 > > Hi, > > Since you are not going to pass any real unicode argument, > try the following: > > typedef char* PCHAR; > int _tmain(int argc, _TCHAR* argv[]) > { > PCHAR* myArgv = new PCHAR[argc]; > for (int i=0; i { > myArgv[i] = new char[wcslen(argv[i])+1]; > for (int j=0; j myArgv[i][j] = (char)(argv[i][j]); > myArgv[i][wcslen(argv[i])] = '\0'; > } > Aria::init(); > ArArgumentParser argParser(&argc, myArgv); > > ... > ... (etc.) all your program goes here > ... > > for (int i=0; i delete [] myArgv[i]; > delete [] myArgv; > > Aria::exit(0); > } > > It should work like this. > > > > Nicolas Tsokas > National Technical University of Athens > > > > > > > the code I have written is: > > but when I build it,it gives an error..I couldn't correct it, I've > written > > the error also > > Can you help me please??? > > int _tmain(int argc, _TCHAR* argv[]) > > { > > Aria::init(); > > > > ArArgumentParser argParser(&argc, argv); > > argParser.loadDefaultArguments(); > > ArRobot robot; > > ArRobotConnector robotConnector(&argParser, &robot); > > ArLaserConnector laserConnector(&argParser, &robot, &robotConnector); > > > > // Always try to connect to the first laser: > > argParser.addDefaultArgument("-connectLaser"); > > > > if(!robotConnector.connectRobot()) > > { > > ArLog::log(ArLog::Terse, "Could not connect to the robot."); > > if(argParser.checkHelpAndWarnUnparsed()) > > { > > // -help not given, just exit. > > Aria::logOptions(); > > Aria::exit(1); > > } > > } > > > > > > // Trigger argument parsing > > if (!Aria::parseArgs() || !argParser.checkHelpAndWarnUnparsed()) > > { > > Aria::logOptions(); > > Aria::exit(1); > > } > > > > ArKeyHandler keyHandler; > > Aria::setKeyHandler(&keyHandler); > > robot.attachKeyHandler(&keyHandler); > > > > puts("This program will make the robot wander around. It uses some > > avoidance\n" > > "actions if obstacles are detected, otherwise it just has a\n" > > "constant forward velocity.\n\nPress CTRL-C or Escape to exit."); > > > > ArSonarDevice sonar; > > robot.addRangeDevice(&sonar); > > > > robot.runAsync(true); > > > > > > // try to connect to laser. if fail, warn but continue, using sonar > only > > if(!laserConnector.connectLasers()) > > { > > ArLog::log(ArLog::Normal, "Warning: unable to connect to requested > > lasers, will wander using robot sonar only."); > > } > > > > > > // turn on the motors, turn off amigobot sounds > > robot.enableMotors(); > > robot.comInt(ArCommands::SOUNDTOG, 0); > > > > // add a set of actions that combine together to effect the wander > > behavior > > ArActionStallRecover recover; > > ArActionBumpers bumpers; > > ArActionAvoidFront avoidFrontNear("Avoid Front Near", 225, 0); > > ArActionAvoidFront avoidFrontFar; > > ArActionConstantVelocity constantVelocity("Constant Velocity", 400); > > robot.addAction(&recover, 100); > > robot.addAction(&bumpers, 75); > > robot.addAction(&avoidFrontNear, 50); > > robot.addAction(&avoidFrontFar, 49); > > robot.addAction(&constantVelocity, 25); > > > > // wait for robot task loop to end before exiting the program > > robot.waitForRunExit(); > > > > Aria::exit(0); > > } > > > > Error 1 error C2664: 'ArArgumentParser::ArArgumentParser(int *,char **)' > : > > cannot convert parameter 2 from '_TCHAR *[]' to 'char **' > > c:\users\d?dem\documents\visual > > studio 2008\projects\ariaaa\ariaaa\ariaaa.cpp 13 Ariaaa > > _______________________________________________ > > Pioneer-users mailing list > > Pioneer-users at lists.mobilerobots.com > > http://lists.mobilerobots.com/mailman/listinfo/pioneer-users > > > > To unsubscribe visit the above webpage or send an e-mail to: > > > > pioneer-users-leave at lists.mobilerobots.com > > > > > > Visit http://robots.mobilerobots.com for information including > > documentation, FAQ, tips, manuals, and software, firmware and driver > > downloads. > > > > > > > ------------------------------ > > Message: 5 > Date: Mon, 08 Mar 2010 15:48:57 -0500 > From: Reed Hedges > Subject: Re: [Pioneer-users] Compiling ARIA using MinGW on Windows > To: Srikant Iyer > Cc: pioneer-users at lists.mobilerobots.com > Message-ID: <4B9562B9.3000309 at mobilerobots.com> > Content-Type: text/plain; charset=UTF-8; format=flowed > > > Hi Srikant, > > I have not tried building all of the library in MinGW but I have used parts > of > it on MinGW (to build MobileSim). > > The main thing is that if the WIN32 proprocessor symbol is defined, ARIA > assumes > the Visual Studio environment and Win32 libraries. You can modify > ariaOSDef.h > to skip the Visual C++ related actions if a "MINGW" variable is defined. > (e.g. > something like: > > #ifdef WIN32 > #ifndef MINGW > > ... > > #endif > #endif > > > Then, in your Makefile or IDE, define the MINGW preprocessor symbol when > building any coder (i.e. add -DMINGW to compile settings). > > In ariaTypedefs.h, do the same thing to avoid defining AREXPORT, e.g.: > > #ifdef WIN32 > #if !defined(ARIA_STATIC) && !defined(AREXPORT) && !defined(MINGW) > #define AREXPORT _declspec(dllimport) > #elif !defined(AREXPORT) > #define AREXPORT > #endif > > This will result in AREXPORT being nothing on MINGW. I think this should > solve > the errors about dllimport you are getting (_declspec(dllimport) is > specific to > Visual C++ DLL's) > > > You will probably want to use ArSocket_WIN.cpp however, not > ArSocket_LIN.cpp, > but you may want to use a Windows port of the pthreads library and use > ArMutex_LIN.cpp, ArThread_LIN.cpp, etc. > > You may need to make other minor changes to some files. Post any further > issues > you run into to this list or aria-users. > > Reed > > > > Srikant Iyer wrote: > > Hello, > > > > Is it possible to compile ARIA and programs using it on Windows using > > MinGW, like using GNU GCC on Linux? I'm using Code::Blocks with MinGW on > > Windows. GNU GCC worked fine on Linux: I put together the source files, > > and included librt, libpthread, libdl from the GCC\lib folder in both > > the library (to compile and get a .so file) and in the programs using > > it. They ran and I saw the output on MobileSim too. > > > > However, the robot's own on-board computer has Windows, and I've > > installed Code::Blocks with MinGW on it, and would like to write and > > compile my ARIA C++ programs using it. > > > > Putting together ARIA source, libwinmm.a and libws_32.a compiles and > > links to a .dll, but when I try compiling a program using the created .a > > and libwinmm.a and libws_32.a, I get a series of "Function definition > > marked dllimport" errors. > > > > Srikant > > > > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > Pioneer-users mailing list > > Pioneer-users at lists.mobilerobots.com > > http://lists.mobilerobots.com/mailman/listinfo/pioneer-users > > > > To unsubscribe visit the above webpage or send an e-mail to: > > > > pioneer-users-leave at lists.mobilerobots.com > > > > > > Visit http://robots.mobilerobots.com for information including > documentation, FAQ, tips, manuals, and software, firmware and driver > downloads. > > > > ------------------------------ > > Message: 6 > Date: Mon, 08 Mar 2010 16:26:44 -0500 > From: Reed Hedges > Subject: Re: [Pioneer-users] Activating a virtual P3DX in MobileSim > Cc: pioneer-users at lists.mobilerobots.com > Message-ID: <4B956B94.7080207 at mobilerobots.com> > Content-Type: text/plain; charset=UTF-8; format=flowed > > > Hello, > > I think what's happening here is that your batch file is waiting for the > MobileSim command to complete before continuing. As far as I know there > is no > way to run a command "in the background" in a Windows batch file, but maybe > other users know a way that I don't? > > Reed > > > > H . Miri wrote: > > Hello, > > > > I am trying to launch MobileSim and then VS2008 through the command line. > I am actually trying to automate this process by writing a simple batch > file: > > > > @echo off > > start cmd.exe > > cd C:\Program Files\MobileRobots\MobileSim > > MobileSim -m AMROffice.map -r p3dx > > cd C:\Program Files\MobileRobots\Aria\examples > > msbuild myProg.sln > > myProg.sln > > start "C:\Program Files\Microsoft Visual Studio 9.0\VC\bin\myProg.exe" > > > > The strange thing is that when I run the batch srcipt and the command > prompt pops up and MobileSim launches, myProg doesn't get built and compiled > and VS2008 doesn't start up (this would happen as expected when there is no > mention of MobileSim). But once I CLOSE DOWN MobileSim, VS2008 launches and > compiles myProg (as if MobileSim was holding up some process). > > > > So basically as soon as I exit MobileSim, the command line shows myProg > to be built and compiled and VS2008 immediately starts up. > > > > Am I doing something wrong? Does anyone have any experience with > launching these two Aria apps simultaneously through the command prompt and > running them together? > > > > Thank you, > > > > > > ------------------------------ > > _______________________________________________ > Pioneer-users mailing list > Pioneer-users at lists.mobilerobots.com > http://lists.mobilerobots.com/mailman/listinfo/pioneer-users > > > End of Pioneer-users Digest, Vol 21, Issue 2 > ******************************************** > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.mobilerobots.com/pipermail/pioneer-users/attachments/20100310/93bab430/attachment-0001.html From srikant.s.iyer at gmail.com Wed Mar 10 05:02:39 2010 From: srikant.s.iyer at gmail.com (Srikant Iyer) Date: Wed, 10 Mar 2010 15:32:39 +0530 Subject: [Pioneer-users] Compiling ARIA using MinGW on Windows In-Reply-To: <4B9562B9.3000309@mobilerobots.com> References: <4db838d11003032310i2df80345obd39b0872ca86ca6@mail.gmail.com> <4B9562B9.3000309@mobilerobots.com> Message-ID: <4db838d11003100202s499bb4abr5909f30bb2c73826@mail.gmail.com> Thanks, Reed! I didn't know _declspec(dllimport) was not to be used in MinGW at all! I was able to use the Windows versions of Mutex and Thread itself: adding those #ifdefs and the -DMINGW alone did the job. Srikant On 9 March 2010 02:18, Reed Hedges wrote: > > Hi Srikant, > > I have not tried building all of the library in MinGW but I have used parts > of it on MinGW (to build MobileSim). > > The main thing is that if the WIN32 proprocessor symbol is defined, ARIA > assumes the Visual Studio environment and Win32 libraries. You can modify > ariaOSDef.h to skip the Visual C++ related actions if a "MINGW" variable is > defined. (e.g. something like: > > #ifdef WIN32 > #ifndef MINGW > > ... > > #endif > #endif > > > Then, in your Makefile or IDE, define the MINGW preprocessor symbol when > building any coder (i.e. add -DMINGW to compile settings). > > In ariaTypedefs.h, do the same thing to avoid defining AREXPORT, e.g.: > > #ifdef WIN32 > #if !defined(ARIA_STATIC) && !defined(AREXPORT) && !defined(MINGW) > #define AREXPORT _declspec(dllimport) > #elif !defined(AREXPORT) > #define AREXPORT > #endif > > This will result in AREXPORT being nothing on MINGW. I think this should > solve the errors about dllimport you are getting (_declspec(dllimport) is > specific to Visual C++ DLL's) > > > You will probably want to use ArSocket_WIN.cpp however, not > ArSocket_LIN.cpp, but you may want to use a Windows port of the pthreads > library and use ArMutex_LIN.cpp, ArThread_LIN.cpp, etc. > > You may need to make other minor changes to some files. Post any further > issues you run into to this list or aria-users. > > Reed > > > > Srikant Iyer wrote: > >> Hello, >> >> Is it possible to compile ARIA and programs using it on Windows using >> MinGW, like using GNU GCC on Linux? I'm using Code::Blocks with MinGW on >> Windows. GNU GCC worked fine on Linux: I put together the source files, and >> included librt, libpthread, libdl from the GCC\lib folder in both the >> library (to compile and get a .so file) and in the programs using it. They >> ran and I saw the output on MobileSim too. >> >> However, the robot's own on-board computer has Windows, and I've installed >> Code::Blocks with MinGW on it, and would like to write and compile my ARIA >> C++ programs using it. >> >> Putting together ARIA source, libwinmm.a and libws_32.a compiles and links >> to a .dll, but when I try compiling a program using the created .a and >> libwinmm.a and libws_32.a, I get a series of "Function definition marked >> dllimport" errors. >> >> Srikant >> >> >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> Pioneer-users mailing list >> Pioneer-users at lists.mobilerobots.com >> http://lists.mobilerobots.com/mailman/listinfo/pioneer-users >> >> To unsubscribe visit the above webpage or send an e-mail to: >> >> pioneer-users-leave at lists.mobilerobots.com >> >> >> Visit http://robots.mobilerobots.com for information including >> documentation, FAQ, tips, manuals, and software, firmware and driver >> downloads. >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.mobilerobots.com/pipermail/pioneer-users/attachments/20100310/17d56375/attachment.html From reed at mobilerobots.com Tue Mar 16 17:57:30 2010 From: reed at mobilerobots.com (Reed Hedges) Date: Tue, 16 Mar 2010 17:57:30 -0400 Subject: [Pioneer-users] MobileRobots has a new website Message-ID: <4B9FFECA.7010708@mobilerobots.com> MobileRobots has a new website at Please let us know what you think. Is anything about it confusing? Is it missing any product or other information that you need? We are also starting to share videos, news about MobileRobots and upcoming events, products and projects, etc. on Twitter and Facebook: http://www.facebook.com/pages/MobileRobots-Inc/357632966099 http://www.twitter.com/MobileRobotsInc If you have a publication, video, web page or message about your robotics work you would like to share, send it and we can post it for others to discover. Email this list, or me, or send a message to us on Facebook. On Twitter, I'll see your message if you refer to @MobileRobotsInc, #roboticsresearch, #robotresearch, #roboticseducation, #roboticsedu, #robotedu, or use the name of a product: #pioneer3, #p3dx, #p3at, #amigobot, #powerbot, #peoplebot, #patrolbot, #guiabot, #seekur, #seekurjr, #arnl, #mobilesim. In general, please let me know how we can make these services the most useful for you and your work. Our support site and knowledge base for research customers remains at , check there for software updates and documentation. As always, let me know if there is anything missing or confusing about that site as well. Thanks! Reed -- Reed Hedges Developer Support / Software MobileRobots Inc. Find downloads, documentation, FAQ, mailing lists and more at: From raghu.dasara at gmail.com Wed Mar 31 16:27:29 2010 From: raghu.dasara at gmail.com (raghu dasara) Date: Thu, 1 Apr 2010 01:57:29 +0530 Subject: [Pioneer-users] Plz solve mY query Message-ID: hii i installed vc++ 2008 n Mobile Sim n ARIA i don't know how to include Aria header files(.h n .cpp) how to execute it? -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.mobilerobots.com/pipermail/pioneer-users/attachments/20100401/359bc8f0/attachment.html From raghu.dasara at gmail.com Wed Mar 31 17:49:00 2010 From: raghu.dasara at gmail.com (raghu dasara) Date: Thu, 1 Apr 2010 03:19:00 +0530 Subject: [Pioneer-users] Plz Give me Sol for this Message-ID: ------ Build started: Project: wander, Configuration: Debug Win32 ------ Compiling... wander.cpp Linking... LINK : fatal error LNK1104: cannot open file 'C:\Program Files\MobileRobots\Aria\bin' Creating browse information file... Microsoft Browse Information Maintenance Utility Version 9.00.30729 Copyright (C) Microsoft Corporation. All rights reserved. BSCMAKE: warning BK4501 : ignoring unknown option '/wander.bsc' Build log was saved at "file://c:\Program Files\MobileRobots\Aria\obj\Debug-VC9\wanderBuildLog.htm" wander - 1 error(s), 1 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.mobilerobots.com/pipermail/pioneer-users/attachments/20100401/966b7815/attachment.html