ICode9

精准搜索请尝试: 精确搜索
首页 > 系统相关> 文章详细

Ubuntu 18.04下autoware 1.12 安装日志(含花屏解决方法)

2021-04-03 11:31:57  阅读:977  来源: 互联网

标签:1.12 18.04 ai autoware 33 manager install runtime 含花屏


Ubuntu 18.04下autoware 1.12 安装日志

安装Autoware 1.12

Autoware官网信息

官网给出了Ubuntu版本对应支持Autoware的版本号,其中有交叉的是支持的版本:

Autoware官网信息autoware的安装分为两种,一种是有CUDA依赖的GPU驱动的,另外一种不依赖CUDA,我的Autoware是不依赖CUDA的。同时Ubuntu 18.04下编译CUDA需要Eigen支持,所以需要再下载Eigen。如果是Ubuntu18.04需要安装CUDA 10.0和Eigen 3.7,具体可以参考这位博主的文章ubuntu18 安装autoware1.12.0

下载相关依赖项

输入以下命令:

$ sudo apt-get update
$ sudo apt-get install -y python-catkin-pkg python-rosdep ros-$ROS_DISTRO-catkin gksu
$ sudo apt-get install -y python3-pip python3-colcon-common-extensions python3-setuptools python3-vcstool
$ pip3 install -U setuptools

新建文件夹下载autoware 1.12

新建一个文件夹,并从gitlab上下载所需文件到autoware.ai中:

$ mkdir -p autoware.ai/src
$ cd autoware.ai
$ wget -O autoware.ai.repos "https://gitlab.com/autowarefoundation/autoware.ai/autoware/raw/1.12.0/autoware.ai.repos?inline=false"
$ vcs import src < autoware.ai.repos
$ rosdep update
$ rosdep install -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO

编译autoware 1.12

该命令在后面会多次用到:

$ colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release

添加到环境并试运行

将setup.bash加入到环境中:

$ cd autoware.ai
$ source install/setup.bash
$ roslaunch runtime_manager runtime_manager.launch

启动以后可以看到autoware的runtime manager的界面:
autoware runtime manager

如果测试没问题,能运行,就可以把环境添加到/.bashrc中,每次开机配置的时候就能直接将autoware的setup.bash加入到环境,如下所示:

$ gedit ~/.bashrc
//将source ~/autoware.ai/install/setup.bash添加到文件的末尾

下载demo并解压

下载一个已生成的数据,用于测试autoware:

$ wget http://db3.ertl.jp/autoware/sample_data/sample_moriyama_data.tar.gz
$ wget http://db3.ertl.jp/autoware/sample_data/sample_moriyama_150324.tar.gz

进行解压:

$ mkdir .autoware
$ cd .autoware
$ cp ~/Downloads/sample_moriyama_* .//这一步需要自己修改一下地址
$ tar zxfv sample_moriyama_150324.tar.gz
$ tar zxfv sample_moriyama_data.tar.gz

demo使用方法请参照文章Autoware 的安装与官方Demo的运行

花屏解决办法与遇到的问题

根据参考文章问题:Ubuntu18.04 Autoware1.12.0中运行Runtime Manager出现花屏重叠现象

文中的解决办法为:

  1. 安装以下内容:
pip install -U -f https://extras.wxpython.org/wxPython4/extras/linux/gtk2/ubuntu-18.04 wxPython
sudo apt install libsdl1.2-dev

但是这样安装得到的版本是wxpython 4.1.1并不是4.0.7版本,因此可以查询自己的版本,重新在官网上下载对应版本的wxpython包:

python -c "import wx;print wx.__version__" //查看版本号
pip uninstall wxPython//卸载当前版本

然后上官网:wxpython下载地址,找到对应版本号,我的python2是2.7版本,所以我就下载wxPython-4.0.7-cp27-cp27mu-linux_x86_64.whl,然后在下载目录下打开终端(该文件无需解压),输入命令:

sudo pip install wxPython-4.0.7-cp27-cp27mu-linux_x86_64.whl

但是我出现了这样的情况:
在这里插入图片描述

