Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 26

Thread: Py4bot - a Python Framework for Multi-Legs Robots

  1. #11

    Re: Py4bot - a Python Framework for Multi-Legs Robots

    Hopefully some Python person can give a complete answer for adapting the code to SSC-32.

    I believe you have a Lynxmotion SSC-32 board? Actually the other boards like USC-32 are probably knock offs of this board
    Not sure from your remarks if you have one of the more original ones: http://www.lynxmotion.com/p-395-ssc-...ontroller.aspx
    Or the slightly more recent USB version...

    Note: My Phoenix code base can probably handle your Robot... I do have an SSC-32 driver that is part of it. Probably would need to use my https://github.com/KurtE/Arduino_Phoenix_Parts project...

    The jerkyness can be caused by lots of things:
    a) The servos. I know a lot of people replaced MG995 servos with better RC servos... I used to use the hitec HS645mg (If I remember the numbers correctly)

    b) Power problems...

    c) Code... For example I have seen (and done) code where you say to move the legs in time X and after time X, you calculate the new servo positions and then output the commands to move to new positions in time Y... What happens is the servos start and stop between waiting for you to tell them the next spot to go to... The Phoenix code, tries to remove this, by telling the servo to start their move and while the move is going on it calculates the next servo positions and actually sends that new data to the SSC-32 minus the termination part such at, the appropriate time, it sends the termination of the command, as to have it start right as the previous command completes...

    D) Linux to Microcontroller... Again like c), the issue is that when your linux app is running, the commands might not be output at consistent timings, which can cause the jerkyness... Been a few threads on this.

    ...

  2. Re: Py4bot - a Python Framework for Multi-Legs Robots

    Quote Originally Posted by KurtEck View Post
    Hopefully some Python person can give a complete answer for adapting the code to SSC-32.

    I believe you have a Lynxmotion SSC-32 board? Actually the other boards like USC-32 are probably knock offs of this board
    Not sure from your remarks if you have one of the more original ones: http://www.lynxmotion.com/p-395-ssc-...ontroller.aspx
    Or the slightly more recent USB version...
    Yes. Mine is the USC-32 Knock-off and it is USB. Based on what I read, it's command controls are nearly identical to the SSC-32.

    Quote Originally Posted by KurtEck View Post

    Note: My Phoenix code base can probably handle your Robot... I do have an SSC-32 driver that is part of it. Probably would need to use my https://github.com/KurtE/Arduino_Phoenix_Parts project...

    The jerkyness can be caused by lots of things:
    a) The servos. I know a lot of people replaced MG995 servos with better RC servos... I used to use the hitec HS645mg (If I remember the numbers correctly)

    b) Power problems...

    c) Code... For example I have seen (and done) code where you say to move the legs in time X and after time X, you calculate the new servo positions and then output the commands to move to new positions in time Y... What happens is the servos start and stop between waiting for you to tell them the next spot to go to... The Phoenix code, tries to remove this, by telling the servo to start their move and while the move is going on it calculates the next servo positions and actually sends that new data to the SSC-32 minus the termination part such at, the appropriate time, it sends the termination of the command, as to have it start right as the previous command completes...

    D) Linux to Microcontroller... Again like c), the issue is that when your linux app is running, the commands might not be output at consistent timings, which can cause the jerkyness... Been a few threads on this.

    ...

    #1 is a problem (crap $8 servos)
    #2 is probably not a problem as I have a very high quality transformer that I'm using that can feed 40A at up to 12 V ( but it is dialed back to about 7V for servos)
    #3 this could totally be an issue with timing and my hacked together code. I'm just using simple loops and starting/stopping between each iteration.
    #4 I've ran my python app on linux/mac/windows - same issue - currently just connected to windows because the control app is windows, but same issue which leads me to think it is either #1 or #3

    I think #5 could be that the USC-32 just doesn't have good timings either and doesn't handle the inputs well (but I'd have to test more for that).

    I'll take a look at your Phoenix code. My C/C++ isn't as strong as it used to be but hopefully I can get the gist and turn it back to Python or Java.

  3. #13
    Join Date
    Sep 2015
    Location
    Grenoble, France
    Posts
    38
    Rep Power
    8

    Re: Py4bot - a Python Framework for Multi-Legs Robots

    @scprotz, yes, sure, Py4bot can be used for such Hexapod! It is made for such hexapod

    Do you have a complete documentation of your board, so I can write a driver?

    Py4bot also computes next step while previous one is executing, so moves are smooth. Well, as it is written in pure Python, you need a decent CPU, like BeagleBone Black or RPi3.
    Last edited by fma; 1 Week Ago at 02:44 AM.

  4. #14
    Join Date
    Sep 2015
    Location
    Grenoble, France
    Posts
    38
    Rep Power
    8

    Re: Py4bot - a Python Framework for Multi-Legs Robots

    I think the Veyron uses the same commands (they mimic the SSC-32).

    You can give a try with this driver; all you have to do is to adjust the port and baudrate, according to your board.

  5. #15

    Re: Py4bot - a Python Framework for Multi-Legs Robots

    Quote Originally Posted by fma View Post
    @scprotz, yes, sure, Py4bot can be used for such Hexapod! It is made for such hexapod

    Do you have a complete documentation of your board, so I can write a driver?

    Py4bot also computes next step while previous one is executing, so moves are smooth. Well, as it is written in pure Python, you need a decent CPU, like BeagleBone Black or RPi3.
    Again assuming it is an SSC-32, the link I gave in my previous post should lead you to the documents.. Again not sure if older one (did not have USB on it) or newer one...
    The guide for the older one: http://www.lynxmotion.com/images/html/build136.htm
    The protocol should be the same with the USB version as well..

  6. Re: Py4bot - a Python Framework for Multi-Legs Robots

    One challenge I did have was that these servos can try to draw too much power if they get in a bind (and get hot and eventually smoke and die). Do these suggestions provide some place to put in ranges so I can limit the rotation on the servo so I don't get them in a bind and burn them up?

    Thanks again for all the help. This is my first hex and I'm still learning as I go.

  7. Re: Py4bot - a Python Framework for Multi-Legs Robots

    Quote Originally Posted by fma View Post
    @scprotz, yes, sure, Py4bot can be used for such Hexapod! It is made for such hexapod

    Do you have a complete documentation of your board, so I can write a driver?

    Py4bot also computes next step while previous one is executing, so moves are smooth. Well, as it is written in pure Python, you need a decent CPU, like BeagleBone Black or RPi3.
    Here is the link to my board (this one is a prior rev but same command set). Seems like it may be a bit more limited than an SSC-32 or just more poorly documented. Not sure yet.

    One additional question - if I want to use Py4bot on OSX or Windows, it seems it depends on evdev. Is there a way around this? especially since my controller is a very generic one that only takes a simple serial connection from python?

  8. #18
    Join Date
    Sep 2015
    Location
    Grenoble, France
    Posts
    38
    Rep Power
    8

    Re: Py4bot - a Python Framework for Multi-Legs Robots

    Py4bot doesn't (yet) limit servos rotation, but it limits maximum inputs (step length/angle); it is easy to tune them so you never reach servo limits.

    I had a quick look at the documentation of your board. First, they use \n\r as terminator, instead of just \r. Second, the 'Q' command is missing. So, I will have to write a new driver to handle all this.

    About evdev, this Python module is needed to handle remote controllers, like gamepads. I'll try to find alternative, supporting MacOS.

  9. Re: Py4bot - a Python Framework for Multi-Legs Robots

    Quote Originally Posted by fma View Post
    Py4bot doesn't (yet) limit servos rotation, but it limits maximum inputs (step length/angle); it is easy to tune them so you never reach servo limits.

    I had a quick look at the documentation of your board. First, they use \n\r as terminator, instead of just \r. Second, the 'Q' command is missing. So, I will have to write a new driver to handle all this.

    About evdev, this Python module is needed to handle remote controllers, like gamepads. I'll try to find alternative, supporting MacOS.

    I typically use pygame (and it works across multiple platforms and has a wide install base) for gamepads - actually using it to control my NAO robot and works a wonder. I'll try to review the Py4bot code a bit myself too and see if I can provide any suggestions.

  10. #20
    Join Date
    Sep 2015
    Location
    Grenoble, France
    Posts
    38
    Rep Power
    8

    Re: Py4bot - a Python Framework for Multi-Legs Robots

    Pygame is a little bit overkill. I just found this package:

    https://pypi.python.org/pypi/inputs

    Should be very easy to migrate from evdev to inputs.

    Can you tell me what is the complete reference of your board? As it is does not follow the SSC-32 API, I would like to give another name to the driver...

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Interesting RPI3 with the HROS1-Framework.
    By LloydF in forum HR-OS1 Development and Discussion
    Replies: 6
    Last Post: 12-09-2016, 02:58 AM
  2. Camera / Vision Processing (within the HR-OS1 Framework)
    By r3n33 in forum HR-OS1 Development and Discussion
    Replies: 54
    Last Post: 03-20-2016, 09:00 AM
  3. Why using Python to control robots?
    By Snoopy in forum Software and Programming
    Replies: 2
    Last Post: 01-01-2015, 11:48 PM
  4. framework for robotics
    By iacoposk8 in forum Robotics General Discussion
    Replies: 2
    Last Post: 10-11-2013, 07:52 PM
  5. Question(s) PhantomX Code 6 legs in to 8 legs
    By Kar in forum Software and Programming
    Replies: 2
    Last Post: 05-09-2011, 09:44 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
  •