ROS學習(更新中~)


1.一次把ROS環境變量都自動配置好(即添加到bash會話中)
echo "source /opt/ros/indigo/setup.bash" >> ~/.bashrc
source ~/.bashrc
把新建的工作空間添加到ROS中。
. ~/catkin_ws/devel/setup.bash

2.問題集[roscd]: No such package/stack 'beginner_tutorials'
$ cd ~/catkin_ws
$ catkin_make(重新編譯工作空間)
$ source devel/setup.bash(重新source下新產生的bash文件)
$ roscd beginner_tutorials
PS:packages應該放在src文件里,默認情況下,catkin編譯時只會尋找這個地方。

3.安裝PR2 ROS Packages./
/解決roslaunch beginner_tutorials turtlemimic.launch 出現各種安裝包的問題。
$ sudo apt-get install ros-indigo-pr2-*
$  rospack profile

4.打開rivz 時顯示fixed frame map does not exist(紅線)
$ rosrun tf static_transform_publisher 0 0 0 0 0 0 1 map my_frame 10

5.Could not contact ROS master at [http://localhost:11311], retrying...
在一個新終端運行roscore

6.在運行如下代碼(參考 urdf教程

roslaunch urdf_tutorial display.launch model:=urdf/01-myfirst.urdf  

出現

ImportError: No module named rospkg

采用方法(我裝了miniconda2),參考ROS Answers

pip install rospkg  

之后再次運行roslaunch文件,出現

ImportError: No module named catkin_pkg.packages

采用方法如下,參考ROS Answers

conda install -c auto catkin_pkg

再次運行roslaunch文件,出現

ImportError: No module named wx

檢查python中是否有wx模塊。

$  python
>>>  import wx

由下列輸出知。python中缺少wx模塊。

ImportError:No module  named wx

安裝wxPython ,參考 wxPython下載

pip install -U wxPython

發現缺少GTK相關信息。安裝wxWidgets(wxGTK是wxWidgets的GTK版本,GTK是用於Gnome的一個圖形庫)

參考wxWidgets安裝

$  tar jxvf wxWidgets-3.0.3.tar.bz2   //移到合適的文件夾下,解壓
$  cd  wxWidgets-3.0.3    
$  ./configure --with-gtk
$  sudo su       //開超級權限
$  exit    //退出超級權限

  

占行

 


免責聲明!

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



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