I’ve been working on a project for some time now, to develop a C++ program for simulating different legged robots. Currently I am focusing on hexapods as these don’t suffer from the need to balance like bipeds do. The intent of this project is to produce a system that can animate a wide range of legged robots with varing numbers of legs and degrees of freedom, that could either be used to drive simulated robots in a MechWarrior styled game, or remotely control physical hardware by issuing servo angles.
The project is very much in the prototype stage, but I have already got a Inverse Kinematic system in place that allows for more than three degrees of freedom in its legs. My test hexapod model (seen in my profile picture) has a 6x4 configuration similar to Zenta’s T-Hex (with the legs being angled differently). Although I haven’t had chance to test, I am confident that legs with 10 or more joints could be controlled by the system (with contraints being placed to reduce the number of kinematic solutions).
I’m now at the stage with this project where I’m attempting to make the model walk. This is proving more problematic than I origionally anticipated. What i’ve got working is the hexapod able to walk around a flat virtual world using a tripod gait, able to move in all directions and turn, as well as perform some of the body shifting actions i’ve seen. This setup is easy for me to understand and implement in code, but its the other gait options as well as terrain adaptation that I am stuck on at the moment.
I was wondering if anybody had any information about how these work (preferable independant of code), as I am really hoping that I can get this Simulation Engine performing all of the activities any hexapod owner would expect.
Here is a better view of the hexapod model i’m using. I origionally designed it for a strategy game as a Mobile Shield/Cloak Generator but couldn’t get it working in game.
Once my 24 hour registration period has passed i’ll upload a picture of the hexapod walking.
Edit: Actually, I uploaded a video of my idea a while ago. It was an early proof of concept that I made using C# and XNA. Worked well but has no structure to it. The latest version, although able to operate the same, has a much better code structure and kinematic system, as well as having significantly better performance.
Very interesting project you are presenting. I saw your video, at first I didn’t notice but it seems like you have a considerable amount of joints on each leg. Looks like you have a very good control on the kinematics. I guess you have implementet 3DOF body rotation too?
Yes Zenta, there are definately more than 4 joints in each of those legs. I wanted to see if I could make something walk that had tenticle legs, and that seemed sufficient to give the effect. I designed the kinematic system to make as few assumptions about how the leg geometry is positioned as possible, and as such uses a heuristic approach to the problem, rather than an algorithmic one.
I didn’t have 3DOF body rotation in the version shown in that video but I do now, along with 3DOF translation and even a rotation offset inspired by watching your A-Pod video (great work on that by the way ). I currently use an Xbox 360 controller’s analog sticks and triggers to control the first 6 DOF, with good results.
Funny you should mention the Stalker, it was one of the robots that inspired me to start this project. I remember reading the topic and how he changed the design because the 45 degree angle of the legs affected the kinematics calculations, thats when I thought “Surely there must be a way to just place a leg in any position you want and have a system figure out the rest”. Thats what I’ve tried to make :mrgreen:, and to prove the concept I did give the 45 degree rotation a go. I think that change made its way into the video as the legs shift from vertical when crouched whilst moving.
Thats the kind of program i’m trying to make, but with the difference being that it would be more generic. I designed that hexapod model for the game Supreme Commander, but never got round to using it. I would love to have a live version of it , particularly if I could get this program to link into several SSC-32’s.
I’m going to have a look at til77’s program and see what i’m missing from my gait system. The other thing I would like this to do is walk on rough terrain. I’ve got a few idea’s of my own about this, but I was wondering if there was any tried and tested approach used here?
Thanks for linking me to the information about walking gaits from Oricom. I’ve found it very useful, and now got the beginning of a gait engine that supports more than just tripod. The only problem at the moment is that I need to rethink how to produce walking with these different possibilities, as with tripod the stance legs were always moved back by the same amount as the swing legs moved forward.
Anyway, here is a pic of the hexapod using the ripple gait. Note that this version of the simulation doesn’t have a flat terrain visible. As you can see, when the legs raise up the body tilts to compensate in a similar manner to 3D Balance Gestures, except that it uses the same kinematic system as is used for the legs rather than virtual springs.
I know I posted the last few times but I feel the progress i’ve made with this project warrants another post.
Using the information on Oricom’s site I’ve been able to create a gait engine that allows for any form of gait to be created by saying how long up and down each leg will be, and at what time it starts. With this I’ve implemented the three standard hexapod gaits (tripod, wave, ripple), but others should be possible for larger numbers of legs, or disproportioned legs (with big legs having a longer stride time over smaller legs). Again, as with all the features of this engine, until I actually import robots with the traits mentioned there is no way for me to categorically prove my claims, you’ll all just have to trust me .
The biggest problem I had with getting this working (and there are still a few things left to iron out) was actually making the hexapod move, rather than just control its legs on the spot. This had me thinking for the whole of last night, as the tripod walk I had previously (as seen in the earlier video) worked really well but required modifications that were non-trivial. Eventually, after a lot of hours being unable to get to sleep the solution hit me , and today I’ve been implementing the idea. Now the hexapod moves around on a flat surface in the virtual world, with the body moving seemlessly as if it is floating.
This is a big step in the project as tripod gaits have been a part of this project for so long, the ability to choose another one that better suits the hexapod design and stability is just fantastic :mrgreen: . Stay tuned for more updates and pictures!