备忘录--相关操作
1. 終端啟動軟件中心
gnome-software2. 終端啟動fcitx輸入法設置以及面板顏色設置
fcitx-configtool fcitx-qimpanel-configtool3. root用戶和普通用戶間的切換
sudo -s su lhj4.?NameError: name 'FileNotFoundError' is not defined
解決: FileNotFoundError為python3使用的文本不存在異常處理方法, 在python2.7中使用IOError
5.? skypeforlinux鏈接Index of /latest,安裝如下,deb文件都這樣裝.
sudo dpkg -i skypeforlinux-64.deb sudo apt -f install(當出現(xiàn)依賴)6. tf坐標變換
rviz中tf模型的紅色軸為x, 綠色軸為y, 藍色軸為z, 繞軸逆時針旋轉角度為正,順時針為負。世界坐標系符合右手定則, 繞定軸旋轉是左乘R = R(z)R(y)R(x), 繞自身旋轉是右乘R = R(x)R(y)R(z)
rosrun tf tf_echo xtion_depth_optical_frame base_footprint(child) 可查看base_footprint相對于xtion_depth_optical_frame(參考坐標系)的坐標變換關系-----即xtion_depth_optical_frame經(jīng)過變換矩陣可得base_footprint, 下圖得到base_footprint在xtion_depth_optical_frame的y軸1.217米處, 中間坐標系繞xtion_depth_optical_frame的x軸逆時針旋轉-173.499°得到base_footprint姿態(tài)。
7. rospy發(fā)布tf坐標變換關系
br = tf.TransformBroadcaster(),?br.sendTransform(np.array((0.212,-0.002,0.7)), np.array((0,0,0,1)), rospy.Time.now(),"cfiwshyuh"(child), "camera_depth_optical_frame"),?lookupTransform('xtion_depth_optical_frame', 'obj_to_cam_frame'(child), rospy.Time(0)). 監(jiān)聽坐標系時,先監(jiān)聽父坐標系, 發(fā)布坐標系時, 先發(fā)送子坐標系.?
8. 更改ubuntu下的分辨率
? ? ? ?“系統(tǒng)設置”--》“顯示”里只有一個分辨率不可調(diào),可通過直接修改/etc/default/grub里的GRUB_GFXMODE=640x480,將分辨率改成你系統(tǒng)中支持的分辨率,可用“cvt 1920 1080”查看是否支持,修改保存后執(zhí)行sudo update-grub,然后重啟即可。? ? ? ? ? ??
9. Ubuntu設置主副屏
10.?E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
解決: 一般運行在 sudo apt-get install *** 指令后面加上 --fix-missing,若 --fix-missing沒用,則先運行 sudo apt-get update 進行更新,然后再安裝.
11. error while loading shared libraries:libmoveit_move_group_interface.so.0.9.17: cannot open shared object file or directory.
解決:這個就是某些ros_moveit包沒有裝,sudo apt install ros-kinetic-moveit安裝或更新。
12. 彩色圖均衡化,先將圖像轉換為YUV空間下,然后再對YUV通道的Y進行均衡化。
color_image = cv2.imread("color_8.png") image_yuv = cv2.cvtColor(color_image,cv2.COLOR_BGR2YUV) #直方圖均衡化 image_yuv[:,:,0] = cv2.equalizeHist(image_yuv[:,:,0]) #顯示效果 output = cv2.cvtColor(image_yuv,cv2.COLOR_YUV2BGR) cv2.imshow('use', output)13.?話題重定向
rosrun topic_tools throttle messages /xtion/depth_registered/points 0.01?
14. 圖片減少像素
sudo apt install imagemagick mogrify -resize 200x110 -format png zuzibai.png15. 更換阿里云的下載源,換完源速度還慢,可能是網(wǎng)絡問題,切換熱點試試。
sudo cp /etc/apt/sources.list /home/lhj/Document/sources_back.list #先備份deb http://mirrors.aliyun.com/ubuntu/ xenial main deb-src http://mirrors.aliyun.com/ubuntu/ xenial maindeb http://mirrors.aliyun.com/ubuntu/ xenial-updates main deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates maindeb http://mirrors.aliyun.com/ubuntu/ xenial universe deb-src http://mirrors.aliyun.com/ubuntu/ xenial universe deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates universedeb http://mirrors.aliyun.com/ubuntu/ xenial-security main deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security universe16. 安裝搜狗輸入法
① 先要配置fcitx,sudo apt install fcitx, 提示依賴關系不滿足,使用sudo apt-get?-f? install自動修復依賴關系。這里因為加快下載速度,更換了ubuntu14.04的阿里源,導致執(zhí)行sudo apt -f install時卸載了系統(tǒng)某些工具包,導致系統(tǒng)崩掉。
② 安裝fcitx后,下載linux版Sogou.deb,執(zhí)行sudo dpkg -i sogou.deb安裝成功后,打開“系統(tǒng)設置”--》“語言支持”,可能提示安裝軟件包,安裝即可,安裝后在“Keyboard input method system”選擇"fcitx“后關閉, 搜索欄里搜索fcitx configuration打開(若沒有重啟電腦),打開后點擊左下角的”+“,然后取消勾選”only show current language“,搜索”sogou“就能找到搜狗輸入法。此時右上角的狀態(tài)欄暫時還沒有搜狗圖標,重啟電腦就有了。
17. 使用catkin_make
sudo apt install python-catkin-toolscatkin_make -DCATKIN_WHITELIST_PACKAGES=""18. 點云頭以及pcd格式
?
19.? octomap地圖顯示
將sensors_rgbd.yaml文件中point_cloud_topic改為相應攝像頭話題即可,如/xtion/depth_registered/points。
20. gazebo7卸載和gazebo8安裝
?
?然后手動根據(jù)卸載的gazebo7插件,裝上gazebo8插件
21. MATLAB畫圖中文亂碼?
22. Ubuntu文本界面登錄提示login incorrect
1.?先輸入用戶名按回車鍵,然后ctrl+alt+f7?切換回圖形界面,然后再切換到字符界面輸密碼
2.?先輸入用戶名按回車鍵,然后關閉小鍵盤上的numlock按鍵再打開,再輸入密碼
23. gedit自動補全
1. 【Edit】--》【Preferences】--》【Plugins】勾選第二項“External Tools”
2. 安裝gedit-plugins插件
sudo apt install gedit-plugins3. 再次打開【plugins】菜單項,滑動到底部,勾選"Word Completion"即可
24. Cmak命令
#SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/../bin) #設置可執(zhí)行文件的輸出目錄 set(LIBRARY_OUTPUT_PATH /home/lhj/) #設置庫文件的輸出目錄
25. Linux下視頻轉GIF
sudo apt install ffmpeg ffmpeg -ss 2 -t 10 -i out.mp4 -s 649x320 -r 15 out.gif -ss 2 -t 12 表示從從視頻的第2秒開始轉換, 轉換時間長度為10秒. -i 是輸入文件,-s用于設定寬度和高度, -r 用于設定幀數(shù)26. linux安裝kazam錄屏軟件
sudo apt install kazam avi保存視頻很大,file--》preference設置mp4保存視頻大小會變小27. 輸入用戶名和密碼后,連接不上遠程服務器
①用戶名需要是原本的用戶名,不是更改后的名字;②遠程電腦需要設置“網(wǎng)絡訪問”中的一項,如下圖。
28. 手動更新谷歌瀏覽器的書簽
1. 在地址欄輸入?chrome://sync-internals/
2. 點擊Stop Sync和Request Start
29. Ubuntu16.04將mp4轉為gif動圖
1. 使用mplayer對視頻幀提取,并保存為一系列圖片
mplayer -ao null xxx.mp4 -vo jpeg:outdir=xxxx2. 使用convert將視頻幀合成gif動圖
convert xxxx/* test.gif30. catkin_make只編譯一個功能包
catkin_make -DCATKIN_WHITELIST_PACKAGES="package1;package2"31. Ubuntu下查找當前目錄下包含某個字符串的文件并顯示行號
grep -rn "Hello" ×總結
- 上一篇: 下载并配置完dex-net,在CLI中执
- 下一篇: 使用camera_calibration