ika-rwth-aachen / acdc

Code Repository for the MOOC "Automated and Connected Driving Challenges" available on edX.
https://www.edx.org/course/automated-and-connected-driving-challenges
MIT License
217 stars 24 forks source link

Installing dependencies natively on Ubuntu without docker #10

Closed brolinA closed 1 year ago

brolinA commented 1 year ago
  1. Are you using a virtual machine or are you using native Ubuntu? I am using a Parallels Desktop on a MacOS M1 chip.

  2. **If you are using macOS and a virtual machine, does your computer use an M1, M2, ... chip?

MacOs with M1 chip. But I will be using Parallels Desktop and work with Ubuntu 20.04

  1. Which Ubuntu version are you using? (lsb_release -a in a terminal)

No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.6 LTS Release: 20.04 Codename: focal

Since I am already using a virtual machine to run Ubuntu 20.04 I don't want to install docker inside this Ubuntu Image. So is there a script file that will install all the dependencies?

I tried to use the DockerFile and install almost everything. But when I do catkin build in the workspace, I get the following error from the ct_models package. Please help resolve this.

Screenshot 2023-10-01 at 3 05 25 PM

TillBeemelmanns commented 1 year ago

Hi,

it's a problem related to the file system used by macOS.

The package control-toolbox contains case-sensitive files, but the default macOS file system is case-insensitive. Hence, the following, packages won't compile: ct_models, ct_doc, trajectory_planner. Affected exercises are

A workaround would be to create a case-sensitive Volume in MacOS and mount it with Parallels. Please refer to the following guides.

Please let us know if that worked for you.

Best regards, Till

brolinA commented 1 year ago

Thank you very much for the quick response.

I tried creating a case-sensitive volume and still I have the same issue. The volume acdc_source code is the new case-sensitive volume that I created as per your advice.

Screenshot 2023-10-01 at 4 42 33 PM

Also, one other doubt. I also tried copying the files to my ubuntu desktop (not mounting any volumes, just copying the files) and then building the files like we would do in a native ubuntu system. That also doesn't work. Is it because I am running on a virtual machine?

TillBeemelmanns commented 1 year ago

Please delete the folder acdc_ws and pull the repositories again on the case-sensitive volume. If you have just moved the code, then the files that were missing previously will still be missing. Hence, you need to pull the code again.

Make sure that this file can be found in your local directory: https://github.com/ethz-adrl/control-toolbox/blob/v3.0.2/ct_core/include/ct/core/Common

Let me know if that helps.

Bests, Till

brolinA commented 1 year ago

@TillBeemelmanns Thank you very much. Apparently, the Common file that you mentioned was missing. So I pulled the files again as you mentioned and now the ct_models package is able to build.

However, not the tensorflow_cpp file is not able to be built. I made sure to install TensorFlow. Can you help resolve this issue?

Screenshot 2023-10-01 at 5 32 26 PM

Screenshot 2023-10-01 at 5 32 12 PM

brolinA commented 1 year ago

Finally, I was able to resolve the issue. I've made a few changes to make it all work. To preface the changes, here are the details of my system.

PC: Apple M1 running Parallels Desktop which runs Ubuntu 20.04 and ROS Noetic.

Solving the issue with tensorflow_cpp

I had to follow the install instructions for libtensorflow_cc from here. I installed the CPU version since I did not have a dedicated Nvidia GPU.

Following this, I was able to successfully build the tensorflow_cpp package.

The next issue

I got the following error because the packages lidar_detection and pointcloud_ogm packages were compelling with C++ 14. Screenshot 2023-10-03 at 3 16 12 PM

So, I added add_compile_options(-std=c++17) to the CMakeLists.txt file of both packages. After this the lidar_detection package was able to build but the pointcloud_ogm package was not. It threw the following error.

Screenshot 2023-10-03 at 3 20 00 PM

So I had to edit the FunctorsPlugin.hpp from the source installation manually and add the missing ; in the locations mentioned in the error. After this, everything was able to build completely as expected.

TillBeemelmanns commented 1 year ago

Glad that you could resolve the issue! Please note, that we are currently working on the repository and we will publish a refreshed setup / docker images at the beginning of the ACDC course in approx. two weeks.

brolinA commented 1 year ago

Thank you. I look forward to the updated setup instructions.