I have applied what I think is the fix you are reporting here to svn 2-1 branch, are you able to try this out and confirm it works as you intended?

Toby

2009/2/16 Andreas Vogt <andreas.vogt@dfki.de>
Hi,
there was an error, now everything works.
Andreas



int VFH_Algorithm::Set_Motion( int &speed, int &turnrate, int
actual_speed )
{
 // This happens if all directions blocked, so just spin in place
 if (speed <= 0)
 {
   printf("stop\n");
     turnrate = GetMaxTurnrate( actual_speed );
     speed = 0;
 }
 else
 {
   if ((Picked_Angle > 270) && (Picked_Angle < 360)) {
       turnrate = -1 * GetMaxTurnrate( actual_speed );
   } else if ((Picked_Angle < 270) && (Picked_Angle > 180)) {
     turnrate = GetMaxTurnrate( actual_speed );
   } else {
     turnrate = (int)rint(((float)(Picked_Angle - 90) / 75.0) *
GetMaxTurnrate( actual_speed ));

     if (turnrate > GetMaxTurnrate( actual_speed )) {
       turnrate = GetMaxTurnrate( actual_speed );
     } else if (turnrate < (-1 * GetMaxTurnrate( actual_speed ))) {
       turnrate = -1 * GetMaxTurnrate( actual_speed );
     }

//      if (abs(turnrate) > (0.9 * GetMaxTurnrate( actual_speed ))) {
//        speed = 0;
//      }
   }

   //check min_turnrate
   if(turnrate < 0 && turnrate > -MIN_TURNRATE){turnrate = 0;}
   if(turnrate > 0 && turnrate <  MIN_TURNRATE){turnrate = 0;}
 }

//  speed and turnrate have been set for the calling function -- return.

 return(1);
}



Am Freitag, den 13.02.2009, 08:42 -0800 schrieb Brian Gerkey:
> On Feb 13, 2009, at 2:50 AM, Andreas Vogt wrote:
>
> > Hi everyone,
> >
> > Does the parameter min_turnrate work in the vfh driver? Because my
> > robot
> > recieve velocitycommands smaller than min_turnrate!
>
> No, it doesn't.  Interestingly, that parameter is passed into the
> underlying code as MIN_TURNRATE, but then never used.
>
> To fix it, look in player/server/drivers/position/vfh/
> vfh_algorithm.cc.  It would seem that the place to do the thresholding
> is VFH_Algorithm::Set_Motion().
>
> If you get it working, please submit a patch.
>
>       brian.
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> Playerstage-users mailing list
> Playerstage-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/playerstage-users


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Playerstage-users mailing list
Playerstage-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-users



--
This email is intended for the addressee only and may contain privileged and/or confidential information