Results 1 to 3 of 3

Thread: Wheel mode in Pypose ?

  1. #1
    Join Date
    Oct 2011
    Location
    United States
    Posts
    158
    Images
    1
    Rep Power
    29

    Wheel mode in Pypose ?

    I just built a rover I am using AX 12's , I need to put 4 of the servos in wheel mode, can this be done in Pypose ? I read somewhere you can do it in C but I do not know how to code in C ...

  2. #2
    Join Date
    Sep 2010
    Location
    ಠ_ಠ
    Posts
    2,300
    Images
    27
    Rep Power
    278

    Re: Wheel mode in Pypose ?

    Using an arbotix, you can send the commands quite easily in the sketch. I think the code below is correct, but never take my word for it (even I don't trust my word/work).

    Code:
    // After usual initialization procedure...
    void set_wheel_mode(int id, int wheelie)
    {
        if (wheelie)
        {
            ax12SetRegister2(id, AX_CW_ANGLE_LIMIT_L, 0);
            ax12SetRegister2(id, AX_CCW_ANGLE_LIMIT_L, 0);
        }
        else
        {
            ax12SetRegister2(id, AX_CW_ANGLE_LIMIT_L, 0);
            ax12SetRegister2(id, AX_CCW_ANGLE_LIMIT_L, 1023);
        }
    }
    
    void set_wheel_speed_dir(int id, int speed, int dir)
    {
        // speed is 0 to 1023 (not speed controlled; only "torque" controlled - mostly open loop with a PWM value)
        // dir is 0 for CCW and 1 for CW
        // dir is bit 10 with speed in lower 9 bits, so should be right (sleep deprived)
        int temp = (speed&0x03FF)|((dir&0x01)<<10);
        ax12SetRegister2(id, AX_GOAL_SPEED_L, temp);
     }
    Please pardon the pedantry... and the profanity... and the convoluted speech pattern...
    "You have failed me, Brain!"
    bleh
    more bleh

  3. #3
    Join Date
    Oct 2011
    Location
    United States
    Posts
    158
    Images
    1
    Rep Power
    29

    Re: Wheel mode in Pypose ?

    Thanks. It's been almost a year since I played with Pypose/Python/Audrino. I am spoiled by Roboplus.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. For Sale: Robot Kits ,Mecanum Wheel And Omni Wheel
    By Kevin Wan in forum Garage Sale
    Replies: 1
    Last Post: 10-09-2012, 02:06 PM
  2. Bioloid Demo mode not working
    By canicoll in forum Humanoids, Walkers & Crawlers
    Replies: 1
    Last Post: 02-25-2012, 08:10 PM
  3. Question(s) Reading Dynamixel's position in Wheel Mode
    By pauljurczak in forum DYNAMIXEL & Robot Actuators
    Replies: 3
    Last Post: 10-28-2011, 03:04 PM
  4. Anyone got Sabertooth packetized mode to work?
    By shobley in forum Arbotix, Microcontrollers, Arduino
    Replies: 9
    Last Post: 01-25-2009, 08:28 PM
  5. Sabretooth 2x10 - in p-serial mode
    By shobley in forum Arbotix, Microcontrollers, Arduino
    Replies: 1
    Last Post: 02-15-2007, 04:21 PM

Posting Permissions

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