From zati.hakim at gmail.com Wed Sep 3 00:42:36 2008 From: zati.hakim at gmail.com (Zati Hakim) Date: Wed, 3 Sep 2008 16:42:36 +1200 Subject: [Pioneer-users] Updating/Resetting Laser Reading Buffer Message-ID: Dear all, Is there a way to update or refresh the laser reading buffer directly somewhere in this module here? Appreciate any feedback!! #include "Aria.h" int main(int argc, char **argv){ std::vector < ArSensorReading > *readings; std::vector < ArSensorReading > ::iterator it; FILE* dataFile; dataFile = fopen("Laser_log.txt", "w"); fprint (dataFile, "181 2 \n"); sick.lockDevice(); readings = sick.getRawReadingsAsVector(); for (it = readings->begin(); it!=readings->end(); it++){ fprintf( dataFile, " %f %f \n" , (*it).getX(), (*it).getY() ); } /* delete readings; // tested with this code here but generates "invalid pointer: 0xbfffda94" error in runtime */ sick.unlockDevice(); ArUtil::sleep(100); fclose ( dataFile ); } zati -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.mobilerobots.com/pipermail/pioneer-users/attachments/20080903/347744ef/attachment.html From zati.hakim at gmail.com Wed Sep 3 21:51:33 2008 From: zati.hakim at gmail.com (Zati Hakim) Date: Thu, 4 Sep 2008 13:51:33 +1200 Subject: [Pioneer-users] Updating/Resetting the laser reading buffer Message-ID: Dear all, In the interest to my previous question, I reckon that this protected member function "filterReadings()" in the ArSick class is useful. Unfortunately, I do not know how to call it from the module (please refer to my earlier message). i inserted this line: sick.filterReadings(); and this is the compiler error i got: " 'void ArSick::filterReadings()' is protected " Feedback is very much appreciated.. Thx!! zati -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.mobilerobots.com/pipermail/pioneer-users/attachments/20080904/946fa6ef/attachment.html From reed at mobilerobots.com Thu Sep 4 16:21:03 2008 From: reed at mobilerobots.com (Reed Hedges) Date: Thu, 04 Sep 2008 16:21:03 -0400 Subject: [Pioneer-users] Updating/Resetting Laser Reading Buffer In-Reply-To: References: Message-ID: <48C0432F.90901@mobilerobots.com> Zati Hakim wrote: > Dear all, > > Is there a way to update or refresh the laser reading buffer directly > somewhere in this module here? Appreciate any feedback!! The laser readings are automatically updated by ArSick's thread as they are read from the laser. This thread is started by calling runAsync(). Is this what you are asking about? Can you give more details about what you are trying to do or what problem if any you are encountering? (Also, regarding your code excerpt, note that getRawReadingsAsVector() is returning a pointer to an internal member of ArSick, so deleting it will cause an error when ArSick tries to use it.) Reed > > #include "Aria.h" > > int main(int argc, char **argv){ > > std::vector < ArSensorReading > *readings; > std::vector < ArSensorReading > ::iterator it; > > FILE* dataFile; > dataFile = fopen("Laser_log.txt", "w"); > fprint (dataFile, "181 2 \n"); > > sick.lockDevice(); > > readings = sick.getRawReadingsAsVector(); > > for (it = readings->begin(); it!=readings->end(); it++){ > fprintf( dataFile, " %f %f \n" , (*it).getX(), (*it).getY() ); > } > > /* > delete readings; // tested with this code here but generates > "invalid pointer: 0xbfffda94" error in runtime > > */ > > sick.unlockDevice(); > > ArUtil::sleep(100); > > fclose ( dataFile ); > > > } > > > > zati > > > ------------------------------------------------------------------------ > > _______________________________________________ > 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 From reed at mobilerobots.com Thu Sep 4 16:22:24 2008 From: reed at mobilerobots.com (Reed Hedges) Date: Thu, 04 Sep 2008 16:22:24 -0400 Subject: [Pioneer-users] Updating/Resetting the laser reading buffer In-Reply-To: References: Message-ID: <48C04380.4030307@mobilerobots.com> Zati Hakim wrote: > Dear all, > > In the interest to my previous question, I reckon that this protected > member function "filterReadings()" in the ArSick class is useful. > Unfortunately, I do not know how to call it from the module (please > refer to my earlier message). ArSick uses this method internally when storing readings. You can modify how it filters readings using the methods whose names start with setFilter... Reed From zati.hakim at gmail.com Tue Sep 9 08:59:15 2008 From: zati.hakim at gmail.com (Zati Hakim) Date: Wed, 10 Sep 2008 00:59:15 +1200 Subject: [Pioneer-users] Updating/Resetting the laser reading buffer In-Reply-To: <48C04380.4030307@mobilerobots.com> References: <48C04380.4030307@mobilerobots.com> Message-ID: Hello Reed, Thank you very much for your kind suggestion, I realized now that internal functions (such as the filterReadings() in ArSick ) can never ever be called outside its class.. upon realizing this mistake I happen to look back into the CollectLaser module I created and tried this instead.. : : for (it = readings->begin(); it!=readings->end(); it++){ fprintf( dataFile, " %f %f \n" , (*it).get*Local*X(), (*it).get*Local* Y()) } : The small change has given me the result I wanted. Now, if I loop this module while continuously moving/turning the robot elsewhere (without ever exiting Aria), my dataFile is now getting fresh set of laser data according to the current 'scene' or 'environment' the robot is seeing. Previously, only the first scan is fresh, the rest were a carbon copy of the first scan. Thanks, Zati On Fri, Sep 5, 2008 at 8:22 AM, Reed Hedges wrote: > Zati Hakim wrote: > > Dear all, > > > > In the interest to my previous question, I reckon that this protected > > member function "filterReadings()" in the ArSick class is useful. > > Unfortunately, I do not know how to call it from the module (please > > refer to my earlier message). > > ArSick uses this method internally when storing readings. > > You can modify how it filters readings using the methods whose names start > with > setFilter... > > > Reed > > > > _______________________________________________ > 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 > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.mobilerobots.com/pipermail/pioneer-users/attachments/20080910/5b914989/attachment-0001.html From Christoph.Neumann at rub.de Fri Sep 19 03:59:22 2008 From: Christoph.Neumann at rub.de (Christoph Neumann) Date: Fri, 19 Sep 2008 09:59:22 +0200 Subject: [Pioneer-users] General questions and comments of interest to Pioneer community. Message-ID: <48D35BDA.2050208@rub.de> Hello, I occasionally get this error message. It interrupts the robot and I lose control. A few seconds later it just works fine. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Warning: Task 'Key Handler' took 1963 ms to run (longer than the 250 warning time) Warning: ArRobot sync tasks too long at 2073 ms, (100 ms normal 250 ms warning) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% In my Program I use laser scanner measurement to get distance and angle of the robot: Thanks for your help. #include "Aria.h" //#include //#include #include #include "stdafx.h" #include #define PI 3.14159265 int main(int argc, char** argv) { Aria::init(); ArSimpleConnector connector(&argc, argv); ArRobot robot; ArSick sick; //ArPose RobotPose; ArMath maths; //ArSonarDevice sonarDev; ArActionInput action; ArKeyHandler keyHandler; Aria::setKeyHandler(&keyHandler); robot.attachKeyHandler(&keyHandler); int k1,t1,mse; double dist, angle, Theta3,xx,yglo, t; float yki1, yki2, yk1, yk2, eix_1,eiy_1, ex2, ey2, eix, eiy, velR, velL, Theta4, Theta5, y2_messung, y2_gewunscht, Theta2, Vsoll, winkel,r,b,vL,vR,wL,wR,y1_mess,Theta,sT,Theta1,y1,y2_mess,y2_mess1,y2,W,GetW,Getw,Getvel, GetVel,Vel,vel,w,dy1,deix_1,kp,vf; std::list *readings; std::list::iterator it; bool found; if (!connector.parseArgs() || argc > 1) { connector.logOptions(); exit(1); } //robot.addRangeDevice(&sonarDev); // add the sonar to the robot robot.addRangeDevice(&sick); if (!connector.connectRobot(&robot)) { printf("Could not connect to Robot \n"); Aria::exit(2); } robot.runAsync(true); robot.lock(); robot.comInt(ArCommands::ENABLE, 1); robot.unlock(); connector.setupLaser(&sick); sick.runAsync(); if (!sick.blockingConnect()) { printf("Could not connect to SICK laser... exiting\n"); Aria::shutdown(); return 1; } printf("Connected\n"); //////////////////////LASER SCANNER MEASUREMENT//////////////////////// Theta2= -Theta; Theta3= int(Theta2); Theta4=Theta3-30; Theta5=Theta3+30; sick.lockDevice(); dist=sick.currentReadingPolar(-90,90,&angle); y2_messung=dist+100; winkel=angle; sick.unlockDevice(); ////////////////////////////////////////////////////////////////////////////////////////////////////// ) ////Ausgabewerte///////////////////////// printf(" %1.0f ",y1); //x printf(" %1.0f ",xx);//xmess printf(" %1.0f ",y2_gewunscht); //y soll printf(" %1.0f ",y2_messung);//ymess printf(" %1.0f ",yglo); printf("%d \n",mse); // Zeit in ms mse = mse+sT; ArUtil::sleep((sT)); } robot.stop(); sick.disconnect(); fflush(stdout); robot.waitForRunExit(); // Roboter wird beendet system("pause"); Aria::exit(0); } From reed at mobilerobots.com Fri Sep 19 09:14:00 2008 From: reed at mobilerobots.com (Reed Hedges) Date: Fri, 19 Sep 2008 09:14:00 -0400 Subject: [Pioneer-users] General questions and comments of interest to Pioneer community. In-Reply-To: <48D35BDA.2050208@rub.de> References: <48D35BDA.2050208@rub.de> Message-ID: <48D3A598.5060406@mobilerobots.com> Christoph Neumann wrote: > Hello, > > I occasionally get this error message. It interrupts the robot and I > lose control. A few seconds later it just works fine. > Hi Cristoph, what operating system are you on? The warning means that the key handler is hanging or blocking for almost 2 seconds. I don't know why it would do this but if you run the program in the debugger you might be able to break execution of the program if you think it's hanging in the key handler and see what function it's in. Reed > > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > Warning: Task 'Key Handler' took 1963 ms to run (longer than the 250 > warning time) > > Warning: ArRobot sync tasks too long at 2073 ms, (100 ms normal 250 ms > warning) > > %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% > > > From phano002 at gmail.com Fri Sep 19 15:19:19 2008 From: phano002 at gmail.com (Gridsada Phanomchoeng) Date: Fri, 19 Sep 2008 14:19:19 -0500 Subject: [Pioneer-users] communication with RS-232 Message-ID: Hello All, I have a contoller, cRIo-9074, with RS-232. I would like to compute control parameters in cRIO-9074 and then send them to the microcontroller of 3-AT by using RS-232. RS-232 (AUX1,AUx2,and AUX3) of 3-AT is 5-position microfit sockets but RS-232 of cRIO-9074 is standard 9 pins. I am wondering what kind of cable I need. How do I connect those pin? Thank you Gridsada -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.mobilerobots.com/pipermail/pioneer-users/attachments/20080919/914dea30/attachment.html From reed at mobilerobots.com Tue Sep 23 19:33:54 2008 From: reed at mobilerobots.com (Reed Hedges) Date: Tue, 23 Sep 2008 19:33:54 -0400 Subject: [Pioneer-users] Announcing the new, improved robots.mobilerobots.com Message-ID: <48D97CE2.80909@mobilerobots.com> We would like to let you know that the MobileRobots developer support site has recently undergone a major update and invite you to check it out at . It includes almost everything that the old site contained (software downloads, all robot and accessory manuals, links to the mailing lists, etc.) plus much more -- especially the new Knowledge Base and FAQ, with answers to questions and pieces of technical information about robots, accessories and software. Use the "Knowledge Base" link to see the categories, or use the search box. We hope that this site provides you with an ever-improving information resource. You can help add to it -- a few pages have been started which are open to your additions and contributions, and we hope to develop this aspect of the site further based on your ideas and needs. See "Adding to this Site" for the starting point. What kinds of things would you want to share, and see shared by other developers, researchers, students, etc.? Example code? Tutorials and how-to documents? Some example teaching materials? Links to helpful resources on line, and bibliographies or reading lists of relevant books and papers? Let us know, or go ahead and add it. As this part of the site develops we can work on how to organize it best. If you have any problems or notice anything missing, incomplete or broken on this site, or have any suggestions for improving the site please let us know. The URL is (as before), . Thanks! Reed From wjxnet_126 at 126.com Wed Sep 24 10:10:07 2008 From: wjxnet_126 at 126.com (wjxnet_126) Date: Wed, 24 Sep 2008 22:10:07 +0800 (CST) Subject: [Pioneer-users] How to get the true relative distance between robots? Message-ID: <14871269.439711222265407801.JavaMail.coremail@bj126app57.126.com> hello, everyone! Recentrly the following problem bothers me. Using a control law, i want two robots have some desired distance and relative angle. The control law proves to be corrent under MobileSim. While operating on our P3-AT robots, which has no GPS installed, their final distance and relative angle seen by eyes are far from the desired one, even if the Printf function prints them to to be the desired one. I use ArNetworking to transfer a leader robot's states like X,Y,Th,Vel to the follower robot. The follower robot's own states are read by FollowerRobotInfo.X=myRobot->getRawEncoderPose().getX(); FollowerRobotInfo.Y=myRobot->getRawEncoderPose().getY(); FollowerRobotInfo.Th=myRobot->getRawEncoderPose().getTh(); FollowerRobotInfo.Vel=myRobot->getVel(); FollowerRobotInfo.RotVel=myRobot->getRotVel(); I am wondering maybe some errors occur on states readings, could you please tell me how to impove the precision of robots' states reading. Thanks a lot! Jianxin Wu -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.mobilerobots.com/pipermail/pioneer-users/attachments/20080924/63a0e7d1/attachment.html From trinathp at gmail.com Mon Sep 29 20:11:35 2008 From: trinathp at gmail.com (trinath polisetty) Date: Mon, 29 Sep 2008 20:11:35 -0400 Subject: [Pioneer-users] Advanced.cpp in Arnl Message-ID: HI Advanced.cpp helps in moving from one goal to other and also all goals at the same time from the home point, but there is no .exe file in arnl\bin folder. advanced.cpp could be found in arnl\examples folder. Did anybody use this code. Please suggest me how to use advanced.cpp and successfully run it. -- trinath p -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.mobilerobots.com/pipermail/pioneer-users/attachments/20080929/7fad134d/attachment.html From reed at mobilerobots.com Tue Sep 30 10:37:08 2008 From: reed at mobilerobots.com (Reed Hedges) Date: Tue, 30 Sep 2008 10:37:08 -0400 Subject: [Pioneer-users] How to get the true relative distance between robots? In-Reply-To: <14871269.439711222265407801.JavaMail.coremail@bj126app57.126.com> References: <14871269.439711222265407801.JavaMail.coremail@bj126app57.126.com> Message-ID: <48E23994.8080600@mobilerobots.com> Hi, all robots have some error in position estimated by encoders (odometry), but this is especially true with the AT which is a skid steer robot, and the wheels must slip over the ground for it to rotate (by comparison, the DX has more acurate odometric position estimate because the wheels only slip sometimes, and in small amounts). MobileSim has some artificial error applied uniformly, but on a real robot it may be greater, and will vary depending on how it moves and over what kind of surfaces. If your AT has a gyro, then it will automatically improve the heading estimate but won't make it perfect. But to have the most accurate positioning you need some kind of localization based on a sensor or other external reference. You could try slowing the robot down, especially when rotating. Other people on this list may have found some speed parameters that might have helped a bit. Anyone have any advice? Reed wjxnet_126 wrote: > hello, everyone! > > Recentrly the following problem bothers me. Using a control law, i want two robots have some desired distance and relative > angle. The control law proves to be corrent under MobileSim. While operating on our P3-AT robots, which has no GPS installed, their final distance and relative angle seen by eyes are far from the desired one, even if the Printf function prints them to to be the desired one. I use ArNetworking to transfer a leader robot's states like X,Y,Th,Vel to the follower robot. The follower robot's own states are read by > > FollowerRobotInfo.X=myRobot->getRawEncoderPose().getX(); > FollowerRobotInfo.Y=myRobot->getRawEncoderPose().getY(); > FollowerRobotInfo.Th=myRobot->getRawEncoderPose().getTh(); > FollowerRobotInfo.Vel=myRobot->getVel(); > FollowerRobotInfo.RotVel=myRobot->getRotVel(); > > I am wondering maybe some errors occur on states readings, could you please tell me how to impove the precision of robots' states reading. Thanks a lot! > > > Jianxin Wu > > > > > > ------------------------------------------------------------------------ > > _______________________________________________ > 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