跳到主要內容

發表文章

目前顯示的是 8月, 2019的文章

[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.