Obstable avoiding robot

Hi,

i am kim,
i am working on the BH3 hexapod and i am making a autonomous robot that are able to avoid obstacle.
however, i am having problem with the ultrasonic ping sensor’s code. since i put 7 sensors on the robot,
it is busy reading the sensor and it cannot move normally. The robot is very slow. i still need to put in conditions for the other 6 sensor!
any idea how to read the sensor while walking normally?

Hi Kim,

Please only post the question in one place. I think you added a post onto the example ping thread as well. From your description, I am not sure which are the “other 6” sensors. If from your sensor distance code you mainly rely on wdist1.

Some ideas:

  1. If you only want to check the other sensors every so often, you could add a simple counter to this code. That is each time you enter this code you increment a variable, when the variable gets up to some value (which you can tweak to get your timing), you check the other sensors and reset your variable. The code that uses the values returned from the other sensors would also need to know when the values have been updated. It may be this code that actually resets the variable.

  2. Like 1, except maybe the code is configured to read one sensor per loop. That is each time you enter this code, you increment a variable. If the value is 1 you read the first sensor, if it is 2 you read the second sensor…, when you get to the last sensor, you reset the counter. Note: if this is still reading the sensors too often, you could change the code to say: read the first sensor at 1, second one at 11, third one at 21…

Good Luck
Kurt

In addition to what Kurt said, you could use SRF08 or similar rangers which require less computational overhead. Better still, run six or more rangers from another processor, as I have done on my MicroMoose 'bot.

End of first page in:

lynxmotion.net/viewtopic.php?f=17&t=6608

I use a PIC uP to run the rangers, compass, PIR and other I2C devices.

http://www.marconettengineering.com/Homebrew%20Robotics%20102710-072.JPG

Alan KM6VV

if i wan left side and the right side of the robot walking on different level, which variable should i change?
for example 3 leg at the left hand side walk at the floor and right side of the robot walk a higher level.
is it possible to do that?

i installed a accelerometer into the robot and trying to change the degree of the legs but failed to understand the code~ ==
so i am hoping that i can get the answer here.
thx in advance!

anyone has the solution to my problem here?

is there any other gait available for BH-3 hexapod autonomuos? such as the 6 step ripple gait~

The PowerPod generated code is limited to the alternating tripod. You may have more luck starting with Phoenix code.

If you measure the pitch/tilt of the accelerometer, then you should be able to add it in to the body shift (Phoenix code) or left joystick inputs.

I’d start by just interfacing a pot or two, read via A/D, then apply “offsets” into the body shift parms, (BodyYShift, etc).

Then work on reading the accelerometers, and scaling their values. Combine the two, and Voilà !

Alan KM6VV