[ODE] buggy program

Dhiren Padhiar dhirenpadhiar at yahoo.co.uk
Tue Mar 7 05:31:06 MST 2006


Hello,
   
  I'm using the buggy program to make the buggy an obstacle avoiding machine as part of my final year project. I've managed to get the buggy to collide with a box and reverese. I want the buggy to reverse a bit and stop so there is a fair distance between the buggy and obstacle.
   
  I can't get the buggy to stop, I've decided to use a for loop that as it is reversing, the buggy starts to slow down and eventually stop, but the for loop doesn't seem to be working. I can set the buggy to got at certain speeds, however the for loop won't slow the buggy down.
   
  For example,
   
  if (g2)
  {
       for (speed = -0.3; speed==0; speed+=0.1)
  }
   
  The above will set the speed to -0.3, so when it collides it will reverse at that speed, but it doesn't slow down, it just carries on reversing. It should reverse at -0.3 and then gradually come to a halt.
   
  Any ideas/suggestions as to how I can resolve this?
   
  Kind Regards
  Dhiren.

		
---------------------------------
To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://q12.org/pipermail/ode/attachments/20060307/29bd49b6/attachment.htm


More information about the ODE mailing list