這次autoware安裝讓我感覺真是日了狗了。別人遇到的問題我都遇到了,別人沒遇到的問題我也遇到了。就像現在的字都是繁體字,我正常安裝的sogou。
下面不會介紹具體怎麼安裝,只是會列出安裝過程中的坑,幷列出自己是怎麼解決的。
1.首先自己安裝的是1.12版本,根據github上的操作指令,同時參考https://blog.csdn.net/r1141207831/article/details/100666532這篇博客,結果剛開始執行下面指令時就報錯。
sudo apt-get install -y python-catkin-pkg python-rosdep ros-$ROS_DISTRO-catkin gksu
這個是換網絡解決的。
2.然後是ros,在rosdep update的時候總是失敗,試過如下方法:
a.換源,將國內的源挨個試了個便,同時還有連不同的網,還是不行。以前對源這一塊不是太懂,現在也弄懂了。
b.換IP,https://blog.csdn.net/qq_36498362/article/details/107187006 如上面這篇博客。還是沒用。
前前後後用了兩天。換了個電腦,把筆記本弄成了雙系統,依然不行。後面用科學上網法,一個小時搞定。
3.後面安裝的時候,都是在使用科學上網發的基礎上操作的,更新都沒問題。在執行下面語句的二時候出現如下問題
rosdep install -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO
走了很多彎路後發現是ros的包沒安裝完全。然後是安裝ros的包,使用sudo apt-get install ros-kinetic-(包)的方案安裝,如sudo apt-get install ros-kinetic-nmea-msgs,一定要注意用“-”,而不是“_". 好吧,ros包也會安裝了。
4.環境安裝好之後,開始編譯。
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release
輸入上面指令後,出現讓人絕望的錯誤。貼出來感受一下,只貼了十分之一吧。哪裏都找不到對應的解決方案。沒辦法,去安裝1.11版。
SyntaxError: invalid syntax
Finished <<< tablet_socket_msgs [38.7s]
Starting >>> adi_driver
[63.131s] ERROR:colcon.colcon_core.entry_point:Exception loading extension 'colcon_core.environment.pythonpath': invalid syntax (dist.py, line 585)
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/colcon_core/entry_point.py", line 120, in load_entry_points
extension_type = load_entry_point(entry_point)
File "/usr/lib/python3/dist-packages/colcon_core/entry_point.py", line 168, in load_entry_point
return entry_point.load()
File "/home/aaron/.local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2450, in load
return self.resolve()
File "/home/aaron/.local/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2456, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/lib/python3/dist-packages/colcon_core/environment/pythonpath.py", line 8, in
import setuptools # noqa: F401
File "/home/aaron/.local/lib/python3.5/site-packages/setuptools/__init__.py", line 18, in
from setuptools.dist import Distribution
File "/home/aaron/.local/lib/python3.5/site-packages/setuptools/dist.py", line 585
license_files: Optional[List[str]] = self.metadata.license_files
^
SyntaxError: invalid syntax
Finished <<< autoware_config_msgs [58.3s]
Starting >>> as
--- stderr: as
CMake Warning at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:76 (find_package):
Could not find a package configuration file provided by
"autoware_build_flags" with any of the following names:
autoware_build_flagsConfig.cmake
autoware_build_flags-config.cmake
Add the installation prefix of "autoware_build_flags" to CMAKE_PREFIX_PATH
or set "autoware_build_flags_DIR" to a directory containing one of the
above files. If "autoware_build_flags" provides a separate development
package or SDK, be sure it has been installed.
Call Stack (most recent call first):
CMakeLists.txt:4 (find_package)
CMake Error at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
Could not find a package configuration file provided by
"autoware_build_flags" with any of the following names:
autoware_build_flagsConfig.cmake
autoware_build_flags-config.cmake
Add the installation prefix of "autoware_build_flags" to CMAKE_PREFIX_PATH
or set "autoware_build_flags_DIR" to a directory containing one of the
above files. If "autoware_build_flags" provides a separate development
package or SDK, be sure it has been installed.
Call Stack (most recent call first):
CMakeLists.txt:4 (find_package)
---
Failed <<< as [10.2s, exited with code 1]
Aborted <<< autoware_msgs [1min 19s]
Aborted <<< adi_driver [29.8s]
Aborted <<< vector_map_msgs [1min 27s]
Summary: 3 packages finished [1min 30s]
1 package failed: as
3 packages aborted: adi_driver autoware_msgs vector_map_msgs
1 package had stderr output: as
136 packages not processed
5.根據github和https://blog.csdn.net/yourgreatfather/article/details/86504547這篇博文安裝1.11版。
前面都沒問題,在執行
./catkin_make_release
這條命令的時候顯示 bash:
./catkin_make_release: No such file or directory .在哪裏都收不到這個的解決方案。然後試了一下 catkin_make ,出現
Base path: /xxx/autoware.ai11/ros
Source space: /xxx/ros/src
Build space: /xxx/ros/build
Devel space: /xxx/ros/devel
Install space: /xxx/ros/install
然後出現下面界面,真他媽不容易啊。
然後。。。。竟然沒出現問題,直接編譯通過。
後面會怎樣,能不能運行不知道,如果有問題再更新吧。
一个感觉:困难使我更强大!