当前位置:网站首页>China-open-ssl编译的一些记录
China-open-ssl编译的一些记录
2022-06-11 00:29:00 【萧易风船长】
一些记录
- (不太重要的:其他都是最新版 ;ode 0.16.2 ;toluapp最新版 2013.2.18 LuaDist/toluapp)
- Qt 5.14.0
- lua 5.1.4
- scons 3.0.1 太高会报错(tolua++太老了)
- protobuf 最新版 date:22.04.22 version: 3.21-dev
- toluapp里 python2(sudo下不能用anaconda) 或者把 Sconstuct里for linea in pkg.xreadlines(): 改成for linea in pkg.readlines():
- 安装lua在系统里也应该安装,执行如下命令:
sudo apt-get install lua5.1
sudo apt-get install liblua5.1-dev
- protobuf如果遇到版本切换,同名文件夹,不用
apt remove+删除路径 亲测也没关系 - Qt 如果找不到库的路径记得用sudo 打开
- Qt 编译出错的时候记得把Debug文件夹用
sudo rm -rf build-Medusa-Desktop_Qt_5_14_0_GCC_64bit-Debug/这样的命令删除
摘录word原话:
配置git、github、robos
sudo apt-get install git
ssh-keyGen -t rsa -C "your_email"
顺便把公钥添加到自己的github
git config --global user.name "your_name"
git config --global user.email "your_email"
git clone [email protected]:Robocup-ssl-China/rocos
#或者
git clone https://github.com/Robocup-ssl-China/rocos
注:此版本为2022.4.23的版本
一、Client
1. 安装Ubuntu18.04.3
网上有各种超详细的安装教程,有Ubuntu+Windows双系统的,有Ubuntu纯系统的,我建议安装纯系统的。下面给出连接: https://blog.csdn.net/u014453443/article/details/88049804 https://blog.csdn.net/baiduCompiling Autoref_36602427/article/details/86548203
注意:请给位老师同学注意,经我们内部测试,Ubuntu18.04.4在Client编译连接某个外部函数库时会出现异常,所以建议使用Ubuntu18.04.3版本。系统下载资源如下链接中:https://www.linuxidc.com/Linux/2019-08/159936.htm
2.安装Qt5.14
在网上下载Qt5.14,下载版本为qt-opensource_linux-x64-5.14.0.run,双击运行run文件,并安装到~/目录下。 (注:这里需要加可执行权限)
Qt下载路径:http://download.qt.io/archive/qt/5.14/5.14.0/
接下来是各种编译所需依赖包的安装
3.zlib安装
Zlib是一个压缩函数库,安装比较简单,在terminal下直接敲命令安装
Zlib参考安装教程: https://blog.51cto.com/xxaqustc/1166371
执行命令:
$ sudo apt-get install zlib1g
$ sudo apt-get install zlib1g.dev
同下
4.Eigen3安装
Eigen3是一个矩阵运算函数库
Eigen参考安装教程: https://www.cnblogs.com/newneul/p/8256803.html
执行命令:
sudo apt-get install libeigen3-dev
sudo cp -r /usr/local/include/eigen3/Eigen /usr/local/include
注意:apt-get安装的包,一般都是在/usr/local/include/下的(注:我在/usr/include,所以是sudo cp -r /usr/include/eigen3/Eigen /usr/local/include ,这个自己找一下吧),如果目录下有eigen,说明安装成功。同下
5.Protobuf的安装
Protobuf是google公司推出的一种数据传输格式,需要安装此协议格式的解析函数包。
参考安装教程:https://blog.csdn.net/kdchxue/article/details/81046192 https://blog.csdn.net/triplestudio/article/details/93591161
用git clone下载protobuf会很慢(注:用git clone 是可以的,用[email protected]比https快很多),建议直接在goole protobuf源地址下载(https://github.com/protocolbuffers/protobuf)
命令:
sudo apt-get install autoconf automake libtool curl make g++ unzip
git clone https://github.com/google/protobuf.git
cd protobuf3 #protobuf
git submodule update --init --recursive
./autogen.sh
./configure
make
make check
sudo make install
sudo ldconfig # refresh shared library cache.
6、OpenGL 安装
openGL是一个开源的图形函数库,参考安装教程:https://blog.csdn.net/huangkangying/article/details/82022177 https://blog.csdn.net/renhaofan/article/details/82631082
命令:
sudo apt-get install build-essential libgl1-mesa-dev
sudo apt-get install freeglut3-dev
sudo apt-get install libglew-dev libsdl2-dev libsdl2-image-dev libglm-dev libfreetype6-dev
7、Cmake安装
Cmake3.16在ubuntu1804下有问题,建议装cmake3.14。 安装教程:https://blog.csdn.net/stanfan/article/details/88681165 教程中的案例是ubuntu1604,但是和1804方法是一样的。
8.ODE安装
ODE是一个开源的动态引擎库,给client仿真提供支持。 Ode的安装教程: https://www.dazhuanlan.com/2019/12/17/5df7b25f579d0/
./bootstrap
sudo apt-get install automake
./configure --enable-double-precision --enable-shared --enable-libccd
make
sudo make install
sudo cp -r include/drawstuff /usr/local/include/
sudo cp drawstuff/src/.libs/libdrawstuff.* /usr/local/lib
sudo ldconfig
- 最后,需要在GitHub上下载ChinaOpenSSL的开源代码,地址是https://github.com/Robocup-ssl-China/rocos,建议注册github后下载。
- 安装好ubuntu系统,下载好小型足球机器人SSL开源代码,安装好IDE工具和各种依赖包,现在就可以开始编译开源代码了。
- 运行QtCreator,可以在主桌面右下角显示应用程序中搜索,也可以在Qt5.14->Tools->QtCreator->bin目录下打开qtcreator。
- 在QtCreator工具栏文件->打开文件或项目中,打开下载的ChinaOpenSSL开源代码包Client文件夹下的CMakeLists.txt文件。Client项目代码添加到QtCteator中。单击QtCreator工具栏中构建按钮,选择“执行CMake”,IDE开始根据调用gcc/c++17编译器解析CMakeLists.txt编译整个项目。
- 如果一切顺利,编译输出会提示编译成功,并告诉你编译结果放在那里了。在命令行终端(Ctrl+Shift+T)进入ZBin目录,输入./Client执行,就可以看到client界面了。
二、Medusa
Client是小型足球机器人的控制前端,Medusa是真正的后台程序。编译Medusa需要lua5.1和to lua++这两个依赖库。
lua5.1
Lua5.1安装教程:https://mobile.51cto.com/iphone-288738.html
使用sudo apt-get install lua5.1命令直接安装上lua,但是在c语言中嵌入lua的时候会说找不到lua.h等文件,因此如果只是简单的运行lua命令执行一些lua语句,那么这个是足够了,但是如果要是在c语言中嵌入,就必选采用以下方法:
1)先去Lua的官网(http://www.lua.org/ftp/)下载***发布包,我选择的是 lua-5.1.4.tar.gz
2)使用命令tar -xzvf lua-5.1.4.tar.gz
3)cd lua-5.1.4, 然后执行make
4)sudo make install
tolua++
Tolua++安装教程:https://www.dazhuanlan.com/2019/10/05/5d97c3a14c67f/
命令:
git clone [email protected]:LuaDist/toluapp.git
sudo apt-get install scons
cd toluapp/
gedit custom.py
然后添加内容 :
CCFLAGS = ['-I/usr/include/lua5.1', '-O2', '-ansi']
# 自己通过命令 sudo find / -name "*liblua*" 来查静态库.a文件在哪, 然后把路径填到下面
LIBPATH = ['/usr/lib/x86_64-linux-gnu']
LIBS = ['lua5.1', 'dl', 'm']
#prefix = '/mingw'
#build_dev=1
tolua_bin = 'tolua++5.1'
tolua_lib = 'tolua++5.1'
TOLUAPP = 'tolua++5.1'
scons all
scons install
(注:这里会遇到奇怪错误,详见笔者写在最前面的)
现在,lua和c++之间就能相互解析语法了
生成一些需要的文件
(注:这里的顺序笔者修改了)
在下载的ChinaOpenSSL文件夹下找到auto_linux.sh脚本。执行它
qt 编译
然后打开QtCreator,在QtCreator工具栏文件->打开文件或项目中,打开下载的ChinaOpenSSL开源代码包Medusa中的Medusa.pro文件。在项目栏中选择medusa,单击右键,选择qmake,开始执行编译。这是,编译会报错,提示“No rule to make target”share/proto/cpp/grSim_Commands.pb.cc”。在下载的ChinaOpenSSL文件夹下找到auto_linux.sh脚本。执行它,会生成我们需要的grSim_Commands.pb.cc和lua_zeus.cpp,然后把gSim_Commands.pb.cc拷贝到Qt报错提示的目录下(share/proto/cpp/),再次执行qmake 。
如果还是报错,关闭Medusa,删除build-Medusa-Desktop_Qt_5_14_0_GCC_64bit-Debug整个文件夹,然后在重新加载,执行编译\构建,就应该OK了。
运行
最后,我们打开两个终端,分别进入ChinaOpenSSL/ZBin/,先在一个终端中执行./Client,打开Client前端,连接simulation开关;然后在另一个终端执行./MedusaD,后台运行.这时我们就能在Client看到机器人执行演示程序.
后续,我们将给大家介绍如何在Medusa项目中写自己的skill,并完成用lua脚本调用执行.
边栏推荐
- Understanding of multithreading
- SAS因子分析(proc factor过程和因子旋转以及回归法求因子得分函数)
- MultipartFile和File互转工具类
- 1.2、ROS+PX4预备基础知识
- Daily problem essay | 21.11.29: use resttemplate to call external put request, and prompt '400 bad request'
- 部分 力扣 LeetCode 中的SQL刷题整理
- 【ROS】ROSmsg cakin_ Make compilation error
- Web3生态去中心化金融平台——Sealem Finance
- Tencent cloud database tdsql- a big guy talks about the past, present and future of basic software
- SAS主成分分析(求相关阵,特征值,单位特征向量,主成分表达式,贡献率和累计贡献率以及进行数据解释)
猜你喜欢

