Version 2 (modified by dc, 12 years ago) (diff)

--

Compiling a libbarrett example program

  1. Open a terminal on the realtime computer that will run the WAM.
  2. Checkout a copy of the libbarrett library:
    svn co http://web.barrett.com/svn/libbarrett/branches/1.x/ ~/libbarrett
    
  3. Use the "cmake" program (http://www.cmake.org/cmake/help/cmake2.6docs.html) to generate Makefiles for your system:
    cd ~/libbarrett/
    cmake .      <-- IMPORTANT: Notice the '.' at the end of this command.
    
  4. Use the "make" program to compile the library and important calibration utilities:
    cd ~/libbarrett/
    make
    
    This creates the following files:
    • src/libbarrett.so
    • programs/bt-wam-gravitycal
    • programs/bt-wam-zerocal
  5. Compile an example program:
    cd ~/libbarrett/examples/
    make ex01_initialize_wam
    
    This uses the "examples/ex01_initialize_wam.cpp" file to create the "examples/ex01_initialize_wam" program.
  6. Run the program:
    cd ~/libbarrett/examples/
    ./ex01_initialize_wam