Project Phoenix Excel program + Manual

FYI - I also have excel 2007, (wish I was using 2003 :cry: ), I don’t get an error when I load the latest version beta of pep that I downloaded. But it gets loaded into what they consider to be compatability mode. They give you a one way to convert to the new 2007 format with all of the new features and the like. Not sure if my data is correct however… I don’t have the problem with the ;s showing up, but I get a lot of numbers like 7.10E-14 as pin numbers. I wonder if I cut and paste a couple of rows here if it would work…

97 Comment SEQUENCE STEP PIN0 PIN1 PIN2 PIN4 PIN5 PIN6 PIN8 PIN9 PIN10 PIN16 PIN17 PIN18 PIN20 PIN21 PIN22 PIN24 PIN25 PIN26 T0 T1 T2 T4 T5 T6 T8 T9 T10 T16 T17 T18 T20 T21 T22 T24 T25 T26 TMAX TTOTAL INFO1 140 Flip box 1 1 7.10E-14 0 0 1.80E-13 0 0 0 0 0 0 0 0 1.80E-13 0 0 0 0 0 160 160 160 160 160 160 160 160 160 160 160 160 160 160 160 160 160 160 160 160 Flip box Transition 12s to next pose 1 2 7.10E-14 0 0 1.80E-13 0 0 0 -31.248 -25.278 0 0 0 1.80E-13 0 0 0 0 0 160 160 160 160 160 160 160 160 160 160 160 160 160 160 160 160 160 160 160 160 Transition 12s to next pose 0 1 3 7.10E-14 0 0 1.80E-13 0 0 -20 -31.248 -25.278 0 0 0 1.80E-13 0 0 0 0 0 160 160 160 160 160 160 160 160 160 160 160 160 160 160 160 160 160 160 160 160 0 1 4 7.10E-14 0 0 1.80E-13 0 0 -20 1.53E-10 0.000112 0 0 0 1.80E-13 -31.248 -25.278 0 0 0 160 160 160 160 160 160 160 160 160 160 160 160 160 160 160 160 160 160 160 160

Here are like rows 5-9 of that page…

Kurt

hi zenta,

just wanted to ask you about PWM/deg factor in the PEP setup sheet. Where are these values being used? are these being used as the servo limit values? if yes, then whats the significance in determining the PWM/deg factor?and can you plz elaborate me how have you implemented these values in the code?to me these seem some values being used in some conditional statements during the motion sequences.

thanks,
umar

Hi,

They are used to calculate the correct position. I believe I’m using the same method that are used in Visual SEQ. Here is the sub in PEP:

[code]Sub CalculatePWM(LimitPWMRow As Integer, PWMFactorRow As Integer)
'Calculate the actual pwm value to each servo, uses PWM/deg factor from PEP sheet Setup
'Left front leg:
If TempCoxaDEG >= 0 Then
'calculate 0 deg to max deg PWM value:
TempCoxaPWM = Worksheets(“Setup”).Cells(LimitPWMRow, 3) + (TempCoxaDEG * Worksheets(“Setup”).Cells(PWMFactorRow, 3))
'Check MAX limit PWM value:
If TempCoxaPWM > Worksheets(“Setup”).Cells(LimitPWMRow, 4) Then
TempCoxaPWM = Worksheets(“Setup”).Cells(LimitPWMRow, 4)
End If
Else
'calculate <0 deg to min deg PWM value
TempCoxaPWM = Worksheets(“Setup”).Cells(LimitPWMRow, 3) - (TempCoxaDEG * Worksheets(“Setup”).Cells(PWMFactorRow, 2))
'Check MIN limit PWM value:
If TempCoxaPWM < Worksheets(“Setup”).Cells(LimitPWMRow, 2) Then
TempCoxaPWM = Worksheets(“Setup”).Cells(LimitPWMRow, 2)
End If
End If

If TempFemurDEG >= 0 Then
    TempFemurPWM = Worksheets("Setup").Cells(LimitPWMRow, 6) + (TempFemurDEG * Worksheets("Setup").Cells(PWMFactorRow, 5))
    'Check MAX limit PWM value:
    If TempFemurPWM > Worksheets("Setup").Cells(LimitPWMRow, 7) Then
        TempFemurPWM = Worksheets("Setup").Cells(LimitPWMRow, 7)
    End If
