Shop OBEX P1 Docs P2 Docs Learn Events
Boe - bot — Parallax Forums

Boe - bot

scam_5000scam_5000 Posts: 17
edited 2006-03-28 08:53 in Robotics
I have just recently purchased this bot and have a few questions and I was wondering if anyone can help me....


well here are my questions...

1. I just learned how to navigate with the IR sensors (the high performance navigation activity) and I was wondering if there is any way to smooth out the movements, because now it seems like my bot is very jerky.

2. looking at the BOE where the servos are connected there looks like there is places for 2 more, I was just wondering if this is correct and if it is possible to connect 4?


thanks for taking the time to look at this.

Chris


ps. here is the code that I am using


' {$STAMP BS2}
' {$PBASIC 2.5}

IRDETECTLEFT VAR Bit 'variable declarations
IRDETECTRIGHT VAR Bit
PULSELEFT VAR Word
PULSERIGHT VAR Word

FREQOUT 4, 2000, 3000 'signal program start

DO 'main routine

FREQOUT 8, 1, 38500 'check IR detectors
IRDETECTLEFT = IN9
FREQOUT 2, 1, 38500
IRDETECTRIGHT = IN0
'decide how to navigate
IF (IRDETECTLEFT = 0) THEN
HIGH 10
ELSE
LOW 10
ENDIF

IF (IRDETECTRIGHT = 0) THEN
HIGH 1
ELSE
LOW 1
ENDIF

IF (IRDETECTLEFT = 0) AND (IRDETECTRIGHT = 0) THEN
PULSELEFT = 850
PULSERIGHT = 650
ELSEIF (IRDETECTLEFT = 0) THEN
PULSELEFT = 650
PULSERIGHT = 650
ELSEIF (IRDETECTRIGHT = 0) THEN
PULSELEFT = 850
PULSERIGHT = 850
ELSE
PULSELEFT = 650
PULSERIGHT = 850
ENDIF

PULSOUT 13, PULSELEFT 'apply the pulse
PULSOUT 12, PULSERIGHT
PAUSE 30

LOOP 'repeat the routine

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-01-21 00:42
    This code looks suspiciously like the FastIRRoaming code.· You should expect a little jerkiness from this code but more speed in the adjustments.· Plus it should only be jerky when it detects something.· So it's possible you have the sensors aiming downward too much if it's doing this when there's nothing there.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • scam_5000scam_5000 Posts: 17
    edited 2006-01-21 02:52
    yeah, it is pretty much the fastIR code. I thought that I might have done something wrong because of the jerkyness....

    I was looking at this for quite awhile and wanted someone else to look at it, in case there was something that I was missing.

    Thanks,

    Chris
  • edited 2006-01-21 04:27
    You can completely eliminate the jerkiness by incorporating ramping into your Boe-Bot's maneuvers.· Here is a link to an example program with a ramping subroutine: EepromNavigationWithRamping2.bs2.· For more information about how this program works, see the·Ramping in Navigation section·in·Boe-Bot® Robot Navigation with Accelerometer Incline Sensing.· You can find this and other articles·on the Stamps in Class "Mini Projects"·page.
  • Tom WalkerTom Walker Posts: 509
    edited 2006-01-23 14:37
    ...and yes, those connectors are there to hook up more servos...but get a handle on your current problem, first...

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Truly Understand the Fundamentals and the Path will be so much easier...
  • scam_5000scam_5000 Posts: 17
    edited 2006-01-23 15:04
    I figured out what was wrong! I had the bot moving towards its obstruction instead of away and as far as the jerkyness goes it is almost eliminated



    thanks for all of your help
  • hdn0380hdn0380 Posts: 6
    edited 2006-03-26 01:39
    Can anyone elaborate on this? I'm having a similar problem. When the Boe-Bot gets into a corner, it just starts twitching left and right like it can't decide where to turn.
  • SciTech02SciTech02 Posts: 154
    edited 2006-03-27 23:56
    Hmm.· I had the same problem too.· They were talking about that on another poll.· They said to add a counter of some kind.· I couldn't understand what they ment, so I just changed the part were it would back up to a subroutine that made it turn around.· It worked better/great and come on now, I didn't see the need to back up when the sensers·detected somthing, that almost causes it to get stuck.·

    Elaboretetion commplete. roll.gif
  • Jake11611Jake11611 Posts: 47
    edited 2006-03-28 01:20
    Can't you have as many servo's as there are I/O's?
  • Bruce BatesBruce Bates Posts: 3,045
    edited 2006-03-28 08:53
    Jake -

    Yes you can, but keeping them all refreshed with current positioning information on a regular basis (which is required) is another matter entirely, if you wish to do other things as well. Thus, the evolution of servo conrollers, to take that burden off the microcontroller.

    Regards,

    Bruce Bates

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    <!--StartFragment -->
Sign In or Register to comment.