Changes between Version 2 and Version 3 of Libbarrett/ExamplePrograms
- Timestamp:
- May 14, 2012, 6:09:22 PM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Libbarrett/ExamplePrograms
v2 v3 1 1 = Compiling a libbarrett example program = 2 2 1. Open a terminal on the realtime computer that will run the WAM. 3 1. Ch eckout a copy of the libbarrett library:3 1. Change to the "libbarrett_examples" directory in your home folder: 4 4 {{{ 5 svn co http://web.barrett.com/svn/libbarrett/branches/1.x/ ~/libbarrett 5 cd ~/libbarrett_examples/ 6 }}} 7 1. Look over the README.txt file: 8 {{{ 9 less README.txt 6 10 }}} 7 11 1. Use the "cmake" program (http://www.cmake.org/cmake/help/cmake2.6docs.html) to generate Makefiles for your system: 8 12 {{{ 9 cd ~/libbarrett/10 13 cmake . <-- IMPORTANT: Notice the '.' at the end of this command. 11 14 }}} 12 1. Use the "make" program to compile the library and important calibration utilities: 15 1. Use the "make" program to compile the example programs. 16 a. Compile all examples: 13 17 {{{ 14 cd ~/libbarrett/15 18 make 16 19 }}} 17 This creates the following files: 18 * src/libbarrett.so 19 * programs/bt-wam-gravitycal 20 * programs/bt-wam-zerocal 21 1. Compile an example program: 20 b. Compile a specific example: 22 21 {{{ 23 cd ~/libbarrett/examples/24 22 make ex01_initialize_wam 25 23 }}} 26 This uses the "examples/ex01_initialize_wam.cpp" file to create the "examples/ex01_initialize_wam" program.24 This uses the "libbarrett_examples/ex01_initialize_wam.cpp" file to create the "libbarrett_examples/ex01_initialize_wam" program. 27 25 1. Run the program: 28 26 {{{ 29 cd ~/libbarrett/examples/30 27 ./ex01_initialize_wam 31 28 }}}