Appearance
WSL下RoboCup3D环境搭建
INFO
对不方便使用或对双系统不适应的同学可以在 windows 子系统下完成 robocup3d 环境的搭建,体验还不错。
install wsl
地址:<https://www.jianshu.com/p/2bcf5eca5fbc>
deps
bash
sudo apt install g++ git cmake libfreetype6-dev libode-dev libsdl-dev ruby ruby-dev libdevil-dev libboost-dev libboost-thread-dev libboost-regex-dev libboost-system-dev qt4-default
sudo apt install g++ git cmake libfreetype6-dev libode-dev libsdl-dev ruby ruby-dev libdevil-dev libboost-dev libboost-thread-dev libboost-regex-dev libboost-system-dev qt4-default
simspark & rcsserver3d
decompress
都选择Latest Version下载即可。
下载完后解压(选择你开心的方式)参考tar xvf file_name
TIP
若你在windows下解压,后可通过在wsl的终端中 explorer.exe .
打开wsl所在的目录,然后将你解压后的目录拖到 home/your_name/
下。
complie & install
bash
#simspark
cd simspark
mkdir build
cd build
cmake ..
make
sudo make install
sudo ldconfig
#simspark
cd simspark
mkdir build
cd build
cmake ..
make
sudo make install
sudo ldconfig
bash
#rcsserver3d
cd rcsserver3d
mkdir build
cd build
cmake ..
make
sudo make install
sudo ldconfig
#rcsserver3d
cd rcsserver3d
mkdir build
cd build
cmake ..
make
sudo make install
sudo ldconfig
bash
echo -e '/usr/local/lib/simspark\n/usr/local/lib/rcssserver3d' | sudo tee /etc/ld.so.conf.d/spark.conf
sudo ldconfig
echo -e '/usr/local/lib/simspark\n/usr/local/lib/rcssserver3d' | sudo tee /etc/ld.so.conf.d/spark.conf
sudo ldconfig
- 启动:
rcsoccersim3d
roboviz
TIP
电脑得有 Java 环境
选择合适的位置解压然后点击运行
roboviz.bat
即可关闭运行时黑乎乎cmd窗口的方法
修改roboviz.bat
内容为
bash
@echo off
if "%1" == "h" goto begin
mshta vbscript:createobject("wscript.shell").run("""%~nx0"" h",0)(window.close)&&exit
:begin
REM
set prev=%cd%
cd /D "%~dp0"
java -jar RoboViz.jar %*
cd %prev%
@echo off
if "%1" == "h" goto begin
mshta vbscript:createobject("wscript.shell").run("""%~nx0"" h",0)(window.close)&&exit
:begin
REM
set prev=%cd%
cd /D "%~dp0"
java -jar RoboViz.jar %*
cd %prev%
然后新增robo.vbs
文件,内容为
bash
Set shell = Wscript.CreateObject("WScript.Shell")
a = shell.run ("E:\instruction\roboviz.bat",0)
Set shell = Wscript.CreateObject("WScript.Shell")
a = shell.run ("E:\instruction\roboviz.bat",0)
TIP
注意E:\instruction\roboviz.bat
是你的roboviz.bat
地址,别搞错了。