Else
    TempFemurPWM = Worksheets("Setup").Cells(LimitPWMRow, 6) - (TempFemurDEG * Worksheets("Setup").Cells(PWMFactorRow, 4))
    'Check MIN limit PWM value:
    If TempFemurPWM < Worksheets("Setup").Cells(LimitPWMRow, 5) Then
        TempFemurPWM = Worksheets("Setup").Cells(LimitPWMRow, 5)
    End If
End If

If TempTibiaDEG >= 0 Then
    TempTibiaPWM = Worksheets("Setup").Cells(LimitPWMRow, 9) + (TempTibiaDEG * Worksheets("Setup").Cells(PWMFactorRow, 7))
    'Check MAX limit PWM value:
    If TempTibiaPWM > Worksheets("Setup").Cells(LimitPWMRow, 10) Then
        TempTibiaPWM = Worksheets("Setup").Cells(LimitPWMRow, 10)
    End If
Else
    TempTibiaPWM = Worksheets("Setup").Cells(LimitPWMRow, 9) - (TempTibiaDEG * Worksheets("Setup").Cells(PWMFactorRow, 6))
    'Check MIN limit PWM value:
    If TempTibiaPWM < Worksheets("Setup").Cells(LimitPWMRow, 8) Then
        TempTibiaPWM = Worksheets("Setup").Cells(LimitPWMRow, 8)
    End If
End If

End Sub[/code]

ok, thats understandable now. Thanks zenta :slight_smile:

Moreover, what should be the recommended servo speed for a gait or any translatory or rotatory motion. Like if I use T2000 in the servo move command,its good for larger displacements since it’ll complete the motion in 2secs, but for smaller displacements its extremely slow.
should I move the servos with the Speed command? or should i just alter T2000 to T200?

Any thoughts?

thanks :slight_smile:
cheers

It all depends on what you prefer. I often use relative (1 cm) small steps and a time between 160 - 200 ms. (I’m refering to the time value used in PEP/SEQ).

2000 ms sound a bit too much, but then again it all depends of what your goal is.

Hi zenta,

I wanted to ask a few things about the gait creation in PEP.

Considering the 12-step ripple gait, the main methodology I understood behind is issuing a beat to alternating legs (LF,RM,LR) where each beat may consist of 2 steps and 6 beats would complete one cycle. So all together we find 12 steps in 1 cycle.The steps in a FWD walk gait could be:

1- Lift LF + Translate the body
2- Translate LF + Translate the body.
3- Pull LF to ground + Lift RM+ Translate the body.
4- Translate RM +Translate Body.
5- Pull RM to ground + Lift LR + Translate the Body.
6- Translate LR + Translate the Body.
7- Pull LR to ground + Lift RF + Translate Body.
8- Translate RF + Translate Body.
9- Pull RF to ground + Lift LM + Translate Body.
10- Translate LM + Translate Body.
11- Pull LM to ground + Lift RR + Translate Body.
12- Translate RR + Translate Body
**Loop back to step 1 with Pull RR to ground
**

This is what I inferred from PEP generated Gait.
If i am correct in this understanding then i want you to describe me how you determine the first step in this gait? why should the robot start from a displaced pose rather than from its mean position. has it been done to make the gait a periodic one? Realistically, it is always needed to put transition sequences from mean position to gait first step pose, so I was wondering what could be its significance and how to determine the first step pose!

let me know if you find my queries ambiguous, I’ll try explicating them in further detail.
And your assistance is always appreciable
Thanks,
umar

Hi Umar,

I’ve to admit that the gait part isn’t the best function in PEP, and that wasn’t the intention either. More like a tool for making unique sequences.

I think you got it right in understanding the gait part.
So, yes you do need transitions before and after a gait, especially when using large translations (long steps). I didn’t see the point of improving this part further more since Xan started to share his BAP code.

:laughing: I understand that can be a bit confusing. Well, what I did was to first make the gait sequence twice in two sequences (at this point you have determined the first step pose :wink: ), then overwrite the first sequence with a translation sequence.

