-
Notifications
You must be signed in to change notification settings - Fork 76
Install Directly on Host
Upgrade to the latest packages:
sudo apt update
sudo apt full-upgrade
Install required tools:
sudo apt install -y build-essential cmake cppcheck curl git gnupg libeigen3-dev libgles2-mesa-dev lsb-release pkg-config protobuf-compiler python3-dbg python3-pip python3-venv qtbase5-dev ruby software-properties-common sudo wget
Install required ROS and Gazebo Packages
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 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 update
DIST=melodic
GAZ=gazebo9
sudo apt install -y \
${GAZ} \
lib${GAZ}-dev \
ros-${DIST}-gazebo-plugins \
ros-${DIST}-gazebo-ros \
ros-${DIST}-gazebo-ros-control \
ros-${DIST}-gazebo-ros-pkgs \
ros-${DIST}-effort-controllers \
ros-${DIST}-geographic-info \
ros-${DIST}-hector-gazebo-plugins \
ros-${DIST}-joint-state-controller \
ros-${DIST}-joint-state-publisher \
ros-${DIST}-joy \
ros-${DIST}-joy-teleop \
ros-${DIST}-key-teleop \
ros-${DIST}-move-base \
ros-${DIST}-robot-localization \
ros-${DIST}-robot-state-publisher \
ros-${DIST}-ros-base \
ros-${DIST}-rqt \
ros-${DIST}-rqt-common-plugins \
ros-${DIST}-rqt-robot-plugins \
ros-${DIST}-rviz \
ros-${DIST}-teleop-tools \
ros-${DIST}-teleop-twist-joy \
ros-${DIST}-teleop-twist-keyboard \
ros-${DIST}-tf2-geometry-msgs \
ros-${DIST}-tf2-tools \
ros-${DIST}-velodyne-gazebo-plugins \
ros-${DIST}-velodyne-simulator \
ros-${DIST}-xacro
-
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 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 update DIST=melodic GAZ=gazebo9 sudo apt install ros-${DIST}-desktop-full sudo apt-get install ${GAZ} sudo apt install python-rosdep sudo rosdep init rosdep update
and set up
.bashrc
for working with ROS Melodic:source /opt/ros/melodic/setup.bash
sudo apt install -y \
${GAZ} \
lib${GAZ}-dev \
ros-${DIST}-gazebo-plugins \
ros-${DIST}-gazebo-ros \
ros-${DIST}-gazebo-ros-control \
ros-${DIST}-gazebo-ros-pkgs \
ros-${DIST}-effort-controllers \
ros-${DIST}-geographic-info \
ros-${DIST}-hector-gazebo-plugins \
ros-${DIST}-joint-state-controller \
ros-${DIST}-joint-state-publisher \
ros-${DIST}-joy \
ros-${DIST}-joy-teleop \
ros-${DIST}-key-teleop \
ros-${DIST}-move-base \
ros-${DIST}-robot-localization \
ros-${DIST}-robot-state-publisher \
ros-${DIST}-ros-base \
ros-${DIST}-rqt \
ros-${DIST}-rqt-common-plugins \
ros-${DIST}-rqt-robot-plugins \
ros-${DIST}-rviz \
ros-${DIST}-teleop-tools \
ros-${DIST}-teleop-twist-joy \
ros-${DIST}-teleop-twist-keyboard \
ros-${DIST}-tf2-geometry-msgs \
ros-${DIST}-tf2-tools \
ros-${DIST}-velodyne-gazebo-plugins \
ros-${DIST}-velodyne-simulator \
ros-${DIST}-xacro
sudo apt upgrade libignition-math2
Note that the manipulator arm requires the ros-melodic-effort_controllers
and glider_hybrid_whoi repository requires the 'ros-melodic-hector-gazebo-plugins'
Currently Project DAVE is specific to the latest Gazebo 9 release from the OSRF repositories (as of 5/6/2021, Gazebo 9.17.0).
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
Test and check Gazebo version
gazebo --version
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
if you still cannot run gazebo,
try restarting the WSL by using the command wsl --shutdown
at command prompt opened as administrator (click windows logo bottom, type cmd, right-click the command prompt icon to select run as administrator)
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
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
- Follow instructions at this link to clone the source repositories you will work with.
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.
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.