first, please let me express my gratitude as this is an amazing
application and I cannot understand how it is not more popular. Rest
assured I shall spread the word :)
I had a question though: I am interested in designing a walking
controller for the human model. Is there any way to export the code
into .py scripts? I notice that the "code" view looks like python but
does not have any import statements etc, so I am not clear as to where
all that code gets embedded, and how I could run it outside of
Mekanimo.
Thanks a lot again, this is amazing work,
-Andrej
Thanks for the kind words. Code is all Python (plus several external
libraries like wxPython, pyBox2D, numpy, PIL, ...) mixed with
Mekanimo's Python based API. Instead of exporting the Mekanimo code
you can import your controller code into Mekanimo. Everything should
be the same as working with regular Python code. If your controller
code is in C/Fortran or a DLL then you can use CTypes or other usual
ways to communicate with it. One of the tutorials (http://
www.mekanimo.net/tutorial/spirograph/) show how to run multiple runs
with different settings. If you tell me a little bit more about how
you are going to implement your controller I may be able to give you
more specific guidance.
>>> "I notice that the "code" view looks like python but
>>> does not have any import statements etc, so I am not clear as to where
>>> all that code gets embedded, and how I could run it outside of
>>> Mekanimo."
Mekanimo uses its own namespace. If you type locals() at the
interpreter you can see everything it uses. All the imports are done
prior to GUI initialization into a namespace and then this namespace
is used in both the interpreter and the code panel. You can try
importing the libraries you need and if you get
"Traceback (most recent call last):
File "<input>", line 1, in <module>
ImportError: No module named yourLibrary"
Then you can append the path your library resides in into os.sys.path
and try to import it again.
Are you using frequency, amplitude, and phaseAngle attributes of the
joints (torsional springs) or applying external forces/torque to move
the dummy?
If you manage to teach our dummy how to walk please share your code
with us.
Peace.
Fahri