An Java OpenGL simulator of a 6 legged crab robot
My first robot was a hexapod (crab robot). I didn’t know how to make it walk. Nobody was sharing their code, either.
I didn’t want to break 18 $15 servos the first time it tried to stand up. I knew how to write video games, so I loaded my crab design into an empty world and taught it to walk there.
This program is that simulation, open source and free of charge. I hope you find it useful!
It was living on sourceforge for a long time and nobody could find or use it. It also ran in SDL and all my new stuff runs in Java, so I ported it over. New bugs may have snuck in.
OSX users should be able to run with start.command.
Win32 users should be able to run with start32.bat.
Win64 users should be able to run with start64.bat.
When the program begins, click once in the window so it can hear keyboard instructions.
While holding the right mouse button:
- WASDQE will fly the camera
- moving the mouse will turn the camera
When the program starts you are in calibration mode. There are several modes:
- calibration
- sit down
- stand up
- move body
- ripple walk (one leg at a time)
- wave walk (two legs at a time)
- tripod walk (three legs at a time)
period and comma will cycle through the modes.
This mode is for calibrating the servos on the real robot. It’s mostly useless at present.
Robot sits down and returns to startup position.
Robot plants all feet and moves body to be between the feet.
WASDQE will move the body without moving the toes.
ZXCVRF will rotate the body without moving the toes.
B will return the body to center and level.
You do not have to return the body to center position to walk.
- WS walk forward and backward
- AD walk sideways (strafe)
- QE raise and lower the body
- RF turn while walking.
Please use the github issue tracker in this project to see known bugs and add your findings.
Please visit the forums
- Choose File > Import > General > Existing Projects into Workspace and select “Next”.
- Choose “Browse” next to “Select root directory” and select the root folder of your download/clone from github.
- eclipse will scan the folder and find the project. Choose “Finish”
This project has been developed with the 1.7 JDK. You can find out more about it here:
- http://stackoverflow.com/questions/6267392/how-do-i-use-jdk-7-on-mac-osx
- http://www.oracle.com/technetwork/java/javase/downloads/index.html
This project has been developed with JOGL as a library. You can find out more about it here:
- https://jogamp.org/wiki/index.php/Downloading_and_installing_JOGL
- https://jogamp.org/wiki/index.php/Setting_up_a_JogAmp_project_in_your_favorite_IDE#Eclipse_IDE_project
More details are available in the forums.