樹莓派採集HOKUYO雷射雷達資料

2021-07-22 08:29:55 字數 1435 閱讀 7822

前一篇講到在樹莓派上安裝mrpt,其實我安裝mrpt的最終目的是利用樹莓派採集hokuyo的資料。

連線hokuyo後,要設定ip 掩碼 和 閘道器:

下面是採集hokuyo資料並顯示的**:

#include #include #include #include #include #include #include #include void test_hokuyo()

mrpt::gui::cdisplaywindowplots win("laser scans");

std::cout << "press any key to stop capturing..." << std::endl;

mrpt::utils::ctictac tictac;

tictac.tic();

while (!mrpt::system::os::kbhit())

mrpt::system::sleep(15);

}; laser.turnoff();

}int main(int argc, char **argv)

catch (std::exception &e)

catch (...)

}

cmakelists.txt檔案:

set(samplename hokuyo_laser_test)

set(prj_name "$")

project($)

cmake_minimum_required(version 2.4)

set(executable_output_path ".")

add_executable($ hokuyo_laser_test.cpp )

set_target_properties(

$ properties

project_label "(example) $")

target_link_libraries($

$ )if(cmake_compiler_is_gnucxx and not cmake_build_type matches "debug")

set(cmake_cxx_flags "$ -o3")

endif(cmake_compiler_is_gnucxx and not cmake_build_type matches "debug")

來張效果圖~

雷射雷達 什麼是雷射雷達?

toc 本文引用 雷射雷達和老式雷達對比 來至 雷達 radar 是無線電探測和測距,即用無線電發現目標,並測定他們的空間位置,也稱為 無線電定位 雷達是利用電磁波探測目標的電子裝置。雷達發射電磁波對目標進行照射,並接收其回波,從而獲得目標至電磁波發射點的距離 距離變化率 徑向速度 方位 高度等資訊...

ROS中使用Hokuyo雷射雷達UST 10LX

hokuyo雷射雷達ust 10lx sudo apt get install ros kinetic urg node2.修改ubuntu的ip位址 sudo gedit etc network inte cesauto lo iface lo inet loopback 下面新增以下語句 aut...

雷射雷達(一) 知名雷射雷達公司

目前大部分企業都以無人車 機械人及無人車領域雷射雷達為主要研究方向。而傳統機械式雷射雷達已逐漸向固態雷射雷達方向轉變。在 方面,無人駕駛領域的雷射雷達少則上萬,多則幾十萬元,普遍要高於機械人及a 等領域 而機械人領域的雷射雷達相對來說售價更低,國內思嵐科技及玩智商等企業已低至上百元。目前在用的就是思...