跳到主要內容

發表文章

目前顯示的是 2019的文章

[python] geopandas 安裝報錯-解決流程

# GeoPandas 安裝報錯-解決流程 這個問題主要是發生在部份的 dependency 安裝會報錯,需要個別的安裝 unofficial 版本 # 解決方法: 1. 前往  https://www.lfd.uci.edu/~gohlke/pythonlibs/ 2. Download GDAL 2.4.1.whl 3. Download pyproj 2.2.2 .whl 4. Download Shapely 1.6.4 .whl 5. Download Fiona 1.8.6 .whl then ```python pip install {path_to_whl}.whl #安裝完成後 pip install geopandas ```

[ROS] Nodelet Example

In order to successfully build a node that uses a nodelet for transport, we have to fix a lot of things when using catkin_create_pkg : 1. CMakeList.txt 2. package.xml 3. nodelet_plugin.xml 4. main.cpp Explain in order: 1. CMakeList.txt Pay special attention to adding a nodelet ``` code Cmake_minimum_required(VERSION 2.8.3) Project(lidars_grabber_nodelet) Find_package(catkin REQUIRED COMPONENTS   Nodelet   Roscpp   Rospy   Std_msgs ) # Because the nodelet is referenced as a lib, so add this paragraph Add_library(${PROJECT_NAME}    Src/lidars_grabber_nodelet.cpp  ) #把 nodelet as a dependent library If(catkin_EXPORTED_LIBRARIES)   Add_dependencies(lidars_grabber_nodelet ${catkin_EXPORTED_LIBRARIES}) Endif() # Remember to attach nodelet_plugins.xml # nodelet_plugins.xml is manually added  Install(FILES   # myfile1   # myfile2   Nodelet_plugins.xml   DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}  ) ``` 2. package.xml In addition to the build_depen

[ROS] Nodelet Introduction

在 ROS 平台中,我們經常需要在各個 node 之中傳輸各種資料。 當這些資料屬於數kb~數MB 的小型檔案時, Ros 可以很順利且快速的進行傳輸,但是當這些檔案大至數百MB甚至GB以上時,在每個節點進行資料打包, 傳輸, 接收, 解包資料將會變得非常浪費時間與資源。 甚至在高頻率的資料傳輸上,將會導致嚴重的延遲或是資料丟失的情形發生。 ROS 平台為了改善這個問題,提供了一種解法 "nodelet" ,其作法近似於C++裏面的 zero copy。  實現的作法是將某一個節點(通常是第一個)所處理完成的資料記憶體位址記下來,後續在進行資料傳輸時,並不實現資料本體,而是改用傳輸記憶體位址的方式進行。 這種作法可以大大改善傳輸效率,將可能造成嚴重延遲的大型檔案轉為僅為幾KB不到的記憶體位置,達到在傳輸資料時近乎零延遲的情形。 In the ROS platform, we often need to transfer various materials among the nodes. When these materials belong to a small file of several kb to several megabytes, Ros can be transmitted smoothly and quickly, but when these files are as large as hundreds of MB or even GB, data is packaged, transmitted, and received at each node. Unpacking data will become a waste of time and resources. Even in the transmission of high-frequency data, serious delays or data loss will occur. To improve this problem, the ROS platform provides a solution "nodelet" that works similar to zero copy in C++. T

[Tensorflow] How to install Tensorflow for aarch64 CPU (build from source)

Tensorflow is a powerful deep learning suite  that is now widely used in the development and application of various deep learning. Although there are many users, if there are special projects that must install tensorflow on different versions / operating systems / programming languages / platforms, it is often necessary to  find answers in the sea of google , and must continue to test after found. Build form Source  can basically solve most of the problems, but because it takes a lot of time and is difficult, it causes some people to have some difficulties in installation. aarch64 | python/C/C++ | ubuntu (build from source)

[Tensorflow] How to Install Tensorflow for C API

So many options for Tensorflow.... Tensorflow is a powerful deep learning suite   that is now widely used in the development and application of various deep learning. Although there are many users, if there are special projects that must install tensorflow on different versions / operating systems / programming languages / platforms, it is often necessary to  find answers in the sea of google , and must continue to test after found. Build form Source  can basically solve most of the problems, but because it takes a lot of time and is difficult, it causes some people to have some difficulties in installation. Here are a few of the tensorflow installation methods tested by myself.

[python] pip 更新到18.0 後出現 "ImportError: cannot import name 'main'"

剛剛自己測試後, 成功解除 pip upgrade 後出現 ImportError 的暴力的爛解法XD #個人環境 os: ubuntu 16.04 LTS python: 2.7 #先將 pip 移除 python -m pip uninstall pip #按 y 即可 #下載下列檔案並存成 "get_pip.py" https://gist.github.com/mikechan0731/547711ccacca3010d00748d3671c6569 #啟動此檔案 $ cd {TO_FILE_LOCATION} $ sudo python get_pip.py --ignore-installed 這樣就會把 pip 裝回來啦~測試後也沒有再出現 import name 'main' 的問題了~ 想要了解真正解法的可以看這個 issue (看來真的很多人出這個問題啊) https://github.com/pypa/pip/issues/5240