Shop OBEX P1 Docs P2 Docs Learn Events
A open letter to the Parallax-Staff — Parallax Forums

A open letter to the Parallax-Staff

nomadnomad Posts: 276
edited 2007-09-13 14:23 in Propeller 1
Dear Sirs,

I work on Quad-Bot, it's a Robotor platform with 4 legs.
each of the legs consists of 3 Servos.

With the help of a PropProtoBoards in each case 2 legs with
6 Servos would like to steer.

Control by a WalkNet (artificial neuralNet), 2 nets for 2 legs

The PropChip have 8 cogs,
Should the following allocation is made by software be possible.
Cog_0: Master
Cog_1: Communication
cog_2, Cog_3, Cog_4: controlling of the 3 Servos of leg 1
Cog_5, Cog_6, Cog_7: controlling of the 3 Servos of leg 2

I has already a functioning spin program,
which can steer between 3 (1 leg) and 12 Servos (4 legs).
look at leg1ServoSequencer11.spin on my old postings.
but just only with Cog_0.

leg1ServoSequencer120.spin is to be steered my attempt 1 leg (3 Servos)
with 3 cogs. it's not running

according to my opinion the principle should: each servo equal 1 Cog
possible its.

There I in this thing am referred, always
the Servo32-Object. it's not the right software for my problem.
(only a direction of 90 degrees, instead of 120 degress. & some tricky asm-code)

I do not believe slowly that the propeller chip this in terms of hardware
can.


I find it astonishing, that then from 8-facher parallel-processing
it is spoken.

Also in the forum I find very few references, how one can use
8 cogs useful with this hardware.

if i'm wrong, excuse me.

For help and a opinion from your staff, i'm verry happy.
As attachment: leg1ServoSequencer11.spin
leg1ServoSequnecer120.spin

Yours sincerely
Stepha Morf aka nomad

