Skip to content

DynaMechs rebuilt with CMake. Original project website: http://sourceforge.net/projects/dynamechs/ . DynaMechs is orginally developed by Scott McMillan. Current version has been tested on Ubuntu 10.04 and Mac OS Lion 10.7.

Notifications You must be signed in to change notification settings

idanceyang/DynaMechs

 
 

Repository files navigation


First have cmake-2.8 installed

Then perform out-of-source make (recommended):

1. 
$ cd ~/ros/DynaMechs/build

2.
$ cmake ..
or 
$ cmake .. -DCMAKE_INSTALL_PREFIX=/tmp/dynamechs
[ in Ubuntu, by default, CMAKE_INSTALL_PREFIX is set to /usr/local ]


3.
$ make
or 
$ make VERBOSE=1

4.
$ sudo make install

In Ubuntu:
the dm, dmu and dmgl libraries will be installed to /usr/local/dynamechs/lib, their header files will be installed to
/usr/local/dynamechs/dm
/usr/local/dynamechs/dmu
/usr/local/dynamechs/dmgl
respectively.

The xan_viewer executable will be installed to /usr/local/bin .



If you want to generate Eclipse project, use the following line:
$ cmake -G "Eclipse CDT4 - Unix Makefiles" -D CMAKE_BUILD_TYPE=Debug ../DynaMechs/

Note here, if you want to use Eclipse CDT as the IDE and at the same time use out-of-source build, 
you cannot make the 'build' folder a subfolder of 'DynaMechs' (which is the project source folder). 
You have to make the 'build' folder a sibling of 'DynaMechs' folder. Otherwise you won't see the generated binaries/libraries
in the treeview.




Run the test program:

For example, the crank demo executable will be generated in '~/ros/DynaMechs/build/bin_testdm' directory. In order to run it:

$ cd ~/ros/DynaMechs/build/bin_testdm
$ ls
$ cp crank ../../src/testdm/
$ cd ../../src/testdm/
$ ./crank

You need to relocate the crank executable because it looks for some external files during runtime [specifically, .cfg file, .dm file, .env file as well as the terrain and 3D model files (in ../models folder, .xan and .dat) ]   This is not very convenient, though, and generally not a good practice for out-of-source build.



For Eclipse user, if you want to run the executable by simply clicking the 'run' button, you need to

1. go to 'run configureations' of your executable
2. go to arguments tab
3. uncheck the 'Use default' checkbox
4. change the 'working directory' to
   "[your_path]/DynaMechs/src/your_project, since all the configuration files that the your executable requires to run are there.  




Use xan_viewer to preview the .xan model

$ xan_viewer "your xan file"

(both relative path or absolute path are OK.)








Notes:

libdm.so and libdmu.so are the core libraries for DynaMechs. 
libdmgl.so provides graphic and interaction support (built upon OpenGL and GLUT) and is used in the test programs. However, keep in mind that libdm and libdmu also include some functions based on OpenGL.

DynaMechs is orginally developed by Scott McMillan. 


Notes For Mac Users:
As is, make must be in your PATH. If 10.7 this is not the case by default. The make binary is located in /Developer/usr/bin. To add this to your path, follow the steps below:
cd /etc/paths.d
touch devpath
"Now open devpath and add /Developer/usr/bin (followed by a newline) to the file. Save and close"

About

DynaMechs rebuilt with CMake. Original project website: http://sourceforge.net/projects/dynamechs/ . DynaMechs is orginally developed by Scott McMillan. Current version has been tested on Ubuntu 10.04 and Mac OS Lion 10.7.

Resources

Stars

Watchers

Forks

Packages

No packages published