Robot operating System ,簡單說機器人操做系統,弱耦合的分佈式進程框架,經過進程間的消息傳遞和管理。實現硬件抽象和設備控制。node
catkin_create_pkg: 建立一個packagec++
catkin_make: 編譯ROS程序bash
rosrun: 運行ros程序框架
rostopic: 主題有關的命令分佈式
rostopic list ; rostopic hz topic1; rostopic bw topic1; rostopic info topic1; rostopic echo topic1ide
rosnode list : 產看運行的節點列表工具
roslaunch : 經過編輯.launch 的文件自動啓動多個節點ui
rosbag : 對話題數據的記錄和回放spa
rosbag record topic1操作系統
rosbag play name1.bag
rqt_plot: 對結果的可視化
catkin_create_pkg [packageNmae] [依賴項]
依賴項: roscpp: 使用c++編譯器,兼容c++接口; std_msgs: ros預約義的數據類型
package.xml : 組織ROS程序包,命名程序包名稱、依賴項
<name></name>
<build_depend></build_depend>
<run_depend></run_depend>
CMakeLists.txt : 一個簡單示例以下
cmake_minimum_required(VERSION 2.8.3) project(demo-proj1-nodes) # package name find_package(catkin REQUIRED COMPONENTS roscpp std_msgs ) catkin_package( # INCLUDE_DIRS include # LIBRARIES my_minimal_nodes # CATKIN_DEPENDS roscpp std-msgs # DEPENDS system_lib ) include_directories( include ${catkin_INCLUDE_DIRS} ) add_executable(my_minimal_publisher src/minimal_publisher.cpp) add_executable(my_minimal_publisher2 src/sleep_minimal_publisher.cpp) target_link_libraries(my_minimal_publisher ${catkin_LIBRARIES} ) target_link_libraries(my_minimal_publisher2 ${catkin_LIBRARIES} )
編譯命令:catkin_make
編譯後會有,devel 和build 兩個文件夾
首先使用添加環境變量: source ./devel/setup.bash
rosrun [package-name] [可運行程序名稱]