Project_ Visual analysis of epidemic data based on Web Crawler

Using MySQL database in nodejs

中间件_Redis_05_Redis的持久化

中间件_Redis_06_Redis的事务

What is the C-end and what is the b-end? Let me tell you

SAS主成分分析(求相关阵,特征值,单位特征向量,主成分表达式,贡献率和累计贡献率以及进行数据解释)

Record the packaging of the googlechrome browser plug-in

SAS factor analysis (proc factor process, factor rotation and regression method for factor score function)

What are programmers in big factories looking at? It took me two years to sort it out, and I will look at it and cherish it!

Solution to prompt "network initialization failed operation failed" in PD virtual machine installation system
随机推荐
SSH Remote Login configuration sshd_ Config file details
Hao expresses his opinions: what small good habits have you adhered to?
Beijing Tongzhou District high tech enterprise cultivation support standard, with a subsidy of 100000 yuan
Yunna PDA wireless fixed assets inventory management system
1.2、ROS+PX4预备基础知识
数字ic设计自学ing
SAS discriminant analysis (Bayes criterion and proc discrim process)
node和express实现mySql模糊搜索
Using completabilefuture
Multi interest recall model practice | acquisition technology
detectron2训练自己的数据集和转coco格式
Be careful, these hidden "bugs" of "array" to "collection"“
Introduction to the policy support of Shenzhen China Patent Award, with a subsidy of 1million yuan
关于mobx
CSRF attack
Understanding of multithreading
Leetcode search questions
How to download web photos
Current limiting and download interface request number control
Solution to prompt "network initialization failed operation failed" in PD virtual machine installation system