这里说我的python版本不对应,后来我又试了4.0.3版本和cp36的一系列版本,结果都出现这样的error,后来看到了这位博主的文章:Ubuntu18.04 Autoware1.12.0(包括docker安装和源码安装)中运行Runtime Manager出现花屏重叠现象
文中用的命令是:

python2.7 -m pip install wxPython-4.0.7-cp27-cp27mu-linux_x86_64.whl

给定了安装的python版本号,避免了错误识别python版本。然后成功安装。

  1. 之后修改runtime_manager_dialog.py :
    找到 autoware.ai/src/autoware/utilities/runtime_manager/scripts 中的 runtime_manager_dialog.py 文件
    在文件中添加 import wx.adv
    把文件中所有的 wx.HyperlinkCtrl 替换成 wx.adv.HyperlinkCtrl
    把文件中所有的 wx.EVT_HYPERLINK 替换成 wx.adv.EVT_HYPERLINK

更改了wxpython的版本,也更改了其中的参数,import了wx.adv,但是之后打开runtime_manager.launch都会出现闪退现象,原因是runtime_manager_dialog.py出错了:

$rosrun runtime_manager runtime_manager_dialog.py 

运行上述命令后遇到问题如下:

tinner@tinner-v:~$ rosrun runtime_manager runtime_manager_dialog.py 
16:33:26: Debug: Adding duplicate image handler for 'PNG file'
16:33:26: Debug: Adding duplicate image handler for 'JPEG file'
16:33:26: Debug: Adding duplicate image handler for 'TIFF file'
16:33:26: Debug: Adding duplicate image handler for 'GIF file'
16:33:26: Debug: Adding duplicate image handler for 'PNM file'
16:33:26: Debug: Adding duplicate image handler for 'PCX file'
16:33:26: Debug: Adding duplicate image handler for 'IFF file'
16:33:26: Debug: Adding duplicate image handler for 'Windows icon file'
16:33:26: Debug: Adding duplicate image handler for 'Windows cursor file'
16:33:26: Debug: Adding duplicate image handler for 'Windows animated cursor file'
16:33:26: Debug: Adding duplicate image handler for 'TGA file'
16:33:26: Debug: Adding duplicate image handler for 'XPM file'
Unable to register with master node [http://localhost:11311]: master may not be running yet. Will keep trying.


//此处ctrl+c取消了
^CTraceback (most recent call last):
  File "/home/tinner/autoware.ai/install/runtime_manager/lib/runtime_manager/runtime_manager_dialog.py", line 2866, in OnInit
    frame_1 = MyFrame(None, wx.ID_ANY, "")
  File "/home/tinner/autoware.ai/install/runtime_manager/lib/runtime_manager/runtime_manager_dialog.py", line 116, in __init__
    rospy.init_node('runime_manager', anonymous=True)
  File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/client.py", line 336, in init_node
    raise rospy.exceptions.ROSInitException("Failed to initialize time. Please check logs for additional details")
rospy.exceptions.ROSInitException: Failed to initialize time. Please check logs for additional details
OnInit returned false, exiting...

然后试过很多方法,类似卸载wxpython重装,重装autoware之类的都不行,直到看到了以下博主的文章:Ubuntu18.04 Autoware1.12.0(包括docker安装和源码安装)中运行Runtime Manager出现花屏重叠现象

文中的解决办法为:对以下两个文件都进行runtime_manager_dialog.py的修改操作:

autoware.ai/src/autoware/utilities/runtime_manager/scripts/runtime_manager_dialog.py 
autoware.ai/install/runtime_manager/lib/runtime_manager/runtime_manager_dialog.py

如果只对第一个文件进行操作会出现闪退,之后再重新进行编译和运行:

$ colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release
$ roslaunch runtime_manager runtime_manager.launch

就能成功打开Autoware 1.12且没有花屏。

待解决的新问题

在运行autoware的时候出现以下错误,这是一个无法转换为二进制的问题:

 File "/home/tinner/.local/lib/python2.7/site-packages/wx/core.py", line 3285, in <lambda>
    lambda event: event.callable(*event.args, **event.kw) )
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 932-933: invalid continuation byte

标签:1.12,18.04,ai,autoware,33,manager,install,runtime,含花屏
来源: https://blog.csdn.net/m0_46673077/article/details/115400045

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有