From: Lynne E. P. <pa...@cs...> - 2003-12-03 17:22:48
|
We're having problems getting vfh to work. I have revised the sample code vfh.cc and am trying to run it on a Pioneer. Attached is the vfh.cc code, our config file, and an output file that shows the messages from Player (which look fine). The problem is that the vfh.cc code hangs when the "vfh_pp.SetMotorState(1)" command is reached. Does anyone know what the problem is? Thanks, --Lynne At 09:00 AM 12/2/2003 -0800, Brian Gerkey wrote: >hi Balajee, > >I'm forwarding this to our users' list, where such questions are best >directed. > >No, I don't have an example of what you're looking for, i.e., using >amcl->vfh to make a goto. However, I've done it before and it's not >that hard to do. The client would look something like this: > > open localize device (amcl) > open position device (vfh) > > for(;;) > { > read new data from both devices > > calculate coordinate transform between vfh and amcl frames (amcl > uses a global frame, while vfh uses an odometric frame) > > if(we have a new global goal) > { > convert goal from amcl frame to vfh frame > > give converted goal to vfh > } > } > > >I'll also take this opportunity to announce a new related driver, called >'wavefront'. It is a wavefront propagation path-planner written by >Andrew, which I've integrated as a Player driver. This driver supports >the position interface, and requires an underlying localize device and >an underlying position device that is capable of doing obstacle-avoiding >position control. It's meant to be used like so: > > <-- amcl <-- (various sensors) > wavefront > <--> vfh <--> (some real position device) > >This driver allows for the mythical 'global goto', by computing a list of >waypoints that form a path to the goal, and handing these waypoints off in >sequence to the underlying navigation algorithm (i.e., vfh), which controls >the robot base. > >It's checked into CVS and works reasonably well, both with real bots >and in Stage. However, it's not been thoroughly tested, so beware. >In particular, current drawbacks include: > > - no way for the client to get the list of waypoints > - no way for the client to detect a 'no feasible plan' condition > - no automatic replanning > >Also, since we're relying on amcl for the true global pose, amcl must >be reasonably well initialized before you start pursuing a goal. > >Since it's fairly complicated to set up, and since there's no >documentation yet for the wavefront driver, appended below is an example >Player config file. > > brian. > >----------------------------------------------------------------------------- ># Use the following two lines to connect to a real robot: >#position:2 ( driver "trogdor" port "/dev/ttyUSB1" ) >#laser:0 ( driver "sicklms200" port "/dev/ttyUSB0" invert 1) > ># Use the following two lines to connect to Stage: >position:2 ( driver "passthrough" port 6665) >laser:0 ( driver "passthrough" port 6665) > ># Connect amcl to robot base and laser >localize:0 >( > driver "amcl" > odom_index 2 > > laser_index 0 > laser_map "gates1-crop-clean.pgm" > laser_map_scale 0.1 > laser_map_negate 0 > > init_pose [-20 9 0] > init_pose_var [1 1 180] > > pf_max_samples 2000 > pf_min_samples 100 > > update_thresh [0.1 5] > > odom_drift[0] [0.2 0.0 0.0] > odom_drift[1] [0.0 0.2 0.0] > odom_drift[2] [0.2 0.0 0.2] > > enable_gui 1 > alwayson 1 >) > ># Connect vfh to robot base, and set various thresholds >position:1 >( > driver "vfh" > position_index 2 > laser_index 0 > cell_size 0.1 > window_diameter 61 > sector_angle 1 > robot_radius 0.225 > safety_dist 0.15 > max_speed 0.50 > max_turnrate 75 > free_space_cutoff 1000000.0 > weight_desired_dir 5.0 > weight_current_dir 3.0 > distance_epsilon 0.5 > angle_epsilon 10 >) > ># Connect wavefront to vfh and amcl, and set various thresholds. Note that ># these thresholds should be slighly looser than those used by vfh. >position:0 >( > driver "wavefront" > position_index 1 > localize_index 0 > map_filename "gates1-crop-clean.pgm" > map_scale 0.1 > #cspace_filename "gates1-crop-clean.cspace" > robot_radius 0.225 > safety_dist 0.25 > max_radius 1.0 > dist_penalty 1.0 > distance_epsilon 1.0 > angle_epsilon 15 > #alwayson 1 >) ----------------------------------------------------- Prof. Lynne E. Parker Department of Computer Science The University of Tennessee URL: http://www.cs.utk.edu/~parker Non scholae, sed vitae discimus. ------------------------------------------------------ |