中國機器人大賽之中型組仿真比賽程序

官方網址:https://github.com/nubot-nudt/simatch

環境部署與配置:

安裝Ubuntu16.04,這使用雙系統,安裝教程:https://blog.csdn.net/zhuiqiuzhuoyue583/article/details/86669142

1.安裝Ros:https://blog.csdn.net/zhuiqiuzhuoyue583/article/details/84334455

    這裏安裝的是Kinetic 版本的完全版,裏面自帶了Gazebo7

2.安裝QT,QT官網下載,直接安裝即可,安裝完後,修改系統的默認版本,改爲QT5,參考:https://blog.csdn.net/zhuiqiuzhuoyue583/article/details/103143616

3.編譯運行

下載“nubot-nudt/simatch”,網址:https://github.com/nubot-nudt/simatch

將“simatch-master”這個文件夾放在catkin_ws中的src文件夾下(Ros的工作空間中的src下)

sudo apt-get update
sudo apt-get install libncurses5-dev
cd /home/zqzy/Documents/catkin_ws/src/simatch-master #在Ros的工作空間下
sudo chmod +x configure
./configure
catkin_make

運行:

方式一:在一臺電腦上運行,各個模塊獨立運行(推薦)

先打開一個終端:

cd /home/zqzy/Documents/catkin_ws/src/simatch-master

source devel/setup.bash
roslaunch nubot_gazebo game_ready.launch

使用快捷鍵:Ctrl+Shift + T 在一個終端,開啓多個小終端窗口,輸入如下命令:

source devel/setup.bash
roslaunch nubot_gazebo game_ready.launch

使用快捷鍵:Ctrl+Shift + T 在一個終端,開啓多個小終端窗口,輸入如下命令:

source devel/setup.bash                
rosrun nubot_common cyan_robot.sh  

使用快捷鍵:Ctrl+Shift + T 在一個終端,開啓多個小終端窗口,輸入如下命令:

source devel/setup.bash
rosrun nubot_common magenta_robot.sh 

使用快捷鍵:Ctrl+Shift + T 在一個終端,開啓多個小終端窗口,輸入如下命令:

source devel/setup.bash                
rosrun nubot_coach cyan_coach.sh 

使用快捷鍵:Ctrl+Shift + T 在一個終端,開啓多個小終端窗口,輸入如下命令:

source devel/setup.bash
rosrun nubot_coach magenta_coach.sh 

使用快捷鍵:Ctrl+Shift + T 在一個終端,開啓多個小終端窗口,輸入如下命令:

source devel/setup.bash                
rosrun auto_referee auto_referee -1 

  方式二:(不推薦)

打開一個終端輸入如下命令:

cd /home/zqzy/AICourse/Experiment/simatch-master
source devel/setup.bash
roslaunch simatch_cyan.launch

 再開一個終端輸入如下命令:

cd /home/zqzy/AICourse/Experiment/simatch-master
source devel/setup.bash
roslaunch simatch_magenta.launch

分別點擊start,兩個足球隊進行比賽。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章