Comments

  • AleAle Posts: 2,363
    edited 2007-07-16 15:34
    Dear nomad,

    Note: What others offer as free of charge, and for your own benefit, should not be taken as as a grant. Examples are given "as-it-is" without any implied warranty of fitness for any purpose.
    Do not blame anyone except yourself if your programs do not work, or somebody's else for your purposes.

    On the other hand, I could not get what you are complaining about !. Most sentences do not make sense at all. Try to describe (properly) your problem or better what you want to accomplish, and later analyze how you can get it working. And then ask if what you think of a solution could possibly fit.

    There is an example of a video driver for 1600x1200 that uses almost all cogs, that could help you.

    Just an opinion, with 1 cog you can control more than one servo... (there is an example of 32 servos for the propeller).

    Have fun, and learn, learn and learn. (better as blame blame blame :-D)
  • Mike GreenMike Green Posts: 23,101
    edited 2007-07-16 16:39
    nomad,
    It's your walker robot. You can implement whatever control software you would like. It is certainly possible to use one cog for each of the six servos and use the remaining cogs as you indicated. Whether that's a "good" or "efficient" or "easy" way to do it is a matter of opinion and experience.

    In your other thread, I suggested a different way of organizing your control program and using the Servo32 driver to handle the low-level servo control. This suggestion was based on a very small amount of experience on my part with robotics, but a lot of experience programming the Propeller.

    I mentioned that Servo32 limits the range of pulse widths. The amount of mechanical travel for a servo for a given pulse width range varies considerably from manufacturer to manufacturer and even from model to model from the same manufacturer. The author of Servo32 chose to limit the pulse width range to avoid damaging some servos that have a wider mechanical travel for a given pulse width range. It's a trivial change to the Servo32 driver to increase the pulse width range to whatever you want or remove the range check entirely. As you mentioned, Servo32 may not be a good fit for what you want to do. There's nothing wrong with that. The reason for using existing objects is to save programming effort and gain the benefit of using already debugged abstract higher level objects. Sometimes the abstractions don't fit your problem.

    You seem to be having problems with using multiple cogs (multiprocessing). I suggest you back up and work through some of the examples in the Propeller Education Kit. You don't necessarily have to use the Kit itself. If you have a Propeller setup with a small breadboard and some extra parts like LEDs, pushbuttons, resistors, etc., you can do the examples with just that. You'll learn more about the various hub instructions and some programming style conventions that have been useful for others.

    The Propeller is a new processor and has been on the market only for around 18 months. Much of the information that you might find in textbooks is distributed around this forum and has only recently begun to be organized into "sticky threads" at the start of this forum. There is one application note on the counters that's downloadable and a series of annotated examples for the Propeller Education Kit (also downloadable). The Hydra Manual, while not available for free, is an excellent reference for the processor itself even though the emphasis of the book is on video and game construction. There are other books in development, probably some months away from publication. There's a large and growing library of contributed objects, mostly for interfacing to various peripheral devices, but includes a complete floating point library and a simple Basic interpreter. Most of these contributions include examples of their use and some limited documentation, sometimes included in the source code itself.

    Post Edited (Mike Green) : 7/16/2007 4:51:25 PM GMT
  • Beau SchwabeBeau Schwabe Posts: 6,559
    edited 2007-07-16 17:20
    nomad,

    In the "leg1ServoSequencer120.spin" there are several things that I see .... in each of the Cogs that you are launching, there is nothing at the end of the Cog to "keep it alive". i.e. no repeats... when each cog gets to the last line of code "waitcnt (timebase += new_periode{1,2, or 3})" it terminates the Cog. Another thing in the "ShoulderServo11" routine, the pulsetime1 value does not ever decrement.

    Looking at the code closer, you are actually doing a repeat upon entering the Cog each and every time, but the problem with that is that at the beginning of each of your Cog's you are re-initializing variables that you are probably intending to be externally influenced. i.e. pulsetime1, pulsetime2, pulsetime3 ... In addition, when a Cog completes, the I/O Pin state is returned to an Input and the Logic state is returned to a LOW. ... but since you are doing the repeat Cog in such a tight loop, NONE of the cogs have a chance to finish before they are restarted from the repeat loop.


    In the "leg1ServoSequencer11.spin" I believe that much of your code could be optimized by simply pre-calculating you constants rather than re-calculating them every time.

    For this and the other program, you also need to set limits, so that the values for pulsetime and newperiod do not go out of bounds for your servo(s) that you are using. Otherwise you could damage your servo(s).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Beau Schwabe

    IC Layout Engineer
    Parallax, Inc.
  • Fred HawkinsFred Hawkins Posts: 997
    edited 2007-07-16 23:40
    Your overall design seems to me to be overly complex. A leg's motion probably can be modeled as repeating wave function. I would try to use Bezier curves to define those
    waves. They are simple to adjust, even dynamically -- little steps, big steps, fast steps, slow steps -- merely by adjusting the end and control points and the rate at which you evaluate your progress along the wave. Then a simple translation of the curve to a servor control value. Three servors on a leg suggests three curves, four legs suggests
    merely four different evaluation points along the same set of waves.

    I think all of this can be done using integer math.

    I am confident that a propeller can handle your robot's motion. As to the neural net, I have no idea.

    Fred

    I'd love to see this robot move backwards: moonwalking, maybe?
  • Graham StablerGraham Stabler Posts: 2,507
    edited 2007-07-17 07:34
    If you will pardon the pun, you are trying to run before you can walk.

    My suggestion would be to learn to program with the propeller first and then make small steps into the project. For example if you learn't some assembly you could modify the servo code quite easily to provide full motion or use it simply as inspiration for your own code. Look in the index thread and follow the 4 step assembly program. Spend one evening on it and I think you will find you have enough confidence to tackle some modifications with the guidance of the forum if you get really stuck.

    Graham
  • nomadnomad Posts: 276
    edited 2007-07-17 08:11
    hi
    thanks for the answers.
    excuse my bad english.

    i dont blame the folks of parallax or
    someone.
    if should so, excuse....

    @Ale:
    <<
    with 1 cog you can control more than one servo...
    (there is an example of 32 servos for the propeller).
    >>
    - i know this, and when i will,
    i can run 12 servos with my programs aka leg1ServoSequencer11.spin.

    - Servo32-Object = i have testing this object.
    but for my purpose, its not the right stuff.

    @Mike:
    thank you for your help.
    your program that you posting.
    it's not running with my hard- and software.
    for your hints.. thanks

    when i buy my first prop, i'm a reader of this forum and download and read the interesting things
    what i find.

    i know that i am a newbie....
    and i hope that, i can learn from you and the another folks here.

    @Beau:
    thank you for your hints.
    the program is only trial...
    i know thats wrong, but its my first step, to build a program (one cog,one servo).
    your write:
    <<
    set limits,
    so that the values for pulsetime and newperiod do not
    go out of bounds for your servo(s) that you are using.
    Otherwise you could damage your servo(s).
    >>
    i know, but it is my intention:
    if i work with the Servo32 -> the maximal-direction is +45 to -45 degrees,
    with my program i reach a maximal-direction of +60 to -60 degrees.

    @Fred Hawkins:
    you are on the right way, with your waves...
    yeh...

    thanks.

    for the next days (weeks...)
    i am working on my WalkNet....
    with ANSI-C under linux.

    thanks for all hints
    regards
    nomad
  • simonlsimonl Posts: 866
    edited 2007-07-17 14:49
    Hi nomad,
    In servo32 version 1.2 it's simple to change the limits of pulse-width - and therefore servo angle travelled. At around line 53 you will see the following:
    Width := 1000 #> Width <# 2000             'limit Width value between 1000uS and 2000uS
    

    This is constraining the minimum pulse-width to 1000us and the maximum to 2000us. If you change the min/max values, to say 750 and 2250, you will most likely see your servos travel through greater angles.

    Servo32 should be able to handle your task, so it really is worth taking another look - IMHO!

    Hope that helps.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheers,

    Simon
    www.norfolkhelicopterclub.co.uk
    You'll always have as many take-offs as landings, the trick is to be sure you can take-off again ;-)
    BTW: I type as I'm thinking, so please don't take any offense at my writing style smile.gif
  • nomadnomad Posts: 276
    edited 2007-07-17 15:18
    hi simoni,
    thanks for your help
    regards
    nomad
  • Jack.RubenJack.Ruben Posts: 8
    edited 2007-09-13 12:39
    ·
    Hello,
    ·
    Where can i found:the program·Servo32 version 1.2?
    Thanks,
    ············· Jack
    simonl said...
    Hi nomad,
    In servo32 version 1.2 it's simple to change the limits of pulse-width - and therefore servo angle travelled. At around line 53 you will see the following:
    Width := 1000 #> Width <# 2000             'limit Width value between 1000uS and 2000uS
    
    This is constraining the minimum pulse-width to 1000us and the maximum to 2000us. If you change the min/max values, to say 750 and 2250, you will most likely see your servos travel through greater angles.
    ·
    Servo32 should be able to handle your task, so it really is worth taking another look - IMHO!
    ·
    Hope that helps.
  • Graham StablerGraham Stabler Posts: 2,507
    edited 2007-09-13 13:14
  • Fred HawkinsFred Hawkins Posts: 997
    edited 2007-09-13 13:16
    In object exchange, category motor control: http://obex.parallax.com/objects/category/7/
  • SkogsgurraSkogsgurra Posts: 231
    edited 2007-09-13 14:23
    There has been some discussion about language use in the fora. I think that this is one case where a translation would have been helpful.

    Nomad obviously has German as one of his tongues - probably his mother tongue.

    The more nebulous sentences are:

    "I do not believe slowly that the propeller chip this in terms of hardware
    can"

    Which probably is something like "Langsam glaube ich dass der Propeller das im Hardware nicht kann" Which means "I am (slowly) beginning to think that the Propeller can't do this in hardware" (a personal remark: that is what Nomad says. But I cannot understand where he has got that impression)

    And:
    I find it astonishing, that then from 8-facher parallel-processing
    it is spoken.

    Which, in a little better English, means "I find it astonishing that 8-tuple parallel processing is mentioned" (same remarks as before).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sign In or Register to comment.