Page 3 of 6 FirstFirst 123456 LastLast
Results 21 to 30 of 52

Thread: Biayered-X

  1. #21
    Join Date
    May 2008
    Location
    TN
    Posts
    853
    Images
    99
    Rep Power
    71

    Re: Biayered-X

    I'll second QCAD. I do all of my sheet metal work using it.
    "If A is a success in life, then A equals x plus y plus z. Work is x; y is play; and z is keeping your mouth shut."
    -
    Einstein

    Don't be a HelpVampire

  2. #22
    Join Date
    Dec 2007
    Location
    Whidbey Island, WA
    Posts
    1,718
    Images
    456
    Rep Power
    95

    Re: Biayered-X

    so Ive made my yearly trip to the jersey shore. This year I brought X along, and I am really working to get the new arbotix up and running. In the space of a few hours I got the crawling poses all up and running, later today I'll start working on the humanoid stuff.

    Pypose and the sequence editor is whicked easy to use. the only thing I can think of that would make it faster would be to add number boxes along with the sliders for each servo position input. It gets to be a bit of a hastle sliding those things around and having to use the arrow keys.

    I haven't gotten to play with nuke, and given that the majority of the servos are centered during crawling Im almost wondering if i could get it to work.

    The nice part is that because the servo orientation is the same for each limb Nothing changes regardless of the robots orientation. Weight is definitely going to be an issue so I may have to upgrade the hip servos to AX-18Fs at dome point in the future.

    I am noticing something strange which may be the result of a loose servo wire. Sometimes commands don't seam to get through to the arbotix. It is most common on start up. I'll set the servo position to a pose, and nothing happens...I'll work to try to track that down.

    I didn't bring a video camera with me, but Ill try to get some video shot in the next few days.
    Last edited by darkback2; 08-11-2010 at 10:41 AM.

  3. #23
    Join Date
    Dec 2007
    Location
    Whidbey Island, WA
    Posts
    1,718
    Images
    456
    Rep Power
    95

    Re: Biayered-X

    Used an Iphone to put together a quick video.


  4. #24
    Join Date
    Dec 2007
    Location
    Portland, OR
    Posts
    3,198
    Images
    952
    Rep Power
    139

    Re: Biayered-X

    Che, Awesome! Not only did we get you using AX-12s, we got you programming in a real language! What's next? The moon?! Great work so far, it's really coming together. Can't wait to see more!

  5. #25
    Join Date
    Dec 2007
    Location
    Whidbey Island, WA
    Posts
    1,718
    Images
    456
    Rep Power
    95

    Re: Biayered-X

    Sorry tybes...still not programming in a real language...I'm just using pypose.

    in fact the one thing I really need to do I can't because I don't really know what I'm doing.

    To be honest I'm grateful for programs like MAX. Without them I wouldn't be able to do anything at all.

    Thanks for the kind words BTW
    Last edited by darkback2; 08-13-2010 at 01:04 AM.

  6. #26
    Join Date
    May 2008
    Posts
    2,228
    Images
    155
    Rep Power
    125

    Re: Biayered-X

    In the chat room, Che and I were discussing how to chain sequences together with some sort of outside command. Here's an example that uses the Commander protocol (which means you can use the hardware version of the ArbotiX Commander, or the do "Test Drive" under NUKE, which brings up a software version of the Commander):

    Code:
    #include <ax12.h>
    #include <BioloidController.h>
    #include <Commander.h>
    #include "poses.h"  // exported from PyPose
    
    BioloidController bioloid = BioloidController(1000000);
    Commander command = Commander();
    
    void setup(){
        // stand up slowly
        delay(100);                    // recommended pause
        bioloid.loadPose(stand);
        bioloid.readPose();
        bioloid.interpolateSetup(500);
        while(bioloid.interpolating > 0){
            bioloid.interpolateStep();
            delay(3);
        }
    }
    
    void loop(){
      if(command.ReadMsgs() > 0){               // check for new messages
        digitalWrite(0,HIGH-digitalRead(0));    // toggle LED so we know johnny5 is alive
        if(bioloid.playing == 0){               // only process if we aren't currently doing a sequence
          if(command.walkV > 50){
            // walk forward
            bioloid.playSeq(stepForward);
          }else if(command.walkV < -50){
            // walk backwards
            bioloid.playSeq(stepBack);
          }else if(command.walkH > 50){
            // turn left
            bioloid.playSeq(stepLeft);    
          }else if(command.walkH < -50){
            // turn right
            bioloid.playSeq(stepRight);
          }
          if(command.buttons&BUT_R3)
            bioloid.playSeq(kick); 
          // more button commands... etc
        }
      } 
      if(bioloid.playing > 0)   
        bioloid.play();                         // continue sequence
    }
    This assumes you have a sequence called 'stepForward', etc, that was exported from PyPose.

    -Fergs

  7. #27
    Join Date
    Dec 2007
    Location
    Whidbey Island, WA
    Posts
    1,718
    Images
    456
    Rep Power
    95

    Re: Biayered-X

    So for all who are interested I'm getting ready to upload the following to the arbotix mounted on X. I figure its a start towards bigger and better things to come. I basically copied the code Fergs posted on this thread and edited to suit my needs. If anyone sees any obvious problems give a shout.

    DB

    Code:
    #include <ax12.h>
    #include <BioloidController.h>
    #include <Commander.h>
    #include "poses.h"  // exported from PyPose
    
    BioloidController bioloid = BioloidController(1000000);
    Commander command = Commander();
    
    void setup(){
        // stand up slowly
        delay(100);                    // recommended pause
        bioloid.loadPose(QuadStart);
        bioloid.readPose();
        bioloid.interpolateSetup(500);
        while(bioloid.interpolating > 0){
            bioloid.interpolateStep();
            delay(3);
        }
    }
    
    void loop(){
      if(command.ReadMsgs() > 0){               // check for new messages
        digitalWrite(0,HIGH-digitalRead(0));    // toggle LED so we know johnny5 is alive
        if(bioloid.playing == 0){               // only process if we aren't currently doing a sequence
          if(command.walkV > 50){
            // walk forward
            bioloid.playSeq(CrawlForward);
          }else if(command.walkV < -50){
            // walk backwards
            bioloid.playSeq(CrawlBackward);
          }else if(command.walkH > 50){
            // turn left
            bioloid.playSeq(CrawlSideLeft);    
          }else if(command.walkH < -50){
            // turn right
            bioloid.playSeq(CrawlSideRight);
          }
          if(command.buttons&BUT_R1)
            bioloid.playSeq(openFlower); 
            }
          if(command.buttons&BUT_R2)
            bioloid.playSeq(closeFlower);
            }
          if(command.buttons&BUT_R3)
            bioloid.playSeq(Crawl2Stand);
          // more button commands... etc
        }
      } 
      if(bioloid.playing > 0)   
        bioloid.play();                         // continue sequence
    }

  8. #28
    Join Date
    Dec 2007
    Location
    Whidbey Island, WA
    Posts
    1,718
    Images
    456
    Rep Power
    95

    Re: Biayered-X

    so uploading to the arbotix resulted in the following error.

    Thanks in advance for any help.

    In function 'void loop()':
    error: 'closeFlower' was not declared in this scope At global scope:

    Code:
    #include <ax12.h>
    #include <BioloidController.h>
    #include <Commander.h>
    #include "poses.h"  // exported from PyPose
    
    BioloidController bioloid = BioloidController(1000000);
    Commander command = Commander();
    
    void setup(){
        // stand up slowly
        delay(100);                    // recommended pause
        bioloid.loadPose(QuadStart);
        bioloid.readPose();
        bioloid.interpolateSetup(500);
        while(bioloid.interpolating > 0){
            bioloid.interpolateStep();
            delay(3);
        }
    }
    
    void loop(){
      if(command.ReadMsgs() > 0){               // check for new messages
        digitalWrite(0,HIGH-digitalRead(0));    // toggle LED so we know johnny5 is alive
        if(bioloid.playing == 0){               // only process if we aren't currently doing a sequence
          if(command.walkV > 50){
            // walk forward
            bioloid.playSeq(CrawlForward);
          }else if(command.walkV < -50){
            // walk backwards
            bioloid.playSeq(CrawlBackward);
          }else if(command.walkH > 50){
            // turn left
            bioloid.playSeq(CrawlSideLeft);    
          }else if(command.walkH < -50){
            // turn right
            bioloid.playSeq(CrawlSideRight);
          }
          if(command.buttons&BUT_R1)
            bioloid.playSeq(openFlower); 
            }
          if(command.buttons&BUT_R2)
            bioloid.playSeq(closeFlower);
            }
          if(command.buttons&BUT_R3)
            bioloid.playSeq(Crawl2Stand);
          // more button commands... etc
        }
      } 
      if(bioloid.playing > 0)   
        bioloid.play();                         // continue sequence
    }

  9. #29
    Join Date
    Dec 2007
    Location
    Portland, OR
    Posts
    3,198
    Images
    952
    Rep Power
    139

    Re: Biayered-X

    Case sensitive?

  10. #30
    Join Date
    Dec 2007
    Location
    Whidbey Island, WA
    Posts
    1,718
    Images
    456
    Rep Power
    95

    Re: Biayered-X

    Thanks Tybes,

    I'm almost there. Now the compiler is spitting out:


    error: expected unqualified-id before 'if'

    and highlighting the second to last line of the code. I'm not sure it needs to be in the sketch. I think it is just more examples of adding if then commands to the string. My worry is that it is there to loop the program back to the beginning so that it checks for commands from the controller again. If I comment out the entire last 3 lines including the last " } " then it compiles just fine.

    Code:
    #include <ax12.h>
    #include <BioloidController.h>
    #include <Commander.h>
    #include "poses.h"  // exported from PyPose
    
    BioloidController bioloid = BioloidController(1000000);
    Commander command = Commander();
    
    void setup(){
        // stand up slowly
        delay(100);                    // recommended pause
        bioloid.loadPose(QuadStart);
        bioloid.readPose();
        bioloid.interpolateSetup(500);
        while(bioloid.interpolating > 0){
            bioloid.interpolateStep();
            delay(3);
        }
    }
    
    void loop(){
      if(command.ReadMsgs() > 0){               // check for new messages
        digitalWrite(0,HIGH-digitalRead(0));    // toggle LED so we know johnny5 is alive
        if(bioloid.playing == 0){               // only process if we aren't currently doing a sequence
          if(command.walkV > 50){
            // walk forward
            bioloid.playSeq(CrawlForward);
          }else if(command.walkV < -50){
            // walk backwards
            bioloid.playSeq(CrawlBackward);
          }else if(command.walkH > 50){
            // turn left
            bioloid.playSeq(CrawlSideLeft);    
          }else if(command.walkH < -50){
            // turn right
            bioloid.playSeq(CrawlSideRight);
          }
          if(command.buttons&BUT_R1)
            bioloid.playSeq(openFlower); 
            }
          else if(command.buttons&BUT_R2)
            bioloid.playSeq(closeFLower);
            }
          else if(command.buttons&BUT_R3)
            bioloid.playSeq(Crawl2Stand);
          // more button commands... etc
        }
      if(bioloid.playing > 0)   
        bioloid.play();                         // continue sequence
    }

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •