Society of Robots - Robot Forum
Software => Software => Topic started by: Microchip on June 13, 2008, 02:38:31 AM
-
Hello,
I am new on this forum and only slightly less new in robotics. I am currently studying Hexapod movements and in particular, free gaits to achieve omni directional movement.
While many apparently successful omnidirectional hexapods are around, most of them seems to use IK as a way to produce the gaits. My first question is thus : are those really free gaits or is the full IK sequence is already programmed ? In other words, has anyone succeeded in programming an IK module that takes any direction vector as input (the input vector would have two coordinates, "forward", +/- [0-1] - 1 = full speed, 0 = no movement and the signum is backward/forward, and an orientation) and output the servo's angles ?
I made some research and I have found many other approaches and I'd like to know if anyone has implemented them with success :
- Cyclic Genetic Algorithm
- Staged evolution (oscillating leg first, then the control of each leg)
- Restrictedness
The last one, first seemingly published in Fielding, M.R. 2001, seems the most interesting but I can't get CLAWAR 4 (the conference where the full paper was presented) and could get the following papers which don't describe the full algorithm in enough detail to implement it.
Finally, and that could have been my first question but I didn't want to seem like I didn't "JFGedI", how do you make your Hexapod move in such a smooth way, forward, and also turn ? Smile
Thank you !
Guillaume
-
im in the phase of programming a hexapod
its easy to figure out the forward movement , the turns would be a little tricky
1------------2
-------------
3------------4
-------------
5------------6
so imagine the hexapod is looking forward, the 1 3 5 would be his left legs and 2 4 6 his right ones
you simply have the sex legs down (lifting the robot body of the floor)
you start to raise 2 and 3 and 6 and move em forward then low em down again to the floor
in the same time you push the other 3 legs backwards
so your robot is gonna be pushed forward a step
now you do the same with the other 3 legs and so on
about turning you should determine on what pivot you want to turn (mostly center of body)then dependin on that you find a way to do it
-
In other words, has anyone succeeded in programming an IK module that takes any direction vector as input (the input vector would have two coordinates, "forward", +/- [0-1] - 1 = full speed, 0 = no movement and the signum is backward/forward, and an orientation) and output the servo's angles ?
Yeap, tons of research out there that covers this. Its all been done for robot arms, which technically is a hexapod leg really :P
*If* I were to do a hexapod, I'd probably just do fuzzy logic combined with sensors on the feet. IK for 6 legs simultaneously is computationally heavy for a microcontroller . . .
-
I made a hexapod that featured full IK gait. See it here:
http://letsmakerobots.com/node/136
I'm not sure whether basic microcontrollers can handle IK calculations or not, but I'm assuming you would either use a more powerful microcontroller or a PC communicating to it. I used a tiny laptop to control mine.
I could share my the IK application I programmed in Java. I was thinking about cleaning up the code and commenting it a bit and uploading it to the internetz, but I'm lazy so instead I've been looking for an opportunity to have someone kick my but for not doing it. :P So, if you interested in my approach I would gladly share it. :)
I think the most important part in making it move smooth is the servos/actuators. They need torque that is a bit more than what would be minimally possible. I guess the actuators speed plays in as well. I didn't succeed on making my hexapod move smooth. It could have been because of the construction of it which tended to bend a little and such, so that also plays in to making it smooth.
-
2 revolute axis IK is computationally heavy. I tried making an arm to draw stuff.
A typical leg has 3 or 4 servos, that's 18 to 24 servos. I doubt you would need the IK. Just put pressure sensors on the top and joint of each leg, and you should be fine for complex movment.
Another thing to consider (although not as important as in a drawing arm): Synchronizing speeds in servos.
An easier aproach is to make a few open servo (http://www.openservo.com)s and program a 180deg out of phase trapezoidal motion.
-
to smooth servo motion would be relativly easy
its just a matter of changing the high pulse width very slowly, using a loop or somthin that ends at a specific time with the servo shaft at the wanted destination
-
In theory, it's simple for one servo. Do that for every servo :P
-
youy can check the thread about how to control multiple servos, you can use that piece of code
in the 20ms delay place put up some code to increment the values corespondent to the servos
still easy
-
there's just some pseudocode there, and it's a bad approach. you will lose a lot of resolution using that method, plus 2 same signals (max for first servo x1, and max for last servo x18 won't be in the same moment. or at least close).
-
well, ya got better? would be glad to see it
-
not really.
i had an idea of using a sort in the dead time (after 2ms pass, and last pulse falls). but then i realised it's just way easier to control, say 4 or 6 servos with hardware pwm channels, and have several servo driving chips around.
-
if PWM ports are enough then its surely the easiest way
-
Just a note before I start I have no legged robot experience :)
Ok why not use a sort of lookup table?
Have each sequence or step designed to move the robot in a specific degree. The size of the lookup table would depend on your resolution.
For each degree you would have a list of servo motions like servo 4 to 25 degrees for 6 secs. Then feed that into a control loop with a timer to count down and adjust the servos when each one times out.
That way the main program just says vector to 27 degrees and the motion routine loads a bunch of constants from the lookup table for 27 degrees and then it starts the motion. Kinda like the trig lookup tables only you would solve the IK formulas before hand and enter them.
Some of the values would even correspond to other angles by reversing them. If that didn't turn into a nightmare for the program you could just have 180 degrees and then reverse those for anything over 180.
-
mm i didnt get it ,,can u provide a pseudo code or somthin?
-
you can't do IK in such a simple lookup table. for every joint, your table gets one more dimension, multiplies in size by one order of magnitude, and your lookup algorithm, by one order of complexity (big O notation). If I was you, I'd just stick with a simple pattern (3 legs now, wait, other 3 legs, wait, etc).
benji, pwm ports are never enough :P that's why you need more chips. it's a basic tradeoff cost<->time (as always :P). you work a lot to make efficient code, or you buy more chips and let the hardware do it for you. using 2 16bit chans and 2 8bit chans would work out nicely for a single leg, so for a hexapod you would need six chips.
the good thing about this is that you can create motion profiles, like trapezoidal shapes, and send the same signal to all servos. then, depending on the motion profile, they would work in antiphase. for turning, you'd have to invert the signals on a row.
Or, you could use some openservos (http://www.openservo.com)