Advertisement
AmoodZ

Untitled

Nov 21st, 2014
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.97 KB | None | 0 0
  1. Build And Install Gazebo
  2.  
  3. Clone the repository into a directory in your home folder:
  4.  
  5. cd ~; hg clone https://bitbucket.org/osrf/gazebo
  6.  
  7. Change directory in the Gazebo repository and switch to the 4.0 branch
  8.  
  9. cd ~/gazebo
  10. hg up gazebo_4.0
  11.  
  12. Note: the default branch is the development branch where you'll find the bleeding edge code, your cloned repository should be on this branch by default but we recommend you switch to the 4.0 branch if you desire more stability
  13.  
  14. Create a build directory and go there:
  15.  
  16. mkdir build
  17. cd build
  18.  
  19. Configure Gazebo (choose either method a or b below):
  20.  
  21. a. Release mode: This will generate optimized code, but will not have debug symbols. Use this mode if you don't need to use GDB.
  22.  
  23. cmake ../
  24.  
  25. Note: You can use a custom install path to make it easier to switch between source and debian installs:
  26.  
  27. cmake -DCMAKE_INSTALL_PREFIX=/home/$USER/local ../
  28.  
  29. b. Debug mode: This will generate code with debug symbols. Gazebo will run slower, but you'll be able to use GDB.
  30.  
  31. cmake -DCMAKE_BUILD_TYPE=Debug ../
  32.  
  33. Note: A big part of the compilation is the test suite. If it is useful to temporary disable it during the developemnt, you can use:
  34.  
  35. cmake ../ -DENABLE_TESTS_COMPILATION:BOOL=False
  36.  
  37. The output from cmake ../ may generate a number of errors and warnings about missing packages. You must install the missing packages that have errors and re-run cmake ../. Make sure all the build errors are resolved before continuing (they should be there from the earlier step in which you installed prerequisites). Warnings alert of optional packages that are missing.
  38.  
  39. Make note of your install path, which is output from cmake and should look something like:
  40.  
  41. -- Install path: /home/$USER/local
  42.  
  43. Build Gazebo:
  44.  
  45. make -j4
  46.  
  47. Install Gazebo:
  48.  
  49. sudo make install
  50.  
  51. Setup environment variables
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement