Page 4 of 4 FirstFirst 1234
Results 31 to 40 of 40

Thread: My new 17 DOF kung fu fighter, "Musa"

  1. Re: My new 17 DOF kung fu fighter, "Musa"

    You need the foot of the floor to have a cleaner walk. Good job.

  2. #32

    Re: My new 17 DOF kung fu fighter, "Musa"

    nice robot!
    Here is my blog with updates on all of my robot projects:
    http://nishiproject.blogspot.com/

    Projects I am working on now:
    Masha robot

  3. #33
    Join Date
    Feb 2009
    Location
    Mesa, AZ
    Posts
    351
    Images
    84
    Rep Power
    49

    Re: My new 17 DOF kung fu fighter, "Musa"

    Been sick all week with the flu. Dang change in weather got me! But I made a few visual improvements to Musa before the sickness. I'm finally feeling better enough to finish up this morning.


  4. #34
    Join Date
    Feb 2009
    Location
    Mesa, AZ
    Posts
    351
    Images
    84
    Rep Power
    49

    Re: My new 17 DOF kung fu fighter, "Musa"

    Poses complete, Musa is ready to rock'n'roll! Now I've run into a problem uploading the code to my Arbotix to respond to the Commander V2. This is a modification of DB's HiNoHikari code. So here is what I have.

    Code:
    #include <ax12.h>
    #include <BioloidController.h>
    #include <Commander.h>
    #include "MusaKungFu.h"  // exported from PyPose
    
    BioloidController bioloid = BioloidController(1000000);
    Commander command = Commander();
    int stance=0; // 0 for standing/StartPosition, 1 for squatting/CombatStance
    void setup(){
      command.begin(38400);  //open the serial port 
        delay(100); // recommended pause
        bioloid.loadPose(StartPosition);  // stand up slowly
        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){
            if (stance==1){
            bioloid.playSeq(StartPosition);// If we are in a crouch pose, lets stand upright first
          }bioloid.playSeq(WalkForward);
            stance = 0; // we are standing upright
          }else if(command.walkV < -50){
            if (stance==1){
            bioloid.playSeq(StartPosition);// If we are in a crouch pose, lets stand upright first
            }bioloid.playSeq(WalkBackward);
            stance = 0; // we are standing upright        
          }else if(command.walkH > 50){
            if (stance==1){
            bioloid.playSeq(StartPosition);// If we are in a crouch pose, lets stand upright first
          }bioloid.playSeq(TurnL);
            stance = 0; // we are standing upright         
          }else if(command.walkH < -50){
            if (stance==1){
            bioloid.playSeq(StartPosition);// If we are in a crouch pose, lets stand upright first
          }bioloid.playSeq(TurnR);
            stance = 0; // we are standing upright         
          }else if(command.lookH > 50){
            if (stance==0){
            bioloid.playSeq(CombatStance);// If we are in a standing pose, lets crouch first
          }bioloid.playSeq(SideStepL);
            stance = 1; // we are crouching  
          }else if(command.lookH < -50){
            if (stance==0){
            bioloid.playSeq(CombatStance);// If we are in a standing pose, lets crouch first
          }bioloid.playSeq(SideStepR);
            stance = 1; // we are crouching          
          }else if(command.lookV > 50){
            bioloid.playSeq(StartPosition);
            stance = 0; // we are standing upright           
          }else if(command.lookV < -50){
            bioloid.playSeq(CombatStance);        
            stance = 1; // we are crouching      
          }if(command.buttons&BUT_R1){
            if (stance==0){
            bioloid.playSeq(CombatStance);// If we are in a standing pose, lets crouch first
          }bioloid.playSeq(AttackF); 
            stance = 1; // we are crouching      
          }if(command.buttons&BUT_R2){
            if (stance==1){
            bioloid.playSeq(StartPosition);// If we are in a crouch pose, lets stand upright first
          }bioloid.playSeq(SlapRight);
            stance = 0; // we are standing upright           
          }if(command.buttons&BUT_R3){
            if (stance==1){
            bioloid.playSeq(StartPosition);// If we are in a crouch pose, lets stand upright first
          }bioloid.playSeq(AttackR); 
            stance = 1; // we are crouching      
          }if(command.buttons&BUT_L6){
            if (stance==1){
            bioloid.playSeq(StartPosition);// If we are in a crouch pose, lets stand upright first
          }bioloid.playSeq(AttackL); 
            stance = 1; // we are crouching      
          }if(command.buttons&BUT_L5){
            if (stance==1){
            bioloid.playSeq(StartPosition);// If we are in a crouch pose, lets stand upright first
          }bioloid.playSeq(WW); 
            stance = 1; // we are crouching      
          }if(command.buttons&BUT_L4){
            if (stance==1){
            bioloid.playSeq(StartPosition);// If we are in a crouch pose, lets stand upright first
          }bioloid.playSeq(Chop);
            stance = 0; // we are standing upright           
          }if(command.buttons&BUT_RT){
            if (stance==1){
            bioloid.playSeq(StartPosition);// If we are in a crouch pose, lets stand upright first
          }bioloid.playSeq(GetOffBack);
            stance = 0; // we are standing upright           
          }if(command.buttons&BUT_LT){
            if (stance==1){
            bioloid.playSeq(StartPosition);// If we are in a crouch pose, lets stand upright first
          }bioloid.playSeq(GetOffFace);
            stance = 0; // we are standing upright           
        }
      }
      }// end else
       
        if(bioloid.playing > 0)  { 
          bioloid.play(); // continue sequence
        }
      } //end loop
    And here is the error Arduino 022 spits out.

    Code:
    ArbotComm.cpp: In function 'void setup()':
    ArbotComm:11: error: no matching function for call to 'BioloidController::loadPose (transition_t [7])'
    C:\Users\Mannyr7\Desktop\arduino-0022\libraries\Bioloid/BioloidController.h:51: note: candidates are: void BioloidController::loadPose (const unsigned int*)
    If it matters, I am running Windows 7 64bit.
    Last edited by mannyr7; 04-07-2011 at 08:32 PM.

  5. #35
    Join Date
    May 2008
    Posts
    2,228
    Images
    155
    Rep Power
    127

    Re: My new 17 DOF kung fu fighter, "Musa"

    Manny, you have "loadPose(StartPosition)" and "playSeq(StartPosition)" -- you can't have a pose and a sequence with the same names (as they are both c-structs).

    -Fergs

  6. #36
    Join Date
    Feb 2009
    Location
    Mesa, AZ
    Posts
    351
    Images
    84
    Rep Power
    49

    Re: My new 17 DOF kung fu fighter, "Musa"

    Ok, so I changed ".loadPose(StartPosition)" which is a sequence, to "loadPose(Standing)" which is a pose. Here's the result:

    Last edited by mannyr7; 04-07-2011 at 08:53 PM.

  7. #37
    Join Date
    May 2008
    Posts
    2,228
    Images
    155
    Rep Power
    127

    Re: My new 17 DOF kung fu fighter, "Musa"

    That would appear you haven't selected the right board type (sure you don't have Arduino selected instead of ArbotiX?)

    -Fergs

  8. #38
    Join Date
    Feb 2009
    Location
    Mesa, AZ
    Posts
    351
    Images
    84
    Rep Power
    49

    Re: My new 17 DOF kung fu fighter, "Musa"

    This was fixed by putting the Arbotix folder in my "/arduino/hardware" folder and selecting the Arbotix as my board within arduino IDE.

  9. #39
    Join Date
    Sep 2008
    Posts
    60
    Images
    2
    Rep Power
    42

    Wink Re: My new 17 DOF kung fu fighter, "Musa"


  10. #40
    Join Date
    Feb 2009
    Location
    Mesa, AZ
    Posts
    351
    Images
    84
    Rep Power
    49

    Re: My new 17 DOF kung fu fighter, "Musa"

    Nice pic. Thanks for posting!

Thread Information

Users Browsing this Thread

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

Tags for this Thread

Posting Permissions

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