hi everybody.
Zenta great work with PEP, congrats. i like it very much :smiley:

just have two things:

  1. is there version 2.02 but not LM? I’m looking for compatible with PEP manual one.
    i have own hex construction and disassemble and just rotate board is not so easy.

  2. second one is about PEP appearance mean these green and yellow boxes with particular leg setup on body&coxa part. isn’t it more logical to have left legs on the left and right legs on the right? also body on graph is “looking” bottom
    so top legs are really rear :slight_smile: it makes me so confused all time i playing with PEP :unamused:

may be its possible or also good idea to have graph of body rotated 180deg and front of hex “looking” top? also to have left legs at left and right at right :slight_smile:
my knowledge of excel and VB is so weak so I’m afraid to touch anything there.

Hi,

I’m sorry but I’m not going to change the orientation. To much work for nothing really, I preferred to have the robot faced towards me while playing.
But I’ve an old 1.06PEP version to you :wink:
PEP ver1.06.xls (1.14 MB)

lol thanks. i saw 1.09 on lynxmotion page compatible with PEP manual pinout, but looking for 2.02 version because of the SSC connection, which is not working for me by the way. i can paste error message today evening if you are interested, but i think it’s OS issue (win 7 64bit), but other soft like terminal or SEQ works fine.
ok, anyway i’m happy enough with that what i have

PS. other case: would it be enough if i change “Public const” in SSC32com module to make pinout compatible? or its also coded somewhere else?

What com port# do you use? PEP only support 1-4.
Changing the PIN defs would probably work for direct control between PEP and SSC-32 but not for exporting sequences.

ok, it’s com5 :slight_smile:
got it, seems to be i convicted to use 1.06 or 1.09 :confused:

just in case, one thing came to my mind yesterday: i took 2.02LM PEP and my robo with pinout as in PEP manual. simle check says that i only need to change name of windows for particular legs :slight_smile: since all legs of mine have same angle values in setup i do not need to care about that. and difference between LM config and PEP manual config is mirror so actually i really have left legs at left and right at right :smiley: and hexapod “looking” top.only window name states different, what i will change and all should be working.

so if anybody is interested in having left right top and bottom on their logical place you just need to plug hardware as in PEP manual and use PEP Lynxmotion sheet just changing names. but remember about setup sheet should have mirrored values accordingly.

by modifying the pep I found a surprise (a great gift for the owner of phoenix) :wink: secret or not :question:

maxport is defined to 4


Declare Function GetDefaultCommConfig Lib “kernel32” Alias “GetDefaultCommConfigA” (ByVal lpszName As String, lpCC As COMMCONFIG, lpdwSize As Long) As Long

Type COMMCONFIG
dwSize As Long
wVersion As Integer
wReserved As Integer
dcbx As DCB
dwProviderSubType As Long
dwProviderOffset As Long
dwProviderSize As Long
wcProviderData As Byte
End Type

Public Function EnumSerPorts(port As Integer) As Long
'returns non-zero value if the port exists
Dim cc As COMMCONFIG, ccsize As Long
ccsize = LenB(cc) 'gets the size of COMMCONFIG structure
EnumSerPorts = GetDefaultCommConfig(“COM” + Trim(STR(port)) + Chr(0), cc, ccsize)
End Function

Hi RoboticAI,

Would you mind tell a little bit more what you are posting here? Is this a fix to allow higher com than 4?. Where in the code are you referring to?

Hi Zenta,

in modcom module of pep 2.2 LM there is :
Private Const MAX_PORTS = 4 yes, it’s the number of com

I found letter to write with right leg.
BTW, great video!
The portion of code above is to check validity of a comport.
maybe an extended version with a listview or combobox with all port. When an user select one, validity is check with : if EnumSerPorts(number)<>0 then call connect

Thanks for the heads up, I’ll look into it one time. :smiley:

Is any update for 4DOF PEP ? t-hex ? ]

No, I’m sorry. Currently there are no working 4 DOF version of the PEP available.

I’m trying to use Mini Maestro 24 with arduino to control t-hex , but i cant solve the ik formulas yet.