No look at the order iv put the legs in. Letters not numbers. Your shift code needs to rotate in a circle, not jump from side to side. It will never have time to compensate.
Remember if you are using reasonably unmodified Phoenix code sources there is code that knows if the leg is on the left side or the right side. It needs to do this to reverse the servo outputs…
One such place is the function: GetPWMValues
You will notice that it looks at the LegIndex to see if it is <=2 and then does it calculations differently.
So PermaFrost your values should work. Again it is not the ordering of these constants that controls the order the legs lift up and down, it is the values set in the function GaitSelect into the array GaitLegNr… (Assuming version like 2.1…)
Kurt
well, now it goes RF LF RR LR. As soon as the RR leg lifts, the LR leg does a weird fast kick. another thing to notice is the gait ( or possibly the shift ) goes slow at RF and fast at LR (which might be causing the kick ). i think i need to modify the table values and the gait
Edit: ahh… how exactly are you viewing the robot at that drawing ? the only way to switch left and right and keep front and back at their place is by looking at the robot from below, that’s quite weird .
Yep: I look at the robot, like:
LF RF
LR RR
Also if you look at the thread on my Quad, Kåre suggested a different walking order for the gait:
So that is what I am playing with.
Kurt
Lol. Yes my drawing doesnt conform well with the actual robots left or right.
But I hope you see what I mean.
The tables should run so that the first shift of X and Z are on the robots right in the first part of the gait, then the second part of the gait the shift is in the robots left side. And return to the same point at which it started. (Front or rear)
I’m currently using these settings:
cRR con 0
cRM con 5
cRF con 1
cLR con 3
cLM con 4
cLF con 2
; (RR) (RF) (LF) (LR)
; 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,17,18,19,20,21,22,23,24,
X_Axis_Shift bytetable 100,110,120,130,140,150,151,152,153,152,151,150,140,130,120,110,100,89,88,87,86,87,88,89,90,
; (RR) (RF) (LF) (LR)
;0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,18 ,19 , 20, 21, 22,23,24,
Z_Axis_Shift bytetable 88,87,86,87,88,89,100,110,120,130,140,150,151,152,153,152,151,150,140,130,120,110,100,89,89,
[code]Wave24: ;Wave 24 steps
GaitLegNr(cLR) = 23
GaitLegNr(cRF) = 11
GaitLegNr(cRR) = 5
GaitLegNr(cLF) = 17
NrLiftedPos = 3
HalfLiftHeigth = 0
TLDivFactor = 20
StepsInGait = 24
NomGaitSpeed = 100[/code]
the legs are going RR FL RL FR, the lift on the RL is hardly noticeable ( its just a kick not a lift really ), the older values of cLR cRR cRF and cLF had a more subtle gait .
Is there a detailed explanation on how the code works, or atleast a flow chart ?, if i understood how it work i might be able to write a code of my own. i have a decent knowledge of programming and coordinates math, i just need to know how you are connecting the two together
I’ve been looking at the code for a while now and trying to change it into a quadruped code, then i remembered that kurte has a set of quadrupeds he’s working on on his thread. Are you using the same phoenix code on those quadrupeds, kurte ? if u don’t mind me asking
Yep, I am working on Quadruped code as well. However I am using a Botboarduino (Arduino) instead of a Basic Atom Pro (BAP28)… There are several others as well including Xan working on code. He posted his current BAP stuff over on the other thread.
Kurt
Does anyone else see this as an important point that the OP is missing? Or is it me?
What is missing?
Alan KM6VV
His understanding of the gait sequence as described by innerbreed. Or my understanding of his gait!
So if the legs are arranged in this manner:
FL FR
RL RR
The first two moves - RR to FL - cross the body and the next two moves - RL to FR - also cross the body; they are not moving in a circle as innerbreed pointed out several times. I would expect the gait to move RR, RL, FL, FR. I’ve included innerbreed’s diagram below - his naming convention is a bit different (for example, the right and left are reversed), but the same concept applies.
Well, its been a long time . I was quite busy with a team trying to make a rather big robot for the dependence day in our country, despite our heavy effort we didnt make it in time
, so far its 80% done with only the outer design to go
.
Anyway, now i have sometime to work on my robot again but this time i don’t want to shoot in the dark with the code, i want to learn how to make a code given any robot, can someone lead me to a good tutorial or a book the explains how to construct a good code for any robot ?
Thanks Everyone
So essentially you want to learn how to program? If you’re new at it, you might start with Arduino (www.arduino.cc) because of its simplicity and popularity. There are tutorials online and a variety of books out there:
robotshop.com/books.html
For example:
robotshop.com/arduino-robot-bonanza.html
Not quite, i have a good background in c++ and basic programming and I’ve worked with arduino before.But connecting the code to a robot, that’s something else. The tutorials i’m looking for are something like “Servo Sequencing”,“Gaits”,“Equations to Codes” ," Robot Balancing", Things that explain the connection between written code and the robot.
I’ve searched around the internet and found a few tutorials but nothing solid really, except for this book "springer.com/materials/mechanics/book/978-1-4419-1749-2 " The sample i read is pretty good, its only missing the coding part.
I don’t know any single book that helps for all of these cases. Often I find doing it is the best way of learning it.
There are several low level places to learn some of this, usually with real simple robots, examples include:
Seattle Robotics Society has (had) workshops and workshop robot kits that had simple continuous rotation servos (seattlerobotics.org/index.php)
Society of Robots has a 100$ robot type tutorial: societyofrobots.com/
There are many simple things based around Basic Stamps…
For intermediate level stuff, not sure. I have several different books, but most of them did not help much.
For advanced (Make my head hurt) There is the Theory of Applied Robotics (Kinematics, Dynamics and Control) by Reza N. Jazar
As for understanding Gaits, I have just try to learn by looking over the shoulders of ones like Xan and Zenta
Kurt
Did Xan and Zenta learn those things from books or just experience with robots ?
They can obviously answer better than I can. But for example Xan’s signature on the forum mentions the book by Jazar I mentioned.
There are also threads on several different forums talking about Gaits and Kinematics and the like.
Like: forums.trossenrobotics.com/showt … kinematics
Also I believe Xan and maybe Zenta has posted diagrams up on the forum outlining some of the different walking gaits. It may be in Xan’s thread: lynxmotion.com/images/html/proj102.htm
You can also learn a lot from Zenta’s project page: lynxmotion.com/images/html/proj098.htm
In here you can download his excel spreadsheet that he used to develop a lot of things including: Sequences, Also I think it may show some gaits and the like.
There are probably many other places I have not mentioned, but hopefully this should get you going
Kurt
Hello everyone, it has been a long time
I did a few improvements,on the robot design, especially on joints to make the less loose. Also derived some inverse trignometery to find the servos positions at any given foot point.
I was reading through the SSC user guide and noticed the hexapod sequencer so I read how it works and I got one question, if I shift the robot to the back, will it still be shifted during the gait or it will reset to center position ?
So, continuing from this thread, i was debugging xan’s code to find out why the SSC is unresponsive (although all connections are correct). I changed part of the main code to this:
[code]main:
'Start time
GOSUB GetCurrentTime], lTimerStart
serout S_OUT, i9600, "Time Started "]
;Read input
GOSUB ControlInput
serout S_OUT, i9600, "Controls Taken "]
;GOSUB ReadButtons ;I/O used by the remote
GOSUB WriteOutputs ;Write Outputs
serout S_OUT, i9600, "Outputs Written "]
;GP Player
IF GPEnable THEN
GOSUB GPPlayer
ENDIF
serout S_OUT, i9600, "GP Enabled "]
;Single leg control
GOSUB SingleLegControl
serout S_OUT, i9600, "Single Leg Control Reached "]
;Gait
GOSUB GaitSeq
serout S_OUT, i9600, “GaitSeq”] [/code]
The program is flowing normally and the messages are appearing in the terminal so it’s not really stuck. I’m trying to debug the commands received from the PS2 controller but i’m not really sure how they are saved, i’m currently still looking and open for tips