ci-group / revolve

Robot evolution framework for the Triangle of Life project
https://evosphere.eu/
29 stars 32 forks source link

Gazebo extra installation steps on Ubuntu 20.04 #115

Open soudy opened 2 years ago

soudy commented 2 years ago

The instructions for installing Gazebo on Ubuntu 20.04 on the wiki are missing the following steps (taken from http://gazebosim.org/tutorials?tut=install_ubuntu):

  1. Setup your computer to accept software from packages.osrfoundation.org.
    sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
  2. Setup keys
    wget https://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
  3. Update database
    sudo apt-get update

Only then will sudo apt-get install libgazebo11-dev gazebo11 work. Not sure if Gazebo is in the standard Ubuntu/Debian repositories for other versions, but on 20.04 they aren't, so these extra steps are necessary.

I also had to install the following packages to build revolve: libpqxx-dev libyaml-cpp-dev libnlopt-dev libopencv-dev

surgura commented 2 years ago

Thank you for reporting. I will do another installation pass on a clean Ubuntu 20.04 and see if I reproduce & update the docs

soudy commented 2 years ago

Some other gotcha's I encountered while installing that might save others some debugging:

  1. Had to install nlopt from source (https://github.com/stevengj/nlopt). Package libnlopt-dev in Ubuntu 20.04 repo didn't get recognized correctly by CMake somehow.
  2. libyaml-cpp-dev from repo has a pathing error: in /usr/lib/x86_64-linux-gnu/cmake/yaml-cpp/yaml-cpp-config.cmake YAML_CPP_INCLUDE_DIR is set to "${YAML_CPP_CMAKE_DIR}/../../../../../include", which is one directory too high and caused errors. Fixed by settings YAML_CPP_INCLUDE_DIR to "${YAML_CPP_CMAKE_DIR}/../../../../include" (one ../ removed so it points correctly at /usr/include).
surgura commented 2 years ago

hmm weird. My experience is that libnlop-dev is enough. Same for yaml. I'm also running 20.04 without any problems with a fresh revolve installation from last month. Oh well, I'll do a cleanup of dependencies soon to hopefully resolve these issues.

surgura commented 2 years ago

Correction I run 20.10

soudy commented 2 years ago

I should have maybe noted that this is on Babak's fork https://github.com/bobykhani/revolve on the LinearActuator branch. I tried using the CMake files from this repo's master branch, however it wasn't a mistake in the CMake files but in the system libraries setup. Could be some slight versioning difference between 20.04 and 20.10 that messes some things up, I'm not sure.