Hello,
I've built my own dancebot, mostly faithful to the propeller book, but with a few differences (bigger tires, more weight although I don't know how much more without knowing the weight of your prototypes). I have a couple of questions:
1) Fuzzy math and viewport. The fuzzy screen is showing the wrong variable names for the various maps. For example the first map viewport calls "tiltt" and goes from 3-10k, but I think that should be "fpose", not tiltt. The last map viewport calls "turn", going from 2k-7k, but from the code it looks like it should be "motor". I'm using the latest fuzzy.spin with viewport 4.1. It seems like things are not in the order they should be.
2) The dancebot balances correctly, but I have a devil of a time getting it to go forward or reverse. I've rigged it with a model RC receiver that I'm using to derive _vel and _rot values from that I supply to the do() function. It pretty much does nothing until it's positional (or velocity) error gets very high at which point it'll suddenly take off like a rocket until it either crashes into something or flips over. I'm guessing this is something I need to adjust in the fuzzy logic controller, but I'm not sure exactly how to get started. Any general pointers would be helpful.
3) The dancebot is working much better on flat surfaces than carpet. I suspect having a flatter surface might solve some of the problems I'm having in #2, but I don't have a good flat non-carpeted surface to play with. I'm guessing this is again a tuning thing, perhaps I need more motor force due to the larger tires and the carpet.
4) Is there a place to get the original Chapter 6 code, for reference? The Figure-8 demo doesn't match the current code on the website, which includes a lot of the computer vision code from Chapter 7.
5) Can you recommend a good reference for fuzzy logic and PID controllers? I think my biggest obstacle is a lack of understanding of those math concepts.
As just a general observation (perhaps for a future revision of the book), it would be nice if chapter 6 concluded with a simple radio-control demo since I think that would be most likely first or second experiment a reader would want to do before progressing to pre-programmed control or CV control. I imagine a first experiment is "stand in place without tipping over", a second would be "radio control", third "programmed control (figure 8, pre-programmed course, etc)", and the fourth and final step something complicated like computer vision.
Anyhow, just wanted to conclude with saying how much I've enjoyed the project and the Propeller book. Viewport has also turned out to be a very helpful tool for me, not only with the dancebot but with other propeller projects that I've been working on.
Scott
