工程問題--ubuntu16.04源碼編譯安裝turtlebot


ubuntu16.04源碼編譯安裝turtlebot

在安裝完ros之后,就想跟着《ROS by example》里一樣,跑跑turtlebot的demo

但是發現書里講的都是14.04的安裝過程。所以就想記錄自己在16.04上源碼編譯的過程。

源碼編譯過程使用wstool下載源碼的速度取決於網絡

 


 一. 安裝前的必要准備

1 sudo apt-get install python-wstool

 


 二. 源碼編譯rocon

1 mkdir ~/rocon 2 cd ~/rocon 3 wstool init -j5 src https://raw.github.com/robotics-in-concert/rocon/release/kinetic/rocon.rosinstall
4 source /opt/ros/kinetic/setup.bash 5 rosdep install --from-paths src -i -y 6 catkin_make

在執行完編譯的時候,可能會報錯:找不到pyrcc5。使用以下命令行解決:

1 sudo apt-get install pyqt5-dev-tools

然后再重新編譯。

 


 三. 源碼編譯kobuki

1 mkdir ~/kobuki 2 cd ~/kobuki 3 wstool init src -j5 https://raw.github.com/yujinrobot/yujin_tools/kinetic-devel/rosinstalls/kinetic/kobuki.rosinstall
4 source ~/rocon/devel/setup.bash 5 rosdep install --from-paths src -i -y 6 catkin_make

在最后一步編譯的時候,會有兩個warning。對於后來的使用沒有影響,便沒有管它了。

 


 四. 源碼編譯turtlebot

1 mkdir ~/turtlebot 2 cd ~/turtlebot 3 wstool init src -j5 https://raw.github.com/yujinrobot/yujin_tools/kinetic-devel/rosinstalls/kinetic/turtlebot.rosinstall
4 source ~/kobuki/devel/setup.bash 5 rosdep install --from-paths src -i -y 6 catkin_make

同樣,會有幾個warning。


 五. 添加環境變量

1 echo "source ~/turtlebot/devel/setup.bash" >> ~/.bashrc 2 source ~/.bashrc

 


 六. 設置Udev規則

1 rosrun kobuki_ftdi create_udev_rules

 


 七. 測試

將USB線連上電腦

1. 輸入檢測指令,會顯示有對應的設備/dev/kobuki

1 ls /dev/kobuki

 

2. 啟動roscore

1 roscore

 

3. 啟動turtlebot

1 roslaunch turtlebot_bringup minimal.launch

 

4. 啟動遙控控制

1 roslaunch turtlebot_teleop keyboard_teleop.launch

點擊鍵盤“i”前進

 


 參考文章飛機票:

https://blog.csdn.net/yinxingtianxia/article/details/80267536

https://blog.csdn.net/He3he3he/article/details/80969044

http://wiki.ros.org/turtlebot/Tutorials/indigo/Turtlebot%20Installation

https://github.com/robotics-in-concert/rocon/tree/release/kinetic

https://github.com/yujinrobot/yujin_tools/tree/kinetic-devel

https://blog.csdn.net/holiday_chan/article/details/72803678


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM