Skip to content

Installing AMBF

Adnan Munawar edited this page Apr 28, 2023 · 3 revisions

Installation:

Tested Platforms:

AMBF has been tested on Ubuntu 16.04, Ubuntu 18.04 and Ubuntu 20.04. We need a few extra steps on Ubuntu 14.04, please create an issue if you would like to get instructions for that.

Even though it is recommended to use Linux for the full feature set of AMBF Simulator using ROS, AMBF has been tested on MacOS Maverick and MacOS Mojave without ROS support.

Building:

Linux (Ubuntu 16.04, 18.04, 20.04):

Install the following dependencies if not present:

sudo apt install libasound2-dev libgl1-mesa-dev xorg-dev

Optional but recommended: Install the appropriate ROS 1 version for your specific Linux distribution based on the instructions here http://wiki.ros.org/ROS/Installation. Source the ROS installation by following the instructions in Section 1.5 Environment Setup here (http://wiki.ros.org/noetic/Installation/Ubuntu). Note: Change the ROS version based on which ROS you have installed.

Now we can proceed to build AMBF:

cd ~
git clone https://github.com/WPI-AIM/ambf.git
cd ambf && mkdir build
cd build
cmake ..
make

Optional but recommended (If building with ROS support): Source the correct folder to achieve system-wide availability of AMBF ROS modules.

cd ~/ambf/build/
source ./devel/setup.bash

You can also permanently add the install location in your ~/.bashrc with the following command:

echo "source ~/ambf/build/devel/setup.bash" >> ~/.bashrc
# Then either reload the terminal or run `. ~/.bashrc` for the changes to take effect

Finally, to execute ambf_simulator without having to be in the ambf/bin/lin-x86_64 directory, one can set an alias at the end of the ~/.bashrc file.

# Open the ~/.bashrc file in a text editor
# At the end of the file add
alias ambf_simulator=~/ambf/bin/lin-x86_64/ambf_simulator
# Save and close the file and reload by either relaunching the terminal or typing 
. ~/.bashrc

Mac OS:

If you don't have Boost libraries, you will need to install them as follows

  1. Install Xcode from App Store
  2. Install command-line tools by running this in the terminal xcode-select --install
  3. Install Homebrew view running this in terminal /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  4. Install boost by running the following in the terminal brew install boost

To build the framework (Linux and Mac-OS):

cd ~
git clone https://github.com/WPI-AIM/ambf.git
cd ambf && mkdir build
cd build
cmake ..
make
Clone this wiki locally