Skip to content

Install Directly on Host

Woensug Choi edited this page May 6, 2021 · 35 revisions

Install ROS and Gazebo

Install Dependencies

sudo apt update
sudo apt install -y build-essential cppcheck curl cmake lsb-release git python3-dbg python3-pip python3-venv ruby software-properties-common wget libeigen3-dev pkg-config protobuf-compiler qtbase5-dev libgles2-mesa-dev

Install ROS Melodic

  • Install ROS Melodic per https://wiki.ros.org/melodic/Installation/Ubuntu. Specifically:

    Install sources list, keys, ROS Melodic, initialize rosdep:

    sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
    sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
    sudo apt update
    sudo apt install ros-melodic-desktop-full
    sudo apt install ros-melodic-velodyne-gazebo-plugins python-rosdep
    sudo rosdep init
    rosdep update
    

    and set up .bashrc for working with ROS Melodic:

    source /opt/ros/melodic/setup.bash
    

Install Other ROS Dependencies

sudo apt install ros-melodic-rqt-robot-plugins ros-melodic-effort-controllers ros-melodic-joy ros-melodic-teleop-twist-joy ros-melodic-teleop-twist-keyboard ros-melodic-teleop-tools ros-melodic-joy-teleop ros-melodic-key-teleop ros-melodic-geographic-info ros-melodic-move-base ros-melodic-robot-localization ros-melodic-robot-state-publisher ros-melodic-xacro ros-melodic-rqt ros-melodic-rqt-common-plugins
sudo apt upgrade libignition-math2

Note that the manipulator arm requires the ros-melodic-effort_controllers

Install Gazebo 9

Currently Project DAVE is specific to the latest Gazebo 9 release from the OSRF repositories (as of 5/6/2021, Gazebo 9.17.0).

Ste-by-step

Following steps are extracted from a guidance at http://gazebosim.org/tutorials?tut=install_ubuntu&cat=install

After you have setup the package repository and keys, here is an example of the Gazebo/ROS packages to install, see https://github.com/bsb808/linux_setup/blob/master/ubuntu/apt_18_gazebo.sh

sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
wget https://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
sudo apt-get update
sudo apt-get install gazebo9

If following error is seen after installation,

gazebo: symbol lookup error: /usr/lib/x86_64-linux-gnu/libgazebo_common.so.9: undefined symbol: _ZN8ignition10fuel_tools12ClientConfig12SetUserAgentERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE

Try this again,

sudo apt upgrade libignition-math2

Gazebo setup

Run Gazebo to verify that it starts:

gazebo

Verify that a supported version of gazebo is installed with

gazebo --version

which should yield something like...

Gazebo multi-robot simulator, version 9.13.1

Graphics Drivers

If using the NVidia graphics card, install the NVidia driver instead of using Ubuntu's default video driver: https://linuxconfig.org/how-to-install-the-nvidia-drivers-on-ubuntu-18-04-bionic-beaver-linux

Install Dave and dependencies from source

Clone the source repositories.

Build

  cd ~/uuv_ws
  catkin_make

Source new setup.bash by typing this:

source ~/uuv_ws/devel/setup.bash

Also, put source ~/uuv_ws/devel/setup.bash in your .bashrc file.

Test your Installation

You may test your installation by running the reference configuration

roslaunch uuv_dave uuv_dave.launch

which should generate a gazebo view similar to this:

More details are discussed at uuv_simulator_reference.

Clone this wiki locally