From: Aslund <seb...@gm...> - 2010-09-21 13:13:11
|
Hey Rich Thanks for the information. I have played a bit more around and found out that pmaptest is able to produce a map, but only if I disable the GUI, somehow it doesn't work with GUI enabled. The new problem is that I get a map out, but the picture is totally wrong of what it should be and is properly due to the drifting error in my robot's odometry. The question is the how I counter this problem so I can get a decent map? Regards Sebastian On 20 September 2010 15:42, Rich Mattes <jp...@gm...> wrote: > Hi, > > > > Geometry is different from Odometry. When writelog starts up, it sends a > PLAYER_POSITION2D_REQ_GET_GEOM to the position2d devices its logging. The > roboteq driver doesn’t have any code to handle this request, so > ProcessMessage returns -1 and the request is not fulfilled. The geometry > request is used to convey the overall size of the robot; whether or not it > makes sense to handle requests like that from the Roboteq driver is > questionable (maybe via an optional tuple in the config file?) > > > > As far as pmap goes, check to see that logfile.h/cpp (called from > pmap_test.cc) are reading the correct tokens out of your logfile. A cursory > look at the code indicates that if you’re only getting the following message > once is probably having trouble reading from your log file. > > > > 0.000 m 0.000 rotations 0 scans 0 steps in 0 seconds > > -nan msec/scan -nan msec/step > > > > > > Rich > > > > *From:* Aslund [mailto:seb...@gm...] > *Sent:* Monday, September 20, 2010 9:08 AM > *To:* pla...@li... > *Subject:* Re: [Playerstage-users] Problems with writelog and position > geometry > > > > Hey > > I have tried to look into the code an apparently writelog is unable to get > any geometry information, but when I look at the Roboteq driver, then it > updates the geometry if it register encoders, which it does. So if the > roboteq driver publishes position2D information, then why cant writelog not > read them? > > Sebastian > > On 20 September 2010 10:22, Aslund <seb...@gm...> wrote: > > Hey everyone > > I am working on implementing some path planning and for that I need a map. > I have read about how to use writelog and pmaptest to create a grid map, but > sadly I am unable to produce any data in my logs. I hope someone can see > where I go wrong. > When I run player on my robot, then I get the following message: > ------- > Adding position2d interface. > Configuring Roboteq serial port at /dev/ttyS0 > Computed maximum forward velocity of 0.870628 m/s. > Computed maximum rotational velocity of 3.414229 rad/s. > listening on 6665 > Listening on ports: 6665 > AX2500 found. > Encoder present. > Short circuit detection capable. > warning : unable to get position geometry > ------ > > When I try to get the log while I move around with PlayerView, then > pmaptest gives the following output with the generated logfile; > ------ > aslund@SDURobot:~$ pmaptest --grid_scale 0.05 > mydata2010_09_17_13_24_16.log > range_count = 489 > range_max = 5.600000 > angle_min = -1.500000 > angle_max = 1.500000 > angle_step = 0.006136 > allocating 8192 bytes for scans > allocating 607 Mb of map space (estimated lower bound) > 0.000 m 0.000 rotations 0 scans 0 steps in 0 seconds > -nan msec/scan -nan msec/step > ------ > > My .cfg file is this: > ------ > driver > ( > name "hokuyo_aist" > provides ["ranger:0"] > portopts "type=serial,device=/dev/ttyACM0,timeout=1" > min_angle "-1.5" > max_angle "1.5" > ) > > driver > ( > name "rangertolaser" > requires ["ranger:0"] # read from ranger:0 > provides ["laser:0"] # output results on laser:0 > ) > > driver > ( > name "roboteq" > provides ["position2d:0" "power:0"] > devicepath "/dev/ttyS0" > motor_control_mode "197" > invert_directions "true" > encoder_ppr "1024" > wheel_circumference "1.28" > axle_length "0.255" > gear_ratio "7.742" > ) > driver > ( > name "writelog" > log_directory "/home/aslund" > basename "mydata" > requires ["laser:0" "position2d:0"] > provides ["log:0"] > alwayson 1 > autorecord 1 > ) > ------ > > Thanks for your help. > > Sebastian Aslund > > > > > ------------------------------------------------------------------------------ > Start uncovering the many advantages of virtual appliances > and start using them to simplify application deployment and > accelerate your shift to cloud computing. > http://p.sf.net/sfu/novell-sfdev2dev > _______________________________________________ > Playerstage-users mailing list > Pla...@li... > https://lists.sourceforge.net/lists/listinfo/playerstage-users > > |