ethz-asl / segmap

A map representation based on 3D segments
BSD 3-Clause "New" or "Revised" License
1.05k stars 394 forks source link

Installing on Ubuntu 18.04 or above, in case the instructions are not working for you [SOLVED] #181

Closed palffybalazs closed 2 years ago

palffybalazs commented 2 years ago

First of all, really good work, I really like it. However, I did encounter some issues during the installation process and managed to solve it. Here is my solution for installing the repo in case the README.md method failed for you. System: Ubuntu 18.04. I know that in this case tensorflow needs to be installed from source. I followed the proposed methods, but failed to install segmap at command: $ catkin build segmapper I got errors for pcl_catkin and also for tf_graph_executor and for a few more. These errors can be originated to the installation of tensorflow despite the fact, I did follow the FAQ methods and I did use pip install for the generated .whl file.

  1. Installing on Ubuntu 18.04, in case the instructions are not working for you [SOLVED] In case anyone ever gots the similar errors, I will leave my solution here for that case. I followed the proposed installation methods in the READ.md, however I did not succeeded.
  2. Installing Download and install ros (I am using ros-melodic-desktop-full): http://wiki.ros.org/melodic/Installation/Ubuntu Download and install cat (Installing on Ubuntu with apt-get): https://catkin-tools.readthedocs.io/en/latest/installing.html Download bazel 0.10.0 with these commands: wget https://github.com/bazelbuild/bazel/releases/download/0.10.0/bazel-0.10.0-installer-linux-x86_64.sh chmod u+x bazel-0.10.0-installer-linux-x86_64.sh ./bazel-0.10.0-installer-linux-x86_64.sh Follow the commands on segmap github page until the installation of the tensorflow library. If you have installed conda: $ conda deactivate Then: $ virtualenv ~/segmappyenv $ source ~/segmappyenv/bin/activate $ pip install --upgrade pip $ pip install catkin_pkg empy pyyam On Ubuntu 18.04 you can not install tensorflow 1.8 with the proposed commands, that is why it is not that simple. The simple python 2.17 version which is the basic parameter of the environment is perfect for this installation. Then follow these instructions (source: https://www.tensorflow.org/install/source): pip install -U --user pip numpy wheel pip install -U --user keras_preprocessing --no-deps In case of deprecation error, remove --user $ git clone https://github.com/tensorflow/tensorflow.git $ cd tensorflow $ git checkout v1.8.0 $ ./configure If you are in your segmappyenv it should choose the python and the path correctly. Install cuda if it is needed. Then we finished with the tensorflow page. I do not recommend using their bazel build command on that page, it did not work out well in my specific case in the situation of installing semap (other cases, it can be great). Also the proposed method with pip installing the generated .whl file also as it is written in the FAQ segment did not work for me. (FAQ here: https://github.com/ethz-asl/segmap/wiki/FAQ#q-issues-compiling-tensorflow_ros_cpp) Long story short, we do not make the .whl package now, this is another rout. Use the original command from the original tensorflow_ros_cpp page https://github.com/tradr-project/tensorflow_ros_cpp like this: $ bazel build --config=opt --define framework_shared_object=false tensorflow:libtensorflow_cc.so Add --jobs=10 in case your system is not powerful. This will build the needed libs around in ten min. i5-10gen cpu. Later use this command with your paths in your segmap_ws directory: Replace username with yours. $ catkin build tensorflow_ros_cpp --cmake-args -DTF_BAZEL_LIBRARY='/home/username/tensorflow/bazel-bin/tensorflow/libtensorflow_cc.so' -DTF_BAZEL_SRC_DIR='/home/username/tensorflow' After, you can catkin build $ catkin build segmapper This will take a little bit of time. Use $ catkin build segmapper -j10 in case your system is not that powerful. Follow the instructions from (Optional) Install SegmapPy python package. If "To download all necessary files, copy the content of the segmap_data into ~/.segmap/. If you installed the segmappy python package you can run the automated download script." not working for you, just go to the home folder and: $ mkdir .segmap $ cd .segmap And run: $ SEGMAP_HOME="$HOME/.segmap/" $ wget -q -c -r -np -R "index.html*" -nH --cut-dirs=3 -P $SEGMAP_HOME http://robotics.ethz.ch/~asl-datasets/segmap/segmap_data/kitti/ $ wget -q -c -r -np -R "index.html*" -nH --cut-dirs=3 -P $SEGMAP_HOME http://robotics.ethz.ch/~asl-datasets/segmap/segmap_data/trained_models/ You can continue with the demo. Again, this is a solution for my case (I am not saying the installation methods are wrong, just did not work for me), if the method in the README.md fails for you. Hope it helps someone or the later me installing the repo on another system. Special thanks to my wasted days and nerves for making the solution. Last but not least, thanks for the Segmap, really great work!
sco09 commented 10 months ago

pip install catkin_pkg empy pyyam should be pip install catkin_pkg empy pyyaml