VB Windows Hexapod Control Program based on Xan's Code

SERV-O-MATIC Serial Port Config

You can run it directly from the executable here. You don’t need to have an SSC32 to try it. It will just search the comm ports and not find anything.
otherrobots.com/OtherRoboticsInstalls/ServoMaticSerialPortConfig.exe

Something similar in just basic checking for a modem:

'set the loopback variable 1=set
loopback=0

' now find all active ports
dim port$(20)
for portNo = 1 to 20
    oncomerror [trap]
    found=0
    open "Com";str$(portNo);":9600,n,8,1,ds0,cs0,rs" for random as #com
    found=1

    [trap]
    if found=0 then
        if ComError$<>"The device identifier is invalid or unsupported" then
            print "port ";str$(portNo);" is available"
            print ComError$
        end if
    else
        print "port ";str$(portNo);" is available"
        print
        port$(portNo)="Com"+str$(portNo)
        close #com
    end if
    oncomerror
next portNo
print
'cycle through active ports and send a message
'if loopback is set or sent ATZ to query the modem

found=0
for portNo = 1 to 20
    if port$(portNo)<>"" then
        print "Checking port ";portNo
        open port$(portNo);":9600,n,8,1,ds0,cs0,rs" for random as #com
        if loopback=1 then
            print #com, "Test"
            delay = time$("ms") + 50
            while time$("ms") < delay
            wend
            t$=input$(#com, lof(#com))
            if t$="Test" then
                Print "Com port found on ";port$(portNo)
            else
                Print "Com port not active"
            end if
        else
            print #com, "ATZ"
            delay = time$("ms") + 1000
            while time$("ms") < delay
            wend
            t$=input$(#com, lof(#com))
            if instr(t$,"OK")>1 then
                Print "Modem found on ";port$(portNo)
            else
                Print "Modem not active"
            end if
        end if
        close #com
    end if
next
print ""
print "modem check complete"

Now you’ve got me thinking. If I added two more command line parameters:

“send to device command” and “device acknowledgment” then the program could send a user defined command and look for a user defined result, essentially it could then search for any robot or other device on the comm port.

:open_mouth: Big news! I have officially begun version 2.0 of HexControl. Screen shots will be up soon. I have included a list of features that I intend to implement. V2.0 will launch with at least 1-3 standard. The others will come later. Tell me what you think?

V2.0 will include the following:

  1. Hexapod config files (no more editing variables in the code, you can load preconfigured robots, edit them, and save them all from the program

  2. Improved COM management (thans to BR459)

  3. An all-new interface design (onscreen controls and head support still included)

  4. Support for gamepad control and possibly joystick control

  5. OpenCV facetracking support! and video capture.

  6. Many of the improvements from Xan’s IK code since his 1.2 release. Including balance calcs

  7. Support for hexapods and quads!

  8. Support for completely custom robots with unique leg dimension and positioning. (All legs will not have to be the same size, or in the same locations. It will all be customizable)

gratulation :slight_smile:
great work when u finsihed! genial!

face tracking only with open cv or with RoborealM too?

I am glad to see your V2.0

Hmm… I thought since they started charging for Roborealm that people might perfer OpenCV but maybe I’ll include both options…we shall see.

Nice work on V2.0. Especially the built-in parameter settings. I’ll be surely trying this know.
Thanks and keep going

Some development pictures for Hexcontrol V2:

Main Screen:

Robot Setup Screen:

Serial Connection Setup Screen:

when is release day? :wink:

looks really good!

I hate to make promises…but I am hoping for an innitial release at the end of August.

hello ,

is your computer down??

or do you have lose your internet connection?

im waiting for You :wink:

Haha, no neither.

In fact…

** V2.0 beta has just been released

Go here to get it: lynxmotion.net/viewtopic.php?p=43770#43770

Here is what the beta includes (so far):

  1. Hexapod config files (no more editing variables in the code, you can load preconfigured robots, edit them, and save them all from the program - Yes!

  2. Improved COM management (thans to BR459) - Yes!

  3. An all-new interface design (onscreen controls and head support still included) - Yes!

  4. Support for gamepad control and possibly joystick control - Not yet

  5. OpenCV facetracking support! and video capture. - Not yet

  6. Many of the improvements from Xan’s IK code since his 1.2 release. Including balance calcs - 50%

  7. Support for hexapods and quads! - Only hexapods…for now

  8. Support for completely custom robots with unique leg dimension and positioning. (All legs will not have to be the same size, or in the same locations. It will all be customizable) - Yes!

So in summary, the beta is very stripped down, only has remote control functionaltiy right now, but it has a bunch of the other improvements like:

  1. A seperate configurable comm port manager.
  2. Robot characteristic files and robot editor. No more changing values in the code! Just load a robot file or build your own with the robot editor. I will be releasing pre-built robot files for the Phoenix and the MSR-01 but you might want to modifiy them if your setup is different from the standard.
  3. All the menu functionality necessary to implement joystick control and and openCv is complete…now I jsut have to finish it!
  4. Also includes basic balance calcs (but they are currently disabled because I don’t like them. To turn them on go to the hexengine module, mainrobotIK function and change the balancecalcs line from false to true) I will make this a button…soon.

Anyways, check it out!! Let me know what you think? Mess around with it. Load robot files. Build your own. Play with the Comm manager. Feedback is welcome…**

Has anybody run the beta yet? I’d like to hear how its working! :open_mouth:

Just downloaded it now and I’m going through the code. Intense! Very nice job!!!

Hey flowbotx, you think about adding individual leg control to the mix?

Ive been trying to get my RC phoenix to try and take its front or rear 2 legs… to try and move them towards each other and pick something up while the rear 4 legs are locked in position but am having a challenging time getting them to cooperate with me.

“More ideas”

–Aaron

Hi FlowbotX,

at the moment I create the configuration file for my CH3-R. If the file is finished I test your tool but at the moment some other projects bonding me.

Greatings
Matthias

I think individual leg control is a little out of my reach right now but the individual leg characteristics that are stored in the new robot config files are a step in that direction…

Hey if you do get a config file set up for the CH3, send me a copy so I can include it in the download.

Hey if you do get a config file set up for the CH3, send me a copy so I can include it in the download.

Hi,

no problem I share the file if available.

Greatings
Matthias

This gives me additional incentive to build a quad! Is that supported yet?

No, but all the structural framework is in place. It will use the same exact kinematics engine and the quad balance is already implemented. I just have to put 2 and 2 together which I will do…as soon as I have some free time. You know how that goes. :confused: