Ubuntu 20.04 로컬에서
Ubuntu 18.04 버전의 docker 를 다운받고 그 안에서 qt, autoware 다운받기
Ubuntu20.04에서 Ubuntu18.04 docker image 다운 받는 방법 및 ROS설치 글은 다음 블로그를 참고해주세요
20.04 환경에서 18.04 환경 docker 설치
Ubuntu20.04 환경에서 Ubuntu 18.04 버전 docker 다운받기
Ubuntu 20.04 버전을 쓰면서 가끔 ubuntu 18.04 버전을 써야하는 상황이 생기곤 합니다. 그럴 때 그 버전에 맞는 docker를 다운받아주기만 하면됩니다. 먼저 도커허브에서 ubuntu 도커공식이미지 페이지로
yhoons.tistory.com
ROS 설치
https://yhoons.tistory.com/42
Ubuntu18.04 docker 환경에서 ROS 설치
Ubuntu 18.04 docker in Ubuntu 20.04 ROS 설치 (로컬 환경이신 분은 문서 그대로 따라치시면 됩니다.) -Ubuntu18.04 http://wiki.ros.org/melodic/Installation/Ubuntu melodic/Installation/Ubuntu - ROS Wiki We are building Debian packages for
yhoons.tistory.com
qt 설치
저는 로컬에서 다운 받은 후 docker cp명령어를 통해 로컬에서 도커환경으로 파일을 옮겨주었습니다.
다운 받을 파일: qt-opensource-libux-x64-5.12.12.run
.run파일 하나만 다운 받으면 됩니다.
qt공식 문서(비추!)
https://download.qt.io/archive/qt/5.12/
Index of /archive/qt/5.12
download.qt.io
다음 사이트에서 본인이 희망하는 버전 설치하시면 됩니다.
저는 5.12.12버전을 설치하였습니다!
공식사이트에서 다운 받으면 많이 느린 편이라 mirror사이트에서 다운 받는 것을 권장 드립니다.
mirror사이츠(추천!)
https://download.qt.io/static/mirrorlist/
Qt Downloads
download.qt.io
다운 받는 방법
많은 나라의 Mirror URL이 존재하는데 저는 Japan의 Yamagata Universiry로 다운 받으니
10분 정도 걸렸던 것 같습니다.
Yamagata University 배너 오른쪽에 HTTP 클릭!
클릭 하면 다음과 같은 화면이 나오는데 다음과 같은 순서로 들어가시면 됩니다.
/archive /qt /5.12 /5.12.12 /qt-opensource-libux-x64-5.12.12.run Click!
다운이 완료되면 (.run 파일이 Downloads/에 있다고 가정)
docker cp /Downloads/qt-opensource-libux-x64-5.12.12.run <컨테이너ID>:/
<컨테이너ID>만 수정하시면 됩니다.
docker ps -a 로 확인 가능!
.run 파일을 받은 도커 환경에서
apt update
apt install build-essential
chmod +x qt-opensource-libux-x64-5.12.12.run
./qt-opensource-libux-x64-5.12.12.run
저는 이때부터 오류가 나기 시작합니다.
./qt-opensource-linux-x645.12.12.run: error while loading shared libraries: libfontconfig.so.1: cannot open shared object file: No such file or directory
필요로하는 라이브러리가 많이 존재하는데 하나씩 다운받기 귀찮으니 다음 명령어를 복붙해주세요.
apt install libfontconfig1 libdbus-1-3 libxcb-glx0 libx11-xcb1 libxrender1 libxext6 libxkbcommon-x11-0 libgl1-mesa-glx xorg
터미널이나 vscode를 껐다가 다시 켜주면
./qt-opensource-libux-x64-5.12.12.run 이 명령어가 잘 동작하는 것을 볼 수 있습니다.
중간에 나라 정하는 게 있는데 그냥 31.English (US)로 정해주시면 됩니다.
1. 선택!
잘 뜨는 모습을 볼 수 있습니다.
Sign Up 하고 이메일 인증하면 다운받을 수가 있습니다.
Qt 5.12.12 체크박스가 해제되어있는데 체크하시면 됩니다.
export PATH=/opt/Qt5.12.12/5.12.12/gcc_64/bin/:/opt/Qt5.12.12/Tools/QtCreator/bin/:$PATH
export PATH=/home/사용자명/Qt5.12.12/5.12.12/gcc_64/bin/:/home/사용자명/Qt5.12.12/Tools/QtCreator/bin/:$PATH
를 sudo ~/.bashrc에 추가하면 됩니다.
source ~/.bashrc
잘 깔렸다면 다음 명령어를 쳤을 때 버전이 잘 떠야합니다.
qmake --version
Autoware 설치
apt update
apt install -y python-catkin-pkg python-rosdep ros-$ROS_DISTRO-catkin
apt install -y python3-pip python3-colcon-common-extensions python3-setuptools python3-vcstool
pip3 install -U setuptools
mkdir -p autoware.ai/src
cd autoware.ai
wget -O autoware.ai.repos "https://raw.githubusercontent.com/Autoware-AI/autoware.ai/1.14.0/autoware.ai.repos"
vcs import src < autoware.ai.repos
rosdep update
rosdep install -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO
Build (약 30분 소요)
#cuda가 없을 경우
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release
#cuda가 있을 경우
AUTOWARE_COMPILE_WITH_CUDA=1 colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release
cd autoware.ai
source install/setup.bash
roslaunch runtime_manager runtime_manager.launch
roslaunch runtime_manager runtime_manager.launch 할 때 전 또 오류가 났습니다.
log를 열어보니
display 관련 오류인 것 같습니다.
apt install libcanberra-gtk-module
apt install dbus
apt update
apt install locales
locale-gen en_US.UTF-8
update-locale LANG=en_US.UTF-8
apt install libcanberra-gtk-module
apt install dbus-x11
명령어 입력 후 vscode 재부팅 후 다시 하면 잘 됩니다!
(Optional) Velodyne 드라이버 설치 [라이다센서]
apt install libpcap-dev git
mkdir -p ~/ros_drivers/src
cd ~/ros_drivers/src
catkin_init_workspace
git clone https://github.com/ros-drivers/velodyne.git
cd ~/ros_drivers
catkin_make
source devel/setup.bash
(Optional) canlib 설치 [CAN통신]
1.kvaser사이트 접속
https://www.kvaser.com/download/
Kvaser Downloads | Kvaser
Kvaser Downloads Access Kvaser downloads, including Kvaser drivers, documentation, software, firmware, and setup tools. Scroll through the list or use the Search bar below to get started.
www.kvaser.com
2.맨아래에 'Kvaser Linux Drivers and SDK' 다운로드
tar xzf linuxcan.tar.gz
cd linuxcan
make
make install