Compiling a libbarrett example program

  1. Open a terminal on the realtime computer that will run the WAM.
  2. Change to the "libbarrett_examples" directory in your home folder:
    cd ~/libbarrett_examples/
    
  3. Look over the README.txt file:
    less README.txt
    
  4. Use the "cmake" program (http://www.cmake.org/cmake/help/cmake2.6docs.html) to generate Makefiles for your system:
    cmake .      <-- IMPORTANT: Notice the '.' at the end of this command.
    
  5. Use the "make" program to compile the example programs.
    1. Compile all examples:
      make
      
    2. Compile a specific example:
      make ex01_initialize_wam
      
      This uses the "libbarrett_examples/ex01_initialize_wam.cpp" file to create the "libbarrett_examples/ex01_initialize_wam" program.
  6. Run the program:
    ./ex01_initialize_wam
    
  7. Read the comments in the source code:
    less ex01_initialize_wam.cpp
    
Last modified 12 years ago Last modified on May 14, 2012, 6:13